<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Mainly in Twilio if you are using sip trunk you should always call with international code prefix like you should put +1 before number for USA.</div><div class=""><br class=""></div><div class="">it looks like the number you are using in local format “&nbsp;<a href="sip:5101112222@mycompany.pstn.twilio.com" style="font-family: Calibri; font-size: 16px;" class="">5101112222</a>” &nbsp;it should "+xxx 510111 &nbsp; "</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="font-family: Calibri; font-size: 16px; margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">From:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">Adelia C. &lt;<a href="mailto:hexade@hotmail.com" class="">hexade@hotmail.com</a>&gt;<br class=""></span></div><div style="font-family: Calibri; font-size: 16px; margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">To:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">"<a href="mailto:freeswitch-users@lists.freeswitch.org" class="">freeswitch-users@lists.freeswitch.org</a>" &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" class="">freeswitch-users@lists.freeswitch.org</a>&gt;<br class=""></span></div><div style="font-family: Calibri; font-size: 16px; margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Date:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">December 10, 2014 at 7:45:40 PM GMT+3<br class=""></span></div><div style="font-family: Calibri; font-size: 16px; margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Reply-To:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">FreeSWITCH Users Help &lt;<a href="mailto:freeswitch-users@lists.freeswitch.org" class="">freeswitch-users@lists.freeswitch.org</a>&gt;<br class=""></span></div><div style="font-family: Calibri; font-size: 16px; margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif; color: rgb(127, 127, 127);" class=""><b class="">Subject:&nbsp;</b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">[Freeswitch-users] Twilio SIP trunk config - outbound call rejected</b><br class=""></span></div><br style="font-family: Calibri; font-size: 16px;" class=""><br style="font-family: Calibri; font-size: 16px;" class=""><div dir="ltr" style="font-family: Calibri; font-size: 16px;" class=""><br class=""><div class=""><div dir="ltr" class="">Any idea why this INVITE is rejected with 400 Invalid Phone Number by Twilio?<br class="">The first INVITE asks for Proxy Authentication, that seems to pass and this is rejected.<br class="">Thank you!<br class=""><br class="">INVITE&nbsp;<a href="sip:5101112222@mycompany.pstn.twilio.com" class="">sip:5101112222@mycompany.pstn.twilio.com</a>&nbsp;SIP/2.0<br class="">Via: SIP/2.0/UDP 10.50.1.116:5080;rport;branch=z9hG4bKa8QvU1B6QmeKc<br class="">Max-Forwards: 69<br class="">From: "unknown" &lt;<a href="sip:4152221111@mycompany.pstn.twilio.com" class="">sip:4152221111@mycompany.pstn.twilio.com</a>&gt;;tag=6UetZr6rDZgHF<br class="">To: &lt;<a href="sip:5101112222@mycompany.pstn.twilio.com" class="">sip:5101112222@mycompany.pstn.twilio.com</a>&gt;<br class="">Call-ID: 1ffda8b7-faaf-1232-8380-a9a65d1e96b1<br class="">CSeq: 68751485 INVITE<br class="">Contact: &lt;<a href="sip:gw+twiliotrunk@10.50.1.116:5080;transport=udp;gw=twiliotrunk" class="">sip:gw+twiliotrunk@10.50.1.116:5080;transport=udp;gw=twiliotrunk</a>&gt;<br class="">Expires: 3600<br class="">User-Agent: FreeSWITCH-mod_sofia/1.5.12b~64bit<br class="">Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY<br class="">Supported: timer, path, replaces<br class="">Allow-Events: talk, hold, conference, refer<br class="">Proxy-Authorization: Digest username="4152221111", realm="<a href="http://sip.twilio.com" class="">sip.twilio.com</a>", nonce="f722ae99d0a818bc422baa5d8", cnonce="IA1gJvqvEg6mmXR6WsQ", opaque="e89d2328e07da020d75a", algorithm=MD5, uri="<a href="sip:5101112222@mycompany.pstn.twilio.com" class="">sip:5101112222@mycompany.pstn.twilio.com</a>", response="e65d3dea5b1e3b35306cfa121ec2ae4d", qop=auth, nc=00000001<br class="">Content-Type: application/sdp<br class="">Content-Disposition: session<br class="">Content-Length: 268<br class="">X-FS-Support: update_display,send_info<br class="">Remote-Party-ID: "unknown" &lt;<a href="sip:1000@mycompany.pstn.twilio.com" class="">sip:1000@mycompany.pstn.twilio.com</a>&gt;;party=calling;screen=yes;privacy=off<br class=""><br class="">v=0<br class="">o=FreeSWITCH 1418153731 1418153732 IN IP4 10.50.1.116<br class="">s=FreeSWITCH<br class="">c=IN IP4 10.50.1.116<br class="">t=0 0<br class="">m=audio 21366 RTP/AVP 0 8 3 101 13<br class="">a=rtpmap:0 PCMU/8000<br class="">a=rtpmap:8 PCMA/8000<br class="">a=rtpmap:3 GSM/8000<br class="">a=rtpmap:101 telephone-event/8000<br class="">a=fmtp:101 0-16<br class="">a=ptime:20<br class="">--<br class=""><br class="">SIP/2.0 400 Invalid phone number<br class="">To: &lt;<a href="sip:5101112222@ingenio.pstn.twilio.com" class="">sip:5101112222@ingenio.pstn.twilio.com</a>&gt;;tag=08602519_6772d868_5eef74bb-957c-486e-b261-2a2e63704d73<br class="">Via: SIP/2.0/UDP 10.50.1.116:5080;received=10.50.1.116;rport=5080;branch=z9hG4bKa8QvU1B6QmeKc<br class="">CSeq: 68751485 INVITE<br class="">Call-ID: 1ffda8b7-faaf-1232-8380-a9a65d1e96b1<br class="">From: "unknown" &lt;<a href="sip:4152221111@ingenio.pstn.twilio.com" class="">sip:4152221111@ingenio.pstn.twilio.com</a>&gt;;tag=6UetZr6rDZgHF<br class="">Contact: &lt;<a href="sip:171.118.14.130:5060" class="">sip:171.118.14.130:5060</a>&gt;<br class="">Content-Length: 0<br class=""><br class=""><br class=""><br class="">--<br class=""></div></div><div class=""><br class=""></div></div></div></body></html>