[Freeswitch-users] using the originate command

Christopher Hall chris.hall at vividapps.co.uk
Thu Jul 11 20:09:06 MSD 2013


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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130711/1573178b/attachment-0001.html 


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