Twilio - 剥离入站来电显示位,启用录音并将呼叫转发到被叫的原始号码
Twilio - strip inbound callerid bits, enable recording and forward call to the original number called
菜鸟,我需要一个简单脚本(php 或 XML)的帮助,该脚本在 Twiml 中去除一部分入站呼叫者 ID,然后将该呼叫转发到拨打的原始 e164 号码。例如。呼叫来自 +16045551212@sip.someprovider.com:5061 - PHP/xml 脚本会剥离除 e164 号码以外的所有内容,然后 twiml 该号码。因此,由此产生的出站航段将只是 +16045551212。
由于 Twilio 支持 webhook,我们应该能够接收号码,去除不需要的位和 return 出站段的净化号码。
我有录音工作,如果我静态地放置一个 e164 号码,它工作正常。我只是在剥离不需要的但脱离了 sip uri 并告诉系统拨打那个新号码时遇到了麻烦。
我尝试使用 {{From}} 但它包括整个 from callerid,包括不需要的 sip uri 位。
我正在从系统调用 Twiml webhook...
<Response>
<Say> This call will be recorded for quality assurance purposes. Please standby.</Say>
<Dial record="record-from-ringing-dual" callerId="+1xxxxxxxxx">
<Number>+1xxxxxxxx
</Number>
</Dial>
</Response>
如有任何帮助,我将不胜感激!
你看过TwiML Bins的{#e164}
功能了吗?
How to use templates with TwiML Bins
Execute Built-in Functions The last feature to share is access to
built-in functions. The first such built-in function to ship makes it
easy to pull a phone number out of parameters and reformat as E.164.
This is very helpful when bridging SIP endpoints such as a Polycom
phone with the PSTN world.
For example, let's say a Voice call comes in to a SIP Interface with a
To value of sip:+15125551212@mydomain.sip.us1.twilio.com. Since the
e.164 phone number is embedded in the SIP endpoint's address, you can
use the new built-in e164 function to pull out this phone number and
craft the proper TwiML to forward the call:
<Response>
<Dial>{{#e164}}{{To}}{{/e164}}</Dial>
</Response>
菜鸟,我需要一个简单脚本(php 或 XML)的帮助,该脚本在 Twiml 中去除一部分入站呼叫者 ID,然后将该呼叫转发到拨打的原始 e164 号码。例如。呼叫来自 +16045551212@sip.someprovider.com:5061 - PHP/xml 脚本会剥离除 e164 号码以外的所有内容,然后 twiml 该号码。因此,由此产生的出站航段将只是 +16045551212。
由于 Twilio 支持 webhook,我们应该能够接收号码,去除不需要的位和 return 出站段的净化号码。
我有录音工作,如果我静态地放置一个 e164 号码,它工作正常。我只是在剥离不需要的但脱离了 sip uri 并告诉系统拨打那个新号码时遇到了麻烦。
我尝试使用 {{From}} 但它包括整个 from callerid,包括不需要的 sip uri 位。
我正在从系统调用 Twiml webhook...
<Response>
<Say> This call will be recorded for quality assurance purposes. Please standby.</Say>
<Dial record="record-from-ringing-dual" callerId="+1xxxxxxxxx">
<Number>+1xxxxxxxx
</Number>
</Dial>
</Response>
如有任何帮助,我将不胜感激!
你看过TwiML Bins的{#e164}
功能了吗?
How to use templates with TwiML Bins
Execute Built-in Functions The last feature to share is access to built-in functions. The first such built-in function to ship makes it easy to pull a phone number out of parameters and reformat as E.164. This is very helpful when bridging SIP endpoints such as a Polycom phone with the PSTN world.
For example, let's say a Voice call comes in to a SIP Interface with a To value of sip:+15125551212@mydomain.sip.us1.twilio.com. Since the e.164 phone number is embedded in the SIP endpoint's address, you can use the new built-in e164 function to pull out this phone number and craft the proper TwiML to forward the call:
<Response>
<Dial>{{#e164}}{{To}}{{/e164}}</Dial>
</Response>