Session originate

From FreeSWITCH Wiki
Jump to: navigation, search

Originates a new call with an existing session object.


Warning

NOTE Deprecated!

 

Indeed! Avi Marcus couldn't figure out how to get this to work, so he used the following to access the API originate:

api = freeswitch.API()
api:execute("originate", "sofia/gateway/mygateway/123456789 9664")


Note: Use "session.originate" if no other options exist. You can originate calls using the session constructor:

session = freeswitch.Session("sofia/gateway/mygateway/123456789")
session.transfer(9664);

Usage

5389 and later

result = new_session.originate(session, dest[, timeout]);

Pre 5389

result = new_session.originate(session, dest[[[[[[[[[[, dialplan], context], cid_name], cid_num], network_addr], ani], aniii], rdnis], username], timeout]);
  • session - the session of the A leg of a call
  • dest - Dialplan compliant destination string ("sofia/sip/1234@10.10.2.55") including "," and "|" parms
  • dialplan - Name of dialplan module (default = "xml") such as xml, enum, etc.
  • context - context within the dialplan (default = "default")
  • cid_name - callerid name to use.
  • cid_num - callerid number to use.
  • network_addr - caller profile network address
  • ani - caller profile ANI
  • aniii - caller profile ANI-II
  • rdnis - caller profile RDNIS
  • username - caller profile username
  • timeout - Time out value in seconds

see also