Misc. Dialplan Tools sched hangup

From FreeSWITCH Wiki

Jump to: navigation, search
What is the equivalent in FreeSwitch for Asterisk?s Dial command setting:

S(n): Hangup the call n seconds AFTER called party picks up??

The sched_hangup application allows you to schedule a hangup action for a call.

before you call bridge add another action that executes the sched_hangup application

<action application="sched_hangup" data="+<seconds>[ <cause>]"/>

so to make the call last 1 minute and end with cause SWITCH_CAUSE_ALLOTTED_TIMEOUT (which happens to be the default so you can omit it unless you need another cause.)

<action application="sched_hangup" data="+60 alloted_timeout"/>

Also if you omit the '+' character the value will be considered the absolute epoch time you wish the call to end.


Once a call is already up you can do it from the sched_hangup api command from xmlrpc or the command cli.

do a show channels to get the uuid of the call then enter

sched_hangup +60 <uuid> alotted_timeout

all the params besides uuid have the same meaning as the dialplan app.


See also

Personal tools
Community