Shah Hussain
Shah Hussain

Reputation: 11

Generating IVR on Asterisk without duration, get DTMF input from user and then process it

I hope cyber Asterisk gurus would be able to help me in this regard. I am trying to create an IVR filter using Asterisk. My desired configuration goal is:

1:When a user dial into the Asterisk, the user should hear IVR(but there should be no charging on initial IVR). I want to send the IVR in in initial 183 Session in progress without any duration starting on my phone.

2:Once a user input some digit via DTMF, then the call should be processed and charging etc should take place

I would really appreciate you guys input in this regard. Thanks

Upvotes: 0

Views: 1378

Answers (1)

gkocjan
gkocjan

Reputation: 735

You can use power of local channel combine with NoCDR. In beginning of your IVR use NoCDR() function, and after DTMF check use Dial to local channel contex with rest of yout logic.

[ivr]
exten => 100,1,NoCDR()
exten => 100,n(read),Read(variable)
exten => 100,n,GotoIf($[ ${variable} = 1 ]?go_1:read)
exten => 100,n(go_1)Dial(Local/${exten}@dtmf_1_logic)

[dtmf_1_logic]
.....

In that case you should have one CDR from dtmf_1_logic context with call duration with you are looking for

Upvotes: 1

Related Questions