DTMF logging while transferring incoming call to outbound

Hi,

On normal asterisk server I am able to log the dtmf dialled by caller successfully by enabling dtmf=>dtmf in logger.conf

Now scenario is that I have configured a voip trunk in my server and I am simply redirecting incoming call to another number where an IVR is running. I want to capture the dtmf digits pressed by callers.

Here is sip.conf

[general]
register => xxxxx:xxxxxxxx@sip.voipprovider.com/xxxxxxx

[voipprovider]
type=friend
secret=xxxxxx
username=xxxxx
fromuser=xxxxx
fromdomain=sip.voipprovider.com
host=sip.voipprovider.com
insecure=invite
directmedia=no
dtmfmode= rfc2833
context=fromvoipprovider

in extensions.conf

[fromvoipprovider]
exten => _.,1,Answer
exten => _.,n,Wait(1)
exten => _.,n,Dial(SIP/voipprovider/${EXTEN})

in logger.conf

console => notice,warning,error,debug,dtmf
messages => notice,warning,error,debug,dtmf
full => notice,warning,error,debug,verbose,dtmf,fax

so please help how can I capture the digits pressed by caller…

Cheers!

Introduce a non-optimising local channel, to break the native bridge, or you could try defining a feature code with a, b, c. or d digits, and enable that feature in the dial application

Thanks a lot dave for giving timely clue. I am going to test this scenario now. If there are any examples you can share then I will be obliged as I have to finish this by tonight :frowning:

Cheers!

It’s an abuse of the logging mechanism, which is there to help debug Asterisk’s own handling of DTMF, not to record DTMF in transit, so I doubt that many, if any, other people have tried this.

You are right but as its needed by the client so I have to opt it… Anyways I have managed to test it using dynamic features and calling AGI script which logs digit in text file.

But I see some notices whenever feature is activated as below

--  Feature Found: log8 exten: log8
-- Launched AGI Script /var/lib/asterisk/agi-bin/logdtmf.agi

[Jan 19 15:19:56] NOTICE[28239]: mtp.c:1993 mtp_thread_main: Full dahdi input buffer detected, incoming packets may have been lost on link ‘l1’ (count=64.
[Jan 19 15:19:56] NOTICE[28239]: mtp.c:1993 mtp_thread_main: Full dahdi input buffer detected, incoming packets may have been lost on link ‘l3’ (count=64.
[Jan 19 15:19:56] NOTICE[28239]: mtp.c:2063 mtp_thread_main: Empty Dahdi output buffer detected, outgoing packets may have been lost on link ‘l1’.
[Jan 19 15:19:56] NOTICE[28239]: mtp.c:2063 mtp_thread_main: Empty Dahdi output buffer detected, outgoing packets may have been lost on link ‘l3’.
– <SIP/smart2-0000001c>AGI Script logdtmf.agi completed, returning 0

I think I can also accomplish it using asterisk function FILE so can you suggest which approach is better? I think FILE is fast as its native?

I am using asterisk-1.8.25.0 and dahdi 2.9.0

the destination number is running IVR so is it possible that these digits will also reach to the ivr or only are limited to features?

Cheers!

UPDATE: Just tested and found that the digits that IVR accepts are not logged via features and other digits are logged fine :frowning:

Here is typical setup… Caller calls our number (111 for example) provided by voip provider and we redirect it to IVR server (222 for example).


http://prntscr.com/9s0ehi

Suppose IVR has 3 menu options ( press 1 for blah, press 2 for blah, press 3 for blah) so when we press either 1,2 or 3 then dtmf are passed to IVR and IVR moves forward but these dtmf are not detected by features application map which I setup. All other digits will be captured by features fine.

I think Local channel scenario will also have this problem???
I think I need sometype of event logger/sniffer setup like chanspy. Any idea how to implement it ?

EUREKA!!!

david55 your tips made my day man… using Local channel without optimization I am now able to log the dtmf to asterisk logs and also in AMI events.

Thanks a lot.

  • This thread can now be marked as solved by mods. -