我有一个twillio sms消息流,可以正常工作。我只想做一点改进,但不知道在哪里看。在第二行的以下代码中,我想发送呼叫者ID(contact.channel.callerId ???)与号码(contact.channel.address)
worker_processes 1;
events {
worker_connections 1024;
}
http {
server {
listen 80;
client_max_body_size 100G;
aws_access_key 'AKI';
aws_signing_key "xyz";
aws_key_scope "20190226/eu-west-2/s3/aws4_request";
aws_s3_bucket 'bucket_name';
location / {
aws_sign;
aws_access_key "AKI";
aws_signing_key "xyz";
aws_key_scope "20190226/eu-west-2/s3/aws4_request";
aws_endpoint "s3.eu-west-2.amazonaws.com";
proxy_pass http://bucket_name.s3.eu-west-2.amazonaws.com/;
resolver 8.8.8.8 valid=300s;
resolver_timeout 10s;
}
}
}
答案 0 :(得分:0)
我采用了另一种方法,并使用了一些if语句。它可能不那么优雅,但是可以起作用:
{% if trigger.message.Body %}
{% if contact.channel.address %}
{% if contact.channel.address == '+18558675309' %}
Jack says: {{ trigger.message.Body }}
{% endif %}
{% if contact.channel.address == '+18558675309' %}
Buddy says: {{ trigger.message.Body }}
{% endif %}
{% else %}
Unknown says: {{ trigger.message.Body }}
{% endif %}
{% else %}
A call was received from:
{{contact.channel.address}}
{% endif %}