Open eric-brechemier opened 2 years ago
Calling the same UK phone number results in a correct conversion, however, in the {{To}}
number.
The number is received by Twilio as:
To: "sip:+447355547122@44-7360-271984.sip.us1.twilio.com"
and correctly transformed to:
+447355547122
Let's try different values:
{{#e164}}+447355547122{{/e164}} -> +447355547122
{{#e164}}+44-7355547122{{/e164}} -> +447355547122
{{#e164}}447355547122{{/e164}} -> +447355547122
{{#e164}}44-7355-547122{{/e164}} -> +17355547122
{{#e164}}+44-7355-547122{{/e164}} -> +17355547122
{{#e164}}+44-7-355547122{{/e164}} -> +17355547122
{{#e164}}0044-7355-547122{{/e164}} -> 0044-7355-547122
The {{#e164}}
filter results in different phone numbers depending on the presence and the position of the dashes which separate groups of digits in the phone number.
I have reported this issue to Twilio for their consideration.
As a workaround, I now recommend, for the configuration of any new phone number, to remove all dashes from the phone number value used as unique SIP domain.
There is no point in changing the configuration of existing phone numbers. If your number works correctly and you can make calls from your SIP phone to regular phone numbers, it means that your SIP domain name is not affected by the unexpected conversion to a different international country code when getting through the e164 Mustache filter.
I configured a new UK mobile phone number today, which failed to make calls due to an invalid caller id.
I am using the generic TwiML Bin from the guide, which extracts the phone number from the SIP Domain:
The e164 Mustache filter used to extract my own phone number from the SIP Domain no longer works with that UK phone number. The caller id is reported as invalid.
I reproduced the issue using a fake UK phone number, which I included in the example below:
The error log shows the resulting value, which is quite unexpectedly a US Phone number:
I have also tried prefixing the value with a
+
which makes no difference: