[Freeswitch-users] How to get the action executed using bind_digit_action ?

Keith Laaks keith at laaks.com
Tue Dec 16 12:17:49 MSK 2014


Hi Freeswitchers. 

(Reposting under new thread - previous went to the wrong place.)

I am running "FreeSWITCH Version 1.5.15b+git~20141215T224714Z~0b414a8de8~64bit (git 0b414a8 2014-12-15 22:47:14Z 64bit)”  - updated this morning.


I have the following actions in an extension being executed:

	<action application="info"/>
	<action application="bind_digit_action" data="start_echo,##,exec:info,both,self"/>
	<action application="digit_action_set_realm" data="start_echo"/>
	<action application="delay_echo" data="10"/>

For the ‘info’ action at the top, I see the normal stuff printed in the console log:
	EXECUTE sofia/portaprod/27878881000 at 10.10.10.10 <mailto:sofia/portaprod/27878881000 at 10.10.10.10> info()
	2014-12-15 20:52:06.137537 [INFO] mod_dptools.c:1647 CHANNEL_DATA:
	Channel-State: [CS_EXECUTE]
	Channel-Call-State: [ACTIVE]
	Channel-State-Number: [4]
	Channel-Name: [sofia/portaprod/27878881000 at 10.17.180.204 <mailto:sofia/portaprod/27878881000 at 10.17.180.204>]
	Unique-ID: [8218a229-562d-4706-85a2-988d2bae0041]
	<cut cut>

Then follows the ‘bind_digit_action’ and ‘digit_action_set_realm’ to bind ‘##’ to executing the ‘info’ app.

The ‘echo' application at the very bottom works as per normal and I get my audio echoed back.

When I send “#9” - I get this in the log:
2014-12-15 21:13:32.777537 [DEBUG] switch_rtp.c:6045 RTP RECV DTMF #:800
2014-12-15 21:13:33.637537 [DEBUG] switch_rtp.c:6045 RTP RECV DTMF 9:800
2014-12-15 21:13:33.637537 [DEBUG] mod_dptools.c:132 sofia/portaprod/27878881000 at 10.10.10.10 <mailto:sofia/portaprod/27878881000 at 10.10.10.10> Digit NOT match binding [#9]

So all normal.

But here my issue. 

When I send ‘##’ - I only see this in the log:
2014-12-15 21:14:58.817537 [DEBUG] switch_rtp.c:6045 RTP RECV DTMF #:800
2014-12-15 21:14:59.317537 [DEBUG] switch_rtp.c:6045 RTP RECV DTMF #:800
2014-12-15 21:14:59.317537 [DEBUG] mod_dptools.c:188 sofia/portaprod/27878881000 at 10.10.10.10 <mailto:sofia/portaprod/27878881000 at 10.10.10.10> Digit match binding [exec:info][both]
2014-12-15 21:14:59.317537 [DEBUG] switch_core_session.c:1188 Send signal sofia/portaprod/27878881000 at 10.10.10.10 <mailto:sofia/portaprod/27878881000 at 10.10.10.10> [BREAK]

So its finding a match, but the app to be executed never does so. If it had, I would have seen the above ‘info’ stuff printed to the console.
I actually want the call transferred to another extension when the user enters ‘##’ - but that similarly does not happen. It seems I can’t get any action to actually be executed.

So what do I need to set first, such that the specified ‘action’ gets executed?

Hope someone can help me out here.

Looking at the code, I see that in mod_dptools.c there seems to be support for “blocking” and “non-blocking” execution modes. 
I figured out that to ‘activate’ the ’non-blocking mode the above action needs to change to:
	<action application="bind_digit_action" data="start_echo,##,exec[i]:info,both,self"/> 
[This sets ‘exec = 2’ such that ‘switch_core_session_execute_application’ is called - otherwise ‘switch_ivr_broadcast_in_thread’ is called.]

But when I try this, as soon as I send the ##, I get a core dump. 



Regards

Keith


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20141216/aee46eeb/attachment-0001.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list