Simple examples to use the originate API command to initiate calls.
Originate Example 1
Courtesy of SwK:
Simplified originate usage template:
originate ALEG BLEG
The full template from the FreeSWITCH API command interpreter:
originate <call url> <exten>|&<application_name>(<app_args>) [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
This will make a call out to
sip:whatever@wherever with the Caller ID number set to 9005551212. After the A-leg supervises (is answered) it will send the call to the XML dialplan using context=default with the destination number of 19005551212 using the Caller ID name and number specified in the fields CALLER_ID_NAME and CALLER_ID_NUMBER.
Originate Example 2
This does the same thing as Example 1, but bypasses the dialplan and just sends the connected A-leg directly to the bridge app for B-leg.
You can also get fancy if you want to set additional channel variables in the originate command line: