We are experiencing some problems with bind_digit_action. We are trying to get a notification of the digits pressed by the bleg of a bridged call. Our simple test dialplan is the following: <extension name="log_bind_digit_action"> <condition field="destination_number" expression="^MYLOG$"/> <action application="log" data="INFO dtmf ok"/> </extension> <extension name="setup_bind_digit_action"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="bind_digit_action" data="myrealm,*12,exec:execute_extension,MYLOG"/> </extension> <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="start_dtmf"/> <action application="export" data="execute_on_answer_1=start_dtmf"/>--> <action application="export" data="execute_on_answer_2=execute_extension MYSETUP"/> <action application="digit_action_set_realm" data="myrealm"/> <action application="bridge" data="sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension> We can use only inband DTMF. Here you can find the log of a call (IPs are obscured for security) http://pastebin.com/j8pBFVDL Any hint on why the extension MYLOG is not executed? Maybe we are missing something obvious.. Thanks Igor Cappello
You need to set the digit action realm: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_digit_action_set_realm -MC On Tue, Feb 26, 2013 at 7:13 AM, Igor Cappello <igor.cappello@edistar.com>wrote:
We are experiencing some problems with bind_digit_action. We are trying to get a notification of the digits pressed by the bleg of a bridged call.
Our simple test dialplan is the following:
<extension name="log_bind_digit_action"> <condition field="destination_number" expression="^MYLOG$"/> <action application="log" data="INFO dtmf ok"/> </extension>
<extension name="setup_bind_digit_action"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="bind_digit_action" data="myrealm,*12,exec:execute_extension,MYLOG"/> </extension>
<extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="start_dtmf"/> <action application="export" data="execute_on_answer_1=start_dtmf"/>--> <action application="export" data="execute_on_answer_2=execute_extension MYSETUP"/> <action application="digit_action_set_realm" data="myrealm"/> <action application="bridge" data="sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension>
We can use only inband DTMF.
Here you can find the log of a call (IPs are obscured for security)
Any hint on why the extension MYLOG is not executed? Maybe we are missing something obvious..
Thanks Igor Cappello
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Please use http://pastebin.freeswitch.org/ On Tue, Feb 26, 2013 at 12:42 PM, Michael Collins <msc@freeswitch.org> wrote:
You need to set the digit action realm: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_digit_action_set_realm
-MC
We managed to make it work, specifying the "peer" parameter in the data attribute of application bind_digit_action. Here's the working extension <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/> <action application="bridge" data="{execute_on_answer='start_dtmf'}sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension> And here's the execution log http://pastebin.freeswitch.org/20635 We now face a related issue, though: we need to specify an extension to be executed on the bleg. Using execute_on_answer='execute_extension ...' seems to be the way to go, but we did not manage to make it work. Here are the extensions <extension name="setup_bind_digit_action"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> <action application="start_dtmf"/> </extension> <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/> <action application="bridge" data="{execute_on_answer='execute_extension MYSETUP XML public'}sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension> And here's the execution log: the extension MYSETUP doesn't seem to be executed properly on the bleg of the bridged call. http://pastebin.freeswitch.org/20636 Could you give us a hint? Thanks for your time, Igor Cappello
Please use http://pastebin.freeswitch.org/
On Tue, Feb 26, 2013 at 12:42 PM, Michael Collins <msc@freeswitch.org> wrote:
You need to set the digit action realm: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_digit_action_set_realm
-MC
It looks to me like your "MYSETUP" extension is getting executed on the answer: 1. 2013-02-27 09:24:08.511899 [NOTICE] sofia.c:6326 Channel [ sofia/external/723331] has been answered 2. EXECUTE sofia/external/723331 execute_extension(MYSETUP XML public) 3. 2013-02-27 09:24:08.511899 [INFO] mod_dialplan_xml.c:557 Processing Igor Cappello <ica>->MYSETUP in context public <snip> 1. Dialplan: sofia/external/723331 Regex (PASS) [setup_bind_digit_action]destination_number (MYSETUP) =~ /^MYSETUP$/ break=on-false 2. 2013-02-27 09:24:08.511899 [NOTICE] switch_core_session.c:2788Execute set (outside_call=true) 3. EXECUTE sofia/external/723331 set(outside_call=true) 4. 2013-02-27 09:24:08.511899 [DEBUG] mod_dptools.c:1344 sofia/external/ 723331 SET [outside_call]=[true] 5. 2013-02-27 09:24:08.511899 [NOTICE] switch_core_session.c:2788Execute set (RFC2822_DATE=${strftime(%a, %d %b %Y %T %z)}) 6. EXECUTE sofia/external/723331 set(RFC2822_DATE=Wed, 27 Feb 2013 09:24: 08 +0100) It looks like your MYSETUP extension has just two "set" apps and that's it. -MC On Wed, Feb 27, 2013 at 1:01 AM, Igor Cappello <igor.cappello@edistar.com>wrote:
We managed to make it work, specifying the "peer" parameter in the data attribute of application bind_digit_action.
Here's the working extension <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/>
<action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/>
<action application="bridge" data="{execute_on_answer='start_dtmf'}sofia/gateway/voipcard1/723331"/>
<action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension>
And here's the execution log http://pastebin.freeswitch.org/20635
We now face a related issue, though: we need to specify an extension to be executed on the bleg. Using execute_on_answer='execute_extension ...' seems to be the way to go, but we did not manage to make it work.
Here are the extensions
<extension name="setup_bind_digit_action"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> <action application="start_dtmf"/> </extension>
<extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/> <action application="bridge" data="{execute_on_answer='execute_extension MYSETUP XML public'}sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension>
And here's the execution log: the extension MYSETUP doesn't seem to be executed properly on the bleg of the bridged call. http://pastebin.freeswitch.org/20636
Could you give us a hint?
Thanks for your time, Igor Cappello
Please use http://pastebin.freeswitch.org/
On Tue, Feb 26, 2013 at 12:42 PM, Michael Collins <msc@freeswitch.org> wrote:
You need to set the digit action realm:
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_digit_action_set_realm
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Freeswitch writes in the log that it's processing the extension MYSETUP. The extension MYSETUP is: <extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> </extension> I'd expect that in the log, after the following lines, 1. EXECUTE sofia/external/ 723331 execute_extension ( MYSETUP XML public ) 2. 2013 -02 -27 09 : 24 : 08.511899 [ INFO ] mod_dialplan_xml.c: 557 Processing Igor Cappello <ica>->MYSETUP in context public Freeswitch should write an INFO log message with text "MYSETUP exec". The log message actually is not written. It seems that Freeswitch "processes" the extension but actually doesn't execute it... Thank you Denis ----- Messaggio originale ----- Da: "Michael Collins" <msc@freeswitch.org> A: "FreeSWITCH Users Help" <freeswitch-users@lists.freeswitch.org> Inviato: Giovedì, 28 febbraio 2013 1:26:32 Oggetto: Re: [Freeswitch-users] Problem setting up bind_digit_action It looks to me like your "MYSETUP" extension is getting executed on the answer: 1. 2013 -02 -27 09 : 24 : 08.511899 [ NOTICE ] sofia.c: 6326 Channel [ sofia/external/ 723331 ] has been answered 2. EXECUTE sofia/external/ 723331 execute_extension ( MYSETUP XML public ) 3. 2013 -02 -27 09 : 24 : 08.511899 [ INFO ] mod_dialplan_xml.c: 557 Processing Igor Cappello <ica>->MYSETUP in context public <snip> 1. Dialplan: sofia/external/ 723331 Regex ( PASS ) [ setup_bind_digit_action ] destination_number ( MYSETUP ) =~ /^MYSETUP$/ break=on-false 2. 2013 -02 -27 09 : 24 : 08.511899 [ NOTICE ] switch_core_session.c: 2788 Execute set ( outside_call=true ) 3. EXECUTE sofia/external/ 723331 set ( outside_call=true ) 4. 2013 -02 -27 09 : 24 : 08.511899 [ DEBUG ] mod_dptools.c: 1344 sofia/external/ 723331 SET [ outside_call ] = [ true ] 5. 2013 -02 -27 09 : 24 : 08.511899 [ NOTICE ] switch_core_session.c: 2788 Execute set ( RFC2822_DATE=$ { strftime ( %a, %d %b %Y %T %z ) } ) 6. EXECUTE sofia/external/ 723331 set ( RFC2822_DATE=Wed, 27 Feb 2013 09 : 24 : 08 +0100 ) It looks like your MYSETUP extension has just two "set" apps and that's it. -MC On Wed, Feb 27, 2013 at 1:01 AM, Igor Cappello < igor.cappello@edistar.com > wrote: We managed to make it work, specifying the "peer" parameter in the data attribute of application bind_digit_action. Here's the working extension <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/> <action application="bridge" data="{execute_on_answer='start_dtmf'}sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension> And here's the execution log http://pastebin.freeswitch.org/20635 We now face a related issue, though: we need to specify an extension to be executed on the bleg. Using execute_on_answer='execute_extension ...' seems to be the way to go, but we did not manage to make it work. Here are the extensions <extension name="setup_bind_digit_action"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> <action application="start_dtmf"/> </extension> <extension name="set binding action"> <condition field="context" expression="public"/> <condition field="destination_number" expression="^test_bind_dtmf$"> <action application="log" data="INFO extension callback"/> <action application="bind_digit_action" data="test,00,exec:log,INFO TEST,peer"/> <action application="digit_action_set_realm" data="test"/> <action application="bridge" data="{execute_on_answer='execute_extension MYSETUP XML public'}sofia/gateway/voipcard1/723331"/> <action application="log" data="INFO extension callback . Originate terminated"/> </condition> </extension> And here's the execution log: the extension MYSETUP doesn't seem to be executed properly on the bleg of the bridged call. http://pastebin.freeswitch.org/20636 Could you give us a hint? Thanks for your time, Igor Cappello
Please use http://pastebin.freeswitch.org/
On Tue, Feb 26, 2013 at 12:42 PM, Michael Collins < msc@freeswitch.org > wrote:
You need to set the digit action realm: http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_digit_action_set_realm
-MC
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com 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 Thu, Feb 28, 2013 at 12:20 AM, Denis Gasparin <denis.gasparin@edistar.com
wrote:
The extension MYSETUP is: <extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> </extension>
I'm rather new at this, so I could be wrong, but I believe an action must be contained inside a condition. So extension from above should be: <extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"> <action application="log" data="INFO MYSETUP exec"/> </condition> </extension> -- Steve
Sometimes the new eye is the one that sees the obvious. You are quite correct. An action MUST be inside a condition, no exceptions. I suspect your edited version of the condition block will function as the OP hopes it would. -MC On Thu, Feb 28, 2013 at 10:05 AM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
On Thu, Feb 28, 2013 at 12:20 AM, Denis Gasparin < denis.gasparin@edistar.com> wrote:
The extension MYSETUP is: <extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> </extension>
I'm rather new at this, so I could be wrong, but I believe an action must be contained inside a condition. So extension from above should be:
<extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"> <action application="log" data="INFO MYSETUP exec"/> </condition> </extension>
-- Steve
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
In Italy the proverb says: four eyes are better than two :-) Yes, you're right! Thank you very much for the .. eyes... ehm help! :-) Denis Il giorno 01/mar/2013, alle ore 02:07, Michael Collins <msc@freeswitch.org> ha scritto:
Sometimes the new eye is the one that sees the obvious. You are quite correct. An action MUST be inside a condition, no exceptions. I suspect your edited version of the condition block will function as the OP hopes it would.
-MC
On Thu, Feb 28, 2013 at 10:05 AM, Steven Schoch <schoch+freeswitch.org@xwin32.com> wrote:
On Thu, Feb 28, 2013 at 12:20 AM, Denis Gasparin <denis.gasparin@edistar.com> wrote:
The extension MYSETUP is: <extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"/> <action application="log" data="INFO MYSETUP exec"/> </extension>
I'm rather new at this, so I could be wrong, but I believe an action must be contained inside a condition. So extension from above should be:
<extension name="MYSETUP_EXTENSION"> <condition field="destination_number" expression="^MYSETUP$"> <action application="log" data="INFO MYSETUP exec"/> </condition> </extension>
-- Steve
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
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 (5)
-
Denis Gasparin
-
Igor Cappello
-
Michael Collins
-
Steven Schoch
-
Vik Killa