outboundsocket mode, bridge and bind_digit_action doesn't work
Hi, I think I'm doing something wrong but I don't find a way to fix my problem : when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch) when doing same thing in XML dialplan it works (I found log in Freeswitch). I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8 For outbound socket, here what I'm doing with netcat : nc -l -v 8084 and the commands I passed to outbound socket : connect divert_events on sendmsg call-command: execute execute-app-name: answer sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000 With XML Dialplan below, same binding/bridge works !!!!! : <extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension> Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST") Thanks Michaël
Try using digit_action_set_realm to set the current realm to test before the bridge:
sendmsg call-command: execute execute-app-name: digit_action_realm_set execute-app-arg: test
Steve on iPhone On 4 Aug 2011, at 20:24, Michael Ricordeau <michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Just tested with digit_action_set_realm and doesnt work. If I set bind_digit_action and presses '00' before doing the bridge it works. During the bridge, doesn't work and after the bridge works again. Here is a pastebin : http://pastebin.freeswitch.org/16989 I found some difference in FS logs For outbound eventsocket, we have : 2011-08-05 01:26:07.403250 [DEBUG] switch_rtp.c:3302 RTP RECV DTMF 0:800 2011-08-05 01:26:07.403250 [DEBUG] switch_ivr_bridge.c:391 Send signal sofia/internal/sip:1001@81.220.86.183:59445 [BREAK] 2011-08-05 01:26:07.423252 [DEBUG] switch_rtp.c:2328 Send start packet for [0] ts=3214267546 dur=160/160/800 seq=11501 2011-08-05 01:26:07.463253 [DEBUG] switch_rtp.c:2264 Send middle packet for [0] ts=3214267546 dur=320/320/800 seq=11502 2011-08-05 01:26:07.503242 [DEBUG] switch_rtp.c:2264 Send middle packet for [0] ts=3214267546 dur=480/480/800 seq=11503 2011-08-05 01:26:07.543244 [DEBUG] switch_rtp.c:2264 Send middle packet for [0] ts=3214267546 dur=640/640/800 seq=11504 2011-08-05 01:26:07.583245 [DEBUG] switch_rtp.c:3302 RTP RECV DTMF 0:800 And for XML Dialplan : 2011-08-05 01:26:51.053768 [DEBUG] switch_rtp.c:3302 RTP RECV DTMF 0:800 2011-08-05 01:26:51.553793 [DEBUG] switch_rtp.c:3302 RTP RECV DTMF 0:800 2011-08-05 01:26:51.553793 [DEBUG] mod_dptools.c:151 sofia/internal/1000@46.102.242.62 Digit match binding [exec:log][NOTICE TEST] Le Thu, 4 Aug 2011 22:39:52 +0100, Steven Ayre <steveayre@gmail.com> a écrit :
Try using digit_action_set_realm to set the current realm to test before the bridge:
sendmsg call-command: execute execute-app-name: digit_action_realm_set execute-app-arg: test
Steve on iPhone
On 4 Aug 2011, at 20:24, Michael Ricordeau <michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Michael, I think the bridge app is clearing things out. I got it to work by bridging first and then doing the BDA stuff: connect sendmsg call-command: execute execute-app-name: answer sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1007 sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,*0,exec:log,NOTICE TEST sendmsg call-command: execute execute-app-name: digit_action_set_realm execute-app-arg: test Let me know if that works for you. -MC On Thu, Aug 4, 2011 at 12:24 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi Michael, it works with the BDA set after bridge ! Thanks for the quick and perfect answer =) See you at Cluecon next week ! Michael Le Fri, 5 Aug 2011 11:31:03 -0700, Michael Collins <msc@freeswitch.org> a écrit :
Michael,
I think the bridge app is clearing things out. I got it to work by bridging first and then doing the BDA stuff:
connect
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1007
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,*0,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: digit_action_set_realm execute-app-arg: test
Let me know if that works for you. -MC
On Thu, Aug 4, 2011 at 12:24 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Well so why bridge in outbound eventsocket is clearing BDA and not in dialplan ? (just for my knowledge) Is it because dialplan is "preprocessed" before executing commands ? Le Fri, 5 Aug 2011 21:31:05 +0200, Michael Ricordeau <michael.ricordeau@gmail.com> a écrit :
Hi Michael,
it works with the BDA set after bridge !
Thanks for the quick and perfect answer =)
See you at Cluecon next week !
Michael
Le Fri, 5 Aug 2011 11:31:03 -0700, Michael Collins <msc@freeswitch.org> a écrit :
Michael,
I think the bridge app is clearing things out. I got it to work by bridging first and then doing the BDA stuff:
connect
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1007
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,*0,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: digit_action_set_realm execute-app-arg: test
Let me know if that works for you. -MC
On Thu, Aug 4, 2011 at 12:24 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Fri, Aug 5, 2011 at 12:47 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Well so why bridge in outbound eventsocket is clearing BDA and not in dialplan ? (just for my knowledge)
Is it because dialplan is "preprocessed" before executing commands ?
I'm not sure. I discovered it when I was looking for an alternative way to set the BDA on the channel. I was using uuid_bridge <uuid> bind_digit_action::exec:log,foo,etc. and I noticed the same thing happen - if I did it prior to the bridge then it didn't work. Tony can probably tell us if this is a bug, feature, expected operation, etc. -MC
Shouldn't be, they're applications so executed one at a time. Steve on iPhone On 5 Aug 2011, at 20:47, Michael Ricordeau <michael.ricordeau@gmail.com> wrote:
Well so why bridge in outbound eventsocket is clearing BDA and not in dialplan ? (just for my knowledge)
Is it because dialplan is "preprocessed" before executing commands ?
Le Fri, 5 Aug 2011 21:31:05 +0200, Michael Ricordeau <michael.ricordeau@gmail.com> a écrit :
Hi Michael,
it works with the BDA set after bridge !
Thanks for the quick and perfect answer =)
See you at Cluecon next week !
Michael
Le Fri, 5 Aug 2011 11:31:03 -0700, Michael Collins <msc@freeswitch.org> a écrit :
Michael,
I think the bridge app is clearing things out. I got it to work by bridging first and then doing the BDA stuff:
connect
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1007
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,*0,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: digit_action_set_realm execute-app-arg: test
Let me know if that works for you. -MC
On Thu, Aug 4, 2011 at 12:24 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I wonder if it's a race condition of sorts where you're executing some apps before the others have finished. In the dialplan it wouldn't execute the next until the previous had finished, but I'm not sure whether sendmsg queues apps in the same way or tries executing them straight away. Have you tried waiting for the CHANNEL_EXECUTE_COMPLETE event before sending the next sendmsg? -Steve On 5 August 2011 21:31, Steven Ayre <steveayre@gmail.com> wrote:
Shouldn't be, they're applications so executed one at a time.
Steve on iPhone
On 5 Aug 2011, at 20:47, Michael Ricordeau <michael.ricordeau@gmail.com> wrote:
Well so why bridge in outbound eventsocket is clearing BDA and not in dialplan ? (just for my knowledge)
Is it because dialplan is "preprocessed" before executing commands ?
Le Fri, 5 Aug 2011 21:31:05 +0200, Michael Ricordeau <michael.ricordeau@gmail.com> a écrit :
Hi Michael,
it works with the BDA set after bridge !
Thanks for the quick and perfect answer =)
See you at Cluecon next week !
Michael
Le Fri, 5 Aug 2011 11:31:03 -0700, Michael Collins <msc@freeswitch.org> a écrit :
Michael,
I think the bridge app is clearing things out. I got it to work by bridging first and then doing the BDA stuff:
connect
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1007
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,*0,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: digit_action_set_realm execute-app-arg: test
Let me know if that works for you. -MC
On Thu, Aug 4, 2011 at 12:24 PM, Michael Ricordeau < michael.ricordeau@gmail.com> wrote:
Hi,
I think I'm doing something wrong but I don't find a way to fix my problem :
when executing bind_digit_action in an outbound socket and doing a bridge, digit action binding is not executed (no log in Freeswitch)
when doing same thing in XML dialplan it works (I found log in Freeswitch).
I have checked logs and in both cases, digit realm is set : Digit parser DPTOOLS: binding 00/test/0 callback: 0xb6ba1b00 data: 0x82eafe8
For outbound socket, here what I'm doing with netcat :
nc -l -v 8084
and the commands I passed to outbound socket :
connect
divert_events on
sendmsg call-command: execute execute-app-name: answer
sendmsg call-command: execute execute-app-name: bind_digit_action execute-app-arg: test,00,exec:log,NOTICE TEST
sendmsg call-command: execute execute-app-name: bridge execute-app-arg: user/1000
With XML Dialplan below, same binding/bridge works !!!!! :
<extension name="test"> <condition field="destination_number" expression="^0000$"> <action application="answer"/> <action application="bind_digit_action" data="test,00,exec:log,NOTICE TEST"/> <action application="bridge" data="user/1000"/> </condition> </extension>
Expected result is when A leg presses "00", a log notice "TEST" is printed in the logger but only works with XML dialplan. In outbound socket mode, I can hear the digits pressed on B leg but binding is not executed (no log notice "TEST")
Thanks
Michaël
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (3)
-
Michael Collins
-
Michael Ricordeau
-
Steven Ayre