[Freeswitch-users] using the originate command

Steven Ayre steveayre at gmail.com
Thu Jul 11 20:28:51 MSD 2013


api originate {originate_timeout=30}sofia/internal/1000%192.168.1.5 &socket(
127.0.0.1:10000 async full)****

** **

if I then modify the configuration of my server such that the public dial
plan contains the following****

** **

<include>****

  <extension name="Test">****

    <condition field="destination_number" expression="^10000$">****

      <action application="set" data="domain_name=$${domain}"/>****

      <action application="socket" data="127.0.0.1:10000 async full"/>****

    </condition>****

  </extension>****

</include>


You're calling 1000 but testing for 10000 - that extension'll never get
executed.





On 11 July 2013 17:09, Christopher Hall <chris.hall at vividapps.co.uk> wrote:

> I have written code to interact with FreeSWITCH using the event socket
> interface. I am originating calls from my code but my understanding of what
> is required is very limited. I would like to be able to originate a call
> and have the call I originate processed through the dial plan and I  don’t
> appear to be able to make this happen.****
>
> ** **
>
> An example of my problem:****
>
> ** **
>
> Using a default configuration on FreeSWITCH:****
>
> ** **
>
> If I originate a call as below with a SIP phone registered on extension
> 1000, my sockets server is called as expected.****
>
> ** **
>
> api originate {originate_timeout=30}sofia/internal/1000%192.168.1.5
> &socket(127.0.0.1:10000 async full)****
>
> ** **
>
> if I then modify the configuration of my server such that the public dial
> plan contains the following****
>
> ** **
>
> <include>****
>
>   <extension name="Test">****
>
>     <condition field="destination_number" expression="^10000$">****
>
>       <action application="set" data="domain_name=$${domain}"/>****
>
>       <action application="socket" data="127.0.0.1:10000 async full"/>****
>
>     </condition>****
>
>   </extension>****
>
> </include>****
>
> ** **
>
> And call 10000 from the SIP phone registered on 1000, again my sockets
> server is called.****
>
> ** **
>
> If however, I attempt to originate a call to 10000 from my code using ****
>
> ** **
>
> api originate {originate_timeout=30}sofia/internal/10000%192.168.XX.XXX
> &socket(127.0.0.1:10000 async full)****
>
> ** **
>
> I get the response.****
>
> ** **
>
> –ERR USER_NOT_REGISTERED ****
>
> ** **
>
> Is there a way in which I can originate a call from my code and have it
> processed in the same way as a call originated from a SIP phone?****
>
> ** **
>
> I would like to be able to do this so that my code can simply originate
> calls to numbers in the knowledge that FreeSWITCH will then route the call
> accordingly and that doesn’t appear to be the case at the moment as the
> originate does not appear to be processed by the dial plan.****
>
> ** **
>
> Thanks****
>
> ** **
>
> Chris.****
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130711/43de0e49/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list