DTMF logging while transferring incoming call to outbound

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

DTMF logging while transferring incoming call to outbound

Postby nasirjavaid » Mon Jan 18, 2016 10:09 am

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!
Nasir Javaid.
Voip Engineer.
nasirjavaid
Oldsterisk
 
Posts: 83
Joined: Fri May 14, 2010 7:56 am
Location: USA

Re: DTMF logging while transferring incoming call to outbound

Postby david55 » Mon Jan 18, 2016 3:07 pm

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
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: DTMF logging while transferring incoming call to outbound

Postby nasirjavaid » Tue Jan 19, 2016 12:41 am

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 :(

Cheers!
Nasir Javaid.
Voip Engineer.
nasirjavaid
Oldsterisk
 
Posts: 83
Joined: Fri May 14, 2010 7:56 am
Location: USA

Re: DTMF logging while transferring incoming call to outbound

Postby david55 » Tue Jan 19, 2016 1:54 am

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.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: DTMF logging while transferring incoming call to outbound

Postby nasirjavaid » Tue Jan 19, 2016 2:38 am

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!
Nasir Javaid.
Voip Engineer.
nasirjavaid
Oldsterisk
 
Posts: 83
Joined: Fri May 14, 2010 7:56 am
Location: USA

Re: DTMF logging while transferring incoming call to outbound

Postby nasirjavaid » Tue Jan 19, 2016 3:42 am

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

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).

Image
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 ?
Nasir Javaid.
Voip Engineer.
nasirjavaid
Oldsterisk
 
Posts: 83
Joined: Fri May 14, 2010 7:56 am
Location: USA

Re: DTMF logging while transferring incoming call to outbound

Postby nasirjavaid » Tue Jan 19, 2016 12:37 pm

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. -
Nasir Javaid.
Voip Engineer.
nasirjavaid
Oldsterisk
 
Posts: 83
Joined: Fri May 14, 2010 7:56 am
Location: USA


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron