Question

I try to configure FreeSwitch.

I wish to bridge a call and limits duration, for sample, max 30 seconds. How can i do it?

This configuration just allow call without limits.

<extension name="Test4">
  <condition field="destination_number" expression="^00(\d+)$">
    <action application="bridge" data="sofia/gate1/011$1@x.x.x.x"/>
  </condition>
</extension>

Or can it be done another way?

Was it helpful?

Solution

Maybe you have already figure it out, but here is answer just for reference.

Before bridge, set app:

<action application="sched_hangup" data="+60"/>
<action application="bridge" data="sofia/gate1/011$1@x.x.x.x"/>

But this will hangup after 60 seconds also including time for setting up call and ringing. If you want to hangup in 60 second after call is established than you need to execute directive on answer:

<action application="set" data="execute_on_answer=sched_hangup +60" />
<action application="bridge" data="sofia/gate1/011$1@x.x.x.x"/>

There are also few more details that you can read about it on FS wiki: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_sched_hangup

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top