Help using SendDTMF() function.

jason955
Posts: 56
Member Since:
2008-03-18

I need my system to do the following: when a user dials a certain number, say 1, on the IVR, trixbox should dial an outside trunk via SIP and when the remote trunk answers, send the tone for the number 0, so the person is connected to the operator and the remote IVR is bypassed. I know that this can be done using the SendDTMF() function but I do not know how to go about doing so.

Currently, I have an IVR set up and the user can press 1 and be connected with the remote system but the user must manually dial 0, which I would like the system to do. Any help would be appreciated.

Thanks,
Jason



jason955
Posts: 56
Member Since:
2008-03-18
Anyone? Is there a way to

Anyone? Is there a way to do this without editing my extensions*.conf? Can I set up a custom destination? I just want to call a number and have the system send the dtmf tone 0, then connect the call.



ethans
Posts: 519
Member Since:
2007-01-16
Without actually seeing what

Without actually seeing what you are doing, I would do something like this:

/etc/asterisk/extensions_custom.conf

[senddtmf]
exten => s,1,Answer
exten => s,n,Dial(5555555555)
exten => s,n,SendDTMF(ww0)

Change 5555555555 to the number you are dialing. Then create a custom destination pointing to senddtmf,s,1 and set your IVR destination to this custom destination.



jason955
Posts: 56
Member Since:
2008-03-18
That's exactly what I want.

That's exactly what I want. I did as you said, however after the system sends the dial command, I get the following message and the line hangs up: == Spawn extension (calljason, s, 4) exited non-zero on 'SIP/xxxxxxxxxxxxx'

Any ideas?



ethans
Posts: 519
Member Since:
2007-01-16
Try

Try Dial(Local/##########@from-internal/n)

Post your full dialplan. My example didn't have a fourth priority.



jason955
Posts: 56
Member Since:
2008-03-18
[calljason] exten =>

[calljason]
exten => s,1,SayDigits(1)
exten => s,n,Answer
exten => s,n,SayDigits(2)
exten => s,n,Dial(Local/91310xxxxxxx@from-internal/n)
exten => s,n,SayDigits(3)
exten => s,n,Wait(5)
exten => s,n,SayDigits(4)
exten => s,n,SendDTMF(0)
exten => s,n,SayDigits(5)

I got it to dial using the way you indicated and the phone rings and connects but goes no further.



ethans
Posts: 519
Member Since:
2007-01-16
Try

Try this:
Dial(Local/91310xxxxxxx@from-internal/n,,D(ww0)
and remove the senddtmf

You can also try adding more w's to the above if the timing is off



jason955
Posts: 56
Member Since:
2008-03-18
That seems to work better.

That seems to work better. Is there a way to do it where the caller isn't connected until after the tones are sent(I don't want the caller to hear the IVR that I am trying to bypass)?



ethans
Posts: 519
Member Since:
2007-01-16
It should already work like

It should already work like that:

D(digits): After the called party answers, send digits as a DTMF stream, then connect the call to the originating channel.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.