Skip to content

Instantly share code, notes, and snippets.

@maximiliano
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maximiliano/cdeade0ba7d1fb59fc89 to your computer and use it in GitHub Desktop.
Save maximiliano/cdeade0ba7d1fb59fc89 to your computer and use it in GitHub Desktop.
Freeswitch call timeout
<!-- Trying to set a timeout on a call -->
<extension name="rule-xxx">
<condition field="destination_number" expression="^xxx$" break="on-true">
<action application="set" data="ringback=${us-ring}"/>
<action application="set" data="transfer_ringback=${us-ring}"/>
<action application="set" data="external_call=true"/>
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<!-- Prints: EXECUTE sofia/internal/100@172.16.7.24 log(INFO IGNORE_EARLY_MEDIA: ) -->
<action application="log" data="INFO IGNORE_EARLY_MEDIA: ${ignore_early_media}"/>
<action application="set" data="call_timeout=10"/>
<action application="bridge" data="sofia/gateway/mytrunk/$1"/>
</condition>
</extension>
<!-- I also tried substituting the set or bridge above by this: -->
<action application="set" data="originate_timeout=10"/>
<action application="bridge" data="{originate_timeout=10}sofia/gateway/mytrunk/$1"/>
<action application="bridge" data="{call_timeout=10}sofia/gateway/mytrunk/$1"/>
<action application="bridge" data="{leg_timeout=10}sofia/gateway/mytrunk/$1"/>
<action application="bridge" data="[leg_timeout=10]sofia/gateway/mytrunk/$1"/>
<!--
In every time the timeout is being set as I see it on the log.
Like this: 2014-09-30 17:53:32.990064 [DEBUG] switch_event.c:1688 Parsing variable [call_timeout]=[10]
Or this: EXECUTE sofia/internal/100@172.16.7.24 bridge({call_timeout=10}sofia/gateway/mytrunk/xxxx)
Used this as reference:
https://wiki.freeswitch.org/wiki/Variable_call_timeout
https://wiki.freeswitch.org/wiki/Variable_originate_timeout
https://wiki.freeswitch.org/wiki/Variable_leg_timeout
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment