<div dir="ltr">+1<div><br></div><div><a href="https://wiki.freeswitch.org/wiki/Loopback_endpoint">https://wiki.freeswitch.org/wiki/Loopback_endpoint</a><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On 3 August 2014 08:33, Peter Olsson <span dir="ltr">&lt;<a href="mailto:peter@olssononline.se" target="_blank">peter@olssononline.se</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<p dir="ltr">You can use the loopback endpoint, that will route the call via the dialplan. </p>
<div class="gmail_quote">Den 3 aug 2014 07:42 skrev &quot;Avi Marcus&quot; &lt;<a href="mailto:avi@avimarcus.net" target="_blank">avi@avimarcus.net</a>&gt;:<div><div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div dir="ltr">You can originate a call to the dialplan, e.g. from the <a href="http://wiki.freeswitch.org/wiki/Mod_commands#originate" target="_blank">docs</a>:<div><br></div><div><p style="margin:0.4em 0px 0.5em;line-height:19.200000762939453px;color:rgb(0,0,0);font-family:sans-serif;font-size:13px">




Here&#39;s an example of originating a call to an extension in a different context than &#39;default&#39; (required for the FreePBX which uses context_1, context_2, etc.):</p><pre style="font-family:monospace,Courier;padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);line-height:1.3em;font-size:13px;background-color:rgb(249,249,249)">



   originate sofia/internal/<a href="mailto:2001@foo.com" target="_blank">2001@foo.com</a> 3001 xml context_3</pre></div><div class="gmail_extra"><br></div><div class="gmail_extra">However, you have to have a valid A leg - which seems to have to be a SIP destination.</div>




<div class="gmail_extra">Otherwise, you can create a lua or JS ivr and have that be your A-leg and make outbound calls.</div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:small">-Avi<br>




</span></div></div>
<br><br><div class="gmail_quote">On Sun, Aug 3, 2014 at 6:19 AM, Clive Lansink <span dir="ltr">&lt;<a href="mailto:clive@lansink.co.nz" target="_blank">clive@lansink.co.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




Hello Freeswitch users.<br>
<br>
Currently when I originate a call in my IVR application, I execute the API originate command like this:<br>
api originate {variable1=data,variable2=data}sofia/gateway/outbound/&lt;number&gt; &amp;park() xml default<br>
So yes I have a gateway called outbound and this originates a call by dialling the specified number on that gateway and parking it. I get the UUID and can then do stuff with it.<br>
<br>
But what I really want to do is originate a call by putting the specified phone number through the dialplan so Freeswitch can work out which endpoint to use. I am sure this must be possible but I can&#39;t figure out how to do it.<br>





<br>
Just to summarise, I want to originate a call to a number which might be a local extension or it might be a number that is reached through a gateway. Why can&#39;t I do something like:<br>
api originate {variable1=data,variable2=data}&lt;number&gt; &amp;park() xml default<br>
I want Freeswitch to work out which Sofia profile and endpoint to use. I want Freeswitch to park the call in the same way as above and give me the UUID. Is this possible?<br>
<br>
Can anyone help with this please?<br>
<br>
Thank you.<br>
<br>
<br>
Clive Lansink<br>
Email: <a href="mailto:Clive@Lansink.Co.NZ" target="_blank">Clive@Lansink.Co.NZ</a><br>
Phone: <a href="tel:%2B64%209%20520-4242" value="+6495204242" target="_blank">+64 9 520-4242</a><br>
Mobile: <a href="tel:%2B64%2021%20663-999" value="+6421663999" target="_blank">+64 21 663-999</a><br>
Fax: <a href="tel:%2B64%2021%20789-150" value="+6421789150" target="_blank">+64 21 789-150</a><br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div></div></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" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>