[Freeswitch-dev] hangup_after_bridge and intercept application

Juan Jose Comellas juanjo at comellas.org
Wed Aug 13 14:16:04 EDT 2008


According to the way I understand the hangup_after_bridge variable works, I
think what you're doing is correct. There is another way to write the
extension so that the A leg of the bridge can continue working after the B
leg hangs up and the bridge is broken. You should rewrite the "intercept"
extension in the following way:

      <extension name="intercept">
        <condition field="destination_number" expression="2101">
          <action application="answer" />
          <action application="set" data="exec_after_bridge_app=transfer"/>
          <action application="set"
data="exec_after_bridge_arg=2102"/>
          <action application="intercept"
data="eb13f47c-6960-11dd-b3aa-65ce53a0ab35"/>
        </condition>
      </extension>

AFAIK, the "exec_after_bridge_app" variable only works for the A leg of a
channel. It would be nice if it also worked for the B leg when the A leg
hangs up.



On Wed, Aug 13, 2008 at 12:40 PM, Francisco de Ezcurra <
francisco at deezcurra.com.ar> wrote:

> Hi all
>
> I'm trying to transfer the a channel after the other leg hangup in a bridge
> created with the application 'intercept' using the flag
> hangup_after_bridge,
> but it seems not to be working. (Below are the steps I followed).
>
> Am i doing anything wrong ?
>
> Thanks in advance
> Panchi
>
>
>
> --------------------------------------------------------------------------------------
> 1) Make a call via mod_event_socket to a registered phone (here
> user2.fezcurra) and transfer the it to the extension 2100 (waiting) to wait
> for the other party.
>
>      api originate {hangup_after_bridge=false}sofia/default/user3.fezcurra
> 2100
>
>      Content-Type: api/response
>      Content-Length: 41
>
>     +OK 72a3cb6a-6943-11dd-b3aa-65ce53a0ab35
>
> 2) Set the UUID in the intercept action in the dialplan.
>
>    <action application="intercept"
> data="72a3cb6a-6943-11dd-b3aa-65ce53a0ab35"/>
>
> 3) Make a call with another phone to the extension 2101
>
> 4) Hangup the first call originated via mod_event_socket (phone registered
> as
> user2.fezcurra).
>
> Problem:
>         I expected the second phone to be transferred to the extension 2102
> and hear the audio and then hangup, but i never hear the audio and the
> channel is hungup when the bridge terminates.
>
>
> --------------------------------------------------------------------------------------
> Here are the extensions in the dialplan:
>
>      <extension name="waiting">
>        <condition field="destination_number" expression="2100">
>          <action application="fifo" data="myqueue in undef
> test/clientdata/system/audios/male/en_US/misc/HoldMusic.wav"/>
>        </condition>
>      </extension>
>
>      <extension name="intercept">
>        <condition field="destination_number" expression="2101">
>          <action application="answer" />
>          <action application="set" data="hangup_after_bridge=false"/>
>          <!-- This is the UUID returned in the originate (step 1) -->
>          <action application="intercept"
> data="72a3cb6a-6943-11dd-b3aa-65ce53a0ab35"/>
>          <action application="transfer" data="2102"/>
>        </condition>
>      </extension>
>
>      <extension name="hold_music">
>        <condition field="destination_number" expression="2102">
>          <action application="playback"
> data="test/clientdata/system/audios/male/en_US/misc/HoldMusic.wav"/>
>          <action application="hangup" />
>        </condition>
>      </extension>
>
> _______________________________________________
> Freeswitch-dev mailing list
> Freeswitch-dev at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20080813/5b766043/attachment.html 


More information about the Freeswitch-dev mailing list