DTMF for calling cards

I’m working on a calling card system, with phpagi
my issue is

  1. After the customers dial a number and in a call, if they dial “*#” they can make another call

I don’t know how to detect the keypress when the customer is on a call and allow the customer to dial a new number.

try this from sangoma:
[x] ;x being your incoming context
exten => 1,1,Playback(digits/1)
exten => 1,n,WaitExten()
exten => 2,1,Playback(digits/2)
exten => 2,n,WaitExten()
exten => 3,1,Playback(digits/3)
exten => 3,n,WaitExten()
exten => 4,1,Playback(digits/4)
exten => 4,n,WaitExten()
exten => 5,1,Playback(digits/5)
exten => 5,n,WaitExten()
exten => 6,1,Playback(digits/6)
exten => 6,n,WaitExten()
exten => 7,1,Playback(digits/7)
exten => 7,n,WaitExten()
exten => 8,1,Playback(digits/8)
exten => 8,n,WaitExten()
exten => 9,1,Playback(digits/9)
exten => 9,n,WaitExten()
exten => 0,1,Playback(digits/0)
exten => 0,n,WaitExten()
exten => *,1,Playback(digits/star)
exten => *,n,WaitExten()
exten => #,1,Playback(digits/pound)
exten => #,n,WaitExten()

Hi ,
Thanks for the reply, but how to capture the dtmf after the Dial(…) application?, because after Dial the call is answered and whilst on the call if the customer press “*#” how to detect that and how to close the existing call and send the customer to another IVR where plays a sound “please enter the intl number” .

I just want to know how to detect the dtmf after the Dial . in AGI or normal

you can enable the dtmf log from logger.conf and set verbose higher, the debug info will be out.

Firstly look at configs/features.conf.sample

If that doesn’t help, your only other chances are “core show application dial” and changing the source code.

voi88 : I tried the logger , but how to capture the dtmf after the Dial application and while the call is in progress
david55 : I checked the features.conf, but my main issue is how to call a feature (if I create one) after the Dial? and even if I call how to disconnect the call but NOT hangup the customer, remeber its for calling card.

david have provided a good hint - featuremap section from features.conf (check voip-info.org/wiki/index.php … tures.conf for more info) specify codes to activate special function during a call - and this is your case - if I correctly understand your posts.

In order to check what codes are currently defined please post the output for the following Asterisk CLI command: