Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 2

...

Expand
titleClick here to expand Table of Contents
Panel
borderColorlightgray
bgColor#f7f7f7
borderWidth1
borderStyledotted

Table of Contents
maxLevel3
outlinetrue
indent1em
stylenone
excludeAbout
stylenone
printablefalse

Recipe 1

Before you call bridge add another action that executes the sched_hangup application.

Code Block
themeEmacs
languagexml
themeEmacs
<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.)

Code Block
themeEmacs
languagexml
themeEmacs
<action application="sched_hangup" data="+60 allotted_timeout"/> 

...

If you follow recipe 1 and your dialplan looks like:

Code Block
themeEmacs
languagexml
themeEmacs
<action application="sched_hangup" data="+60 alloted_timeout"/>
<action application="bridge" data="sofia/external/1234567@10.10.10.10"/> 

...

If you want to ensure 60 seconds of '''talk''' time, schedule hangup at the moment of answering:

Code Block
themeEmacs
languagexml
themeEmacs
<action application="set" data="execute_on_answer=sched_hangup +60 alloted_timeout" />
<action application="bridge" data="sofia/external/1234567@10.10.10.10" /> 

If your a-leg call has already been answered, e.g. with an IVR and you want to limit on the B-leg, then use: ''note: api_on_answer, not execute_on_answer''

Code Block
themeEmacs
languagexml
themeEmacs
<action application="export" data="nolocal:api_on_answer=sched_hangup +60 ${uuid} alloted_timeout" />
<action application="bridge" data="sofia/external/1234567@10.10.10.10" /> 

...