[Freeswitch-dev] hangup_after_bridge and intercept application
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>
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
I've tried to do the same with the variables exec_after_bridge_app and exec_after_bridge_arg but i have a problem with them. As I could see the application set in the variable 'exec_after_bridge_app' is executed also when I use transfer to send both channels of the bridge to another extension and I only need to execute it if the other leg hangs up. Thanks Panchi On Wednesday 13 August 2008, Juan Jose Comellas wrote: 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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
try the original way you posted with latest trunk. On Wed, Aug 13, 2008 at 3:39 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
I've tried to do the same with the variables exec_after_bridge_app and exec_after_bridge_arg but i have a problem with them. As I could see the application set in the variable 'exec_after_bridge_app' is executed also when I use transfer to send both channels of the bridge to another extension and I only need to execute it if the other leg hangs up.
Thanks Panchi
On Wednesday 13 August 2008, Juan Jose Comellas wrote: 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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up. What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up. Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg. Thanks Panchi On Wednesday 13 August 2008, Anthony Minessale wrote: try the original way you posted with latest trunk. On Wed, Aug 13, 2008 at 3:39 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
I've tried to do the same with the variables exec_after_bridge_app and exec_after_bridge_arg but i have a problem with them. As I could see the application set in the variable 'exec_after_bridge_app' is executed also when I use transfer to send both channels of the bridge to another extension and I only need to execute it if the other leg hangs up.
Thanks Panchi
On Wednesday 13 August 2008, Juan Jose Comellas wrote: 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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set. BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call. On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
Yes, that is what i expected. But in my tests, when I hangup the A leg the B leg goes back to the FIFO it was on before the intercept. And when I hangup the B leg the A leg These are the step I followed. 1) Originate a call via MES and transfer it to the extension 2100 api originate {hangup_after_bridge=false}sofia/default/user3.fezcurra 2100 <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> 2) Make a call to the extension 2101 <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="goodbye"> <condition field="destination_number" expression="2102"> <action application="playback" data="test/clientdata/system/audios/male/en_US/misc/Goodbye.wav"/> <action application="hangup" /> </condition> </extension> 3) a) Hangup the call created in step 2). Result: the call originated in step 1 goes back to the FIFO of the extension 2100. b) Hangup the call originated in step 1) Result: the call created in step 2) in killed by FS. What I need is to send the leg that did not hang up to another extension. Is this possible with the dialplan i'm using or I should change it. Thanks Panchi On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set. BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call. On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
it's only possible for the extension who is calling intercept to have hangup_after_bridge=false set when the bridge terminates and if he's not already hungup and if the other side ended the call. Make sure you have latest trunk, this is a new patch. On Thu, Aug 14, 2008 at 4:00 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
Yes, that is what i expected. But in my tests, when I hangup the A leg the B leg goes back to the FIFO it was on before the intercept. And when I hangup the B leg the A leg
These are the step I followed.
1) Originate a call via MES and transfer it to the extension 2100
api originate {hangup_after_bridge=false}sofia/default/user3.fezcurra 2100
<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>
2) Make a call to the extension 2101
<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="goodbye"> <condition field="destination_number" expression="2102"> <action application="playback" data="test/clientdata/system/audios/male/en_US/misc/Goodbye.wav"/> <action application="hangup" /> </condition> </extension>
3) a) Hangup the call created in step 2). Result: the call originated in step 1 goes back to the FIFO of the extension 2100.
b) Hangup the call originated in step 1) Result: the call created in step 2) in killed by FS.
What I need is to send the leg that did not hang up to another extension. Is this possible with the dialplan i'm using or I should change it.
Thanks Panchi
On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set.
BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call.
On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra <
francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Anthony I was not answering the call originated via mod_event_socket so that was why it didn't work as I expected. My fault. :( I tried to use the -bleg with transfer but i could not figure out how to use it so used uuid_transfer like this and it is working as I need. <extension name="intercept"> <condition field="destination_number" expression="2101"> <action application="set" data="bleg=c0153280-6ad8-11dd-85e3-9108b1fae78b"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${bleg} 2102" /> <action application="intercept" data="${bleg}"/> <action application="transfer" data="2103" /> </condition> </extension> Is there any way to use the transfer application with -bleg in the dialplan ? If yes, how is the syntax ? Thanks in advance Panchi On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set. BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call. On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
<action application="transfer" data="-bleg 2103" /> if the call is currently in a bridge it will transfer the other side of the call instead of itself. also <action application="transfer" data="-both 2103" /> would transfer both legs of the call to the same ext. i.e a conference extension etc. On Fri, Aug 15, 2008 at 10:28 AM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
Anthony
I was not answering the call originated via mod_event_socket so that was why it didn't work as I expected. My fault. :(
I tried to use the -bleg with transfer but i could not figure out how to use it so used uuid_transfer like this and it is working as I need.
<extension name="intercept"> <condition field="destination_number" expression="2101"> <action application="set" data="bleg=c0153280-6ad8-11dd-85e3-9108b1fae78b"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${bleg} 2102" /> <action application="intercept" data="${bleg}"/> <action application="transfer" data="2103" /> </condition> </extension>
Is there any way to use the transfer application with -bleg in the dialplan ? If yes, how is the syntax ?
Thanks in advance Panchi
On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set.
BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call.
On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra <
francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The other leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
I don't understand how/when this line <action application="transfer" data="-both 2103" /> is executed if the channel is in a bridge. For example, in this case: ..... <action application="export" data="hangup_after_bridge=false"/> <action application="intercept" data="XXXX" /> <action application="transfer" data="2103" /> As I understood, the transfer is executed when the bleg hangs up. But if I need to transfer the bleg when the aleg hangs up, the only way i found is by using the api_hangup_hook variable. Like this: <action application="set" data="api_hangup_hook=uuid_transfer <BLEG_UUID> 2102" /> So, if what I'm saying is correct, how is possible for the leg A to execute the transfer with -bleg like below when it hangs up ? ...... <action application="intercept" data="XXXX" /> <action application="transfer" data="-bleg 2102" /> BTW, the api_hangup_hook works sometimes and sometimes not. I could not determine exactly when it works and when it doesn't. I'm attaching two logs where I did exactly the same things and in one case it worked and in the other case not. Here are the dialplan extensions I used to test: <extension name="waiting"> <condition field="destination_number" expression="2100"> <action application="answer" /> <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="set" data="pbx_bleg=d3690c32-7053-11dd-ba2d-cf2d1d866b01"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${pbx_bleg} 2102" /> <action application="intercept" data="${pbx_bleg}"/> <action application="transfer" data="2103" /> </condition> </extension> <extension name="goodbye"> <condition field="destination_number" expression="2102"> <action application="fifo" data="myqueue in undef test/clientdata/system/audios/male/en_US/misc/Goodbye.wav"/> </condition> </extension> <extension name="welcome"> <condition field="destination_number" expression="2103"> <action application="fifo" data="myqueue in undef test/clientdata/system/audios/male/en_US/misc/Welcome.wav"/> </condition> </extension> And here are the steps I followed in both cases: 1) With the phone registered as user1.fezcurra dial 2100 (the fifo). 2) Get the channel UUID and set it into the dialplan. 3) With the phone resgistered as user3.fezcurra dial 2101. (This will bridge both channels). 4) Hangup the phone registered as user3.fezcurra. Result: In some cases the phone registered as user1.fezcurra goes to the extension 2102 and in some cases it doesn't and it is hung up by FS. Is correct how I am using the api_hangup_hook variable? If not, how can I do what I need: "Transfer the leg that did not hangup to another extension" ? Thanks Panchi On Friday 15 August 2008, Anthony Minessale wrote: <action application="transfer" data="-bleg 2103" /> if the call is currently in a bridge it will transfer the other side of the call instead of itself. also <action application="transfer" data="-both 2103" /> would transfer both legs of the call to the same ext. i.e a conference extension etc. On Fri, Aug 15, 2008 at 10:28 AM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
Anthony
I was not answering the call originated via mod_event_socket so that was why it didn't work as I expected. My fault. :(
I tried to use the -bleg with transfer but i could not figure out how to use it so used uuid_transfer like this and it is working as I need.
<extension name="intercept"> <condition field="destination_number" expression="2101"> <action application="set" data="bleg=c0153280-6ad8-11dd-85e3-9108b1fae78b"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${bleg} 2102" /> <action application="intercept" data="${bleg}"/> <action application="transfer" data="2103" /> </condition> </extension>
Is there any way to use the transfer application with -bleg in the dialplan ? If yes, how is the syntax ?
Thanks in advance Panchi
On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set.
BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call.
On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra <
francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The
other
leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
More information: I was using the intercept application and after switching to uuid_bridge (called from javascript) the api_hangup_hook and hangup_after_bridge are working well now. When one leg hangs up, the other leg goes to the correct extension. <action application="set" data="api_hangup_hook=uuid_transfer ${pbx_bleg} 2102" /> <action application="javascrip" data="api_execute.js uuid_bridge ${uuid} ${pbx_bleg}"/> <action application="transfer" data="2103" /> Is there any difference between how both applications make the bridge ? Thanks Panchi On Friday 22 August 2008, Francisco de Ezcurra wrote: I don't understand how/when this line <action application="transfer" data="-both 2103" /> is executed if the channel is in a bridge. For example, in this case: ..... <action application="export" data="hangup_after_bridge=false"/> <action application="intercept" data="XXXX" /> <action application="transfer" data="2103" /> As I understood, the transfer is executed when the bleg hangs up. But if I need to transfer the bleg when the aleg hangs up, the only way i found is by using the api_hangup_hook variable. Like this: <action application="set" data="api_hangup_hook=uuid_transfer <BLEG_UUID> 2102" /> So, if what I'm saying is correct, how is possible for the leg A to execute the transfer with -bleg like below when it hangs up ? ...... <action application="intercept" data="XXXX" /> <action application="transfer" data="-bleg 2102" /> BTW, the api_hangup_hook works sometimes and sometimes not. I could not determine exactly when it works and when it doesn't. I'm attaching two logs where I did exactly the same things and in one case it worked and in the other case not. Here are the dialplan extensions I used to test: <extension name="waiting"> <condition field="destination_number" expression="2100"> <action application="answer" /> <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="set" data="pbx_bleg=d3690c32-7053-11dd-ba2d-cf2d1d866b01"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${pbx_bleg} 2102" /> <action application="intercept" data="${pbx_bleg}"/> <action application="transfer" data="2103" /> </condition> </extension> <extension name="goodbye"> <condition field="destination_number" expression="2102"> <action application="fifo" data="myqueue in undef test/clientdata/system/audios/male/en_US/misc/Goodbye.wav"/> </condition> </extension> <extension name="welcome"> <condition field="destination_number" expression="2103"> <action application="fifo" data="myqueue in undef test/clientdata/system/audios/male/en_US/misc/Welcome.wav"/> </condition> </extension> And here are the steps I followed in both cases: 1) With the phone registered as user1.fezcurra dial 2100 (the fifo). 2) Get the channel UUID and set it into the dialplan. 3) With the phone resgistered as user3.fezcurra dial 2101. (This will bridge both channels). 4) Hangup the phone registered as user3.fezcurra. Result: In some cases the phone registered as user1.fezcurra goes to the extension 2102 and in some cases it doesn't and it is hung up by FS. Is correct how I am using the api_hangup_hook variable? If not, how can I do what I need: "Transfer the leg that did not hangup to another extension" ? Thanks Panchi On Friday 15 August 2008, Anthony Minessale wrote: <action application="transfer" data="-bleg 2103" /> if the call is currently in a bridge it will transfer the other side of the call instead of itself. also <action application="transfer" data="-both 2103" /> would transfer both legs of the call to the same ext. i.e a conference extension etc. On Fri, Aug 15, 2008 at 10:28 AM, Francisco de Ezcurra < francisco@deezcurra.com.ar> wrote:
Anthony
I was not answering the call originated via mod_event_socket so that was why it didn't work as I expected. My fault. :(
I tried to use the -bleg with transfer but i could not figure out how to use it so used uuid_transfer like this and it is working as I need.
<extension name="intercept"> <condition field="destination_number" expression="2101"> <action application="set" data="bleg=c0153280-6ad8-11dd-85e3-9108b1fae78b"/> <action application="answer" /> <action application="export" data="hangup_after_bridge=false"/> <action application="set" data="api_hangup_hook=uuid_transfer ${bleg} 2102" /> <action application="intercept" data="${bleg}"/> <action application="transfer" data="2103" /> </condition> </extension>
Is there any way to use the transfer application with -bleg in the dialplan ? If yes, how is the syntax ?
Thanks in advance Panchi
On Thursday 14 August 2008, Anthony Minessale wrote: The extension that executed the intercept app is the one that will be able to move on in the dialplan after the call because it's the effective A leg and that is the extension that had a dialplan instruction set.
BTW, you can execute transfer with the -bleg option to perform the transfer on the opposite leg of the call.
On Thu, Aug 14, 2008 at 3:07 PM, Francisco de Ezcurra <
francisco@deezcurra.com.ar> wrote:
The fix works if i hangup the channel that makes the intercept. The
other
leg goes back to the fifo. But when i hangup the other leg the channel that made the intercept is hung up.
What I expect with this (ext. 2101) dialplan is that the channel that makes the intercept executes the transfer to 2102 when the other leg hangs up.
Is this possible? I can not use the variable api_hangup_hook on the channel created in the originate via MES because I don't know at that moment the other leg.
Thanks Panchi
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (3)
-
Anthony Minessale
-
Francisco de Ezcurra
-
Juan Jose Comellas