<div dir="ltr">Im not experienced with Twilio, but as I see from the docu, they&#39;re expecting E.164 format which is +45... in your case.<div>Check out <a href="https://en.wikipedia.org/wiki/E.164">https://en.wikipedia.org/wiki/E.164</a></div><div><br></div><div>Rewrite the destination and source via regex f ex  </div><div><span style="font-size:12.8px"> &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_</span><span style="font-size:12.8px">number=+${outbound_caller_id_</span><span style="font-size:12.8px">number}&quot;/&gt;</span></div><div><span style="font-size:12.8px">and</span></div><div><span style="font-size:12.8px"> </span><span style="font-size:12.8px">&lt;action application=&quot;set&quot; data=&quot;destination_number</span><span style="font-size:12.8px">=+${destination_number</span><span style="font-size:12.8px">}&quot;/&gt;</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Or just try to write to their support, problably will give you an answer, whats wrong.</span></div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Thomas</span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 23 July 2015 at 09:21, Michael Nielsen <span dir="ltr">&lt;<a href="mailto:mic.niel84@gmail.com" target="_blank">mic.niel84@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hello everyone,<br><br></div>I&#39;m trying to setup FreeSWITCH with Twilio - to place outbound calls.<br><br></div>I&#39;ve created a SIP trunk in Twilio and are now trying to terminate calls via Twilio - all 10 digit calls should go this way (2 digit country code and 8 digit number - Danish numbers).<br><br></div>This is my twilio.xml in sip_profiles/external:<br><br>&lt;include&gt;<br>  &lt;gateway name=&quot;Twilio-outbound&quot;&gt;<br>    &lt;param name=&quot;username&quot; value=&quot;MY-USER&quot;/&gt;<br>    &lt;param name=&quot;password&quot; value=&quot;MY-PASSWORD&quot; /&gt;<br>    &lt;param name=&quot;proxy&quot; value=&quot;<a href="http://MY-SIP.pstn.twilio.com" target="_blank">MY-SIP.pstn.twilio.com</a>&quot;/&gt;<br>    &lt;param name=&quot;register&quot; value=&quot;false&quot;/&gt;<br>  &lt;/gateway&gt;<br>&lt;/include&gt;<br><br></div>This is my 02_twilio.xml in dialplan/default/:<br><br>&lt;include&gt;<br>  &lt;extension name=&quot;international.twilio&quot;&gt;<br>    &lt;condition field=&quot;${toll_allow}&quot; expression=&quot;international&quot;/&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^(\d{10})$&quot;&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_number=${outbound_caller_id_number}&quot;/&gt;<br>      &lt;action application=&quot;set&quot; data=&quot;effective_caller_id_name=${outbound_caller_id_name}&quot;/&gt;<br>      &lt;action application=&quot;bridge&quot; data=&quot;sofia/gateway/Twilio-outbound/$1&quot;/&gt;<br>    &lt;/condition&gt;<br>  &lt;/extension&gt;<br>&lt;/include&gt;<br><br></div>When I try and make a call for a Danish number (for example 4512345678) I get a &quot;Bad Request 400&quot;.<br><br></div>This is my FS log:<br><br>freeswitch@MY-SIP&gt; 2015-07-23 07:19:45.745254 [NOTICE] switch_channel.c:1075 New Channel sofia/internal/<a href="mailto:4561912233@MY-SIP.MY-DOMAIN.com" target="_blank">4561912233@MY-SIP.MY-DOMAIN.com</a> [4af1a50e-5145-4ad8-8b9a-499a27e9e3ec]<br>2015-07-23 07:19:45.905238 [INFO] mod_dialplan_xml.c:635 Processing 4561912233 &lt;4561912233&gt;-&gt;4512345678 in context default<br>2015-07-23 07:19:45.905238 [NOTICE] switch_channel.c:1075 New Channel sofia/external/4512345678 [54267cad-615c-478a-9ecc-61950a995068]<br>2015-07-23 07:19:45.905238 [NOTICE] sofia.c:7543 Hangup sofia/external/4512345678 [CS_CONSUME_MEDIA] [NORMAL_TEMPORARY_FAILURE]<br>2015-07-23 07:19:45.925245 [INFO] mod_dptools.c:3276 Originate Failed.  Cause: NORMAL_TEMPORARY_FAILURE<br>2015-07-23 07:19:45.925245 [NOTICE] switch_channel.c:4747 Hangup sofia/internal/<a href="mailto:4561912233@MY-SIP.MY-DOMAIN.com" target="_blank">4561912233@MY-SIP.MY-DOMAIN.com</a> [CS_EXECUTE] [NORMAL_TEMPORARY_FAILURE]<br>2015-07-23 07:19:45.925245 [NOTICE] switch_core_session.c:1641 Session 47 (sofia/internal/<a href="mailto:4561912233@MY-SIP.MY-DOMAIN.com" target="_blank">4561912233@MY-SIP.MY-DOMAIN.com</a>) Ended<br>2015-07-23 07:19:45.925245 [NOTICE] switch_core_session.c:1645 Close Channel sofia/internal/<a href="mailto:4561912233@MY-SIP.MY-DOMAIN.com" target="_blank">4561912233@MY-SIP.MY-DOMAIN.com</a> [CS_DESTROY]<br>2015-07-23 07:19:45.925245 [NOTICE] switch_core_session.c:1641 Session 48 (sofia/external/4512345678) Ended<br>2015-07-23 07:19:45.925245 [NOTICE] switch_core_session.c:1645 Close Channel sofia/external/4512345678 [CS_DESTROY]<br><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" rel="noreferrer" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-dev mailing list<br>
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org">FreeSWITCH-dev@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>