Terminate call leb b with DTMF


As make the terminate (hangup) th call leb B with DTMF like ‘#’ or ‘*’ and next priority in dialplan?


exten => _X.,1,NoOp()
exten => _X.,n,Dial(SIP/trunk1/111111,30) # If, i’m wish that, press ‘#’ and terminate leb B and jump next priority
exten => _X.,n,Dial(SIP/trunk2/111111,30)
exten => _X.,n,Dial(SIP/trunk3/111111,30)

exten => _X.,n,Hangup()

the priority can be 2 or N

it is possible?


There are some garbling or Google Translate problems here.

Do you want party B to be able to send a DTMF signal causing party B to be hungup and Party A to continue in the dialplan?

I think you will need the h and g options on Dial and suitable settings in features.conf. However, I’m not completely certain that this will not hang up party A as well.

It’s not google translator, it was my English my very bad English, sorry. I am now using deepl.com

I want part A to make a call, I want to finish part B through DTMF, if part B is a voice mailbox, I want to finish the call and go to the next one, if part B took a long time, press some dtmf and go to the next priority, these are example cases.

The mail box case sounds like you want Party A to request the hangup. I think it is likely that that will hangup party A, not party B. You’d need to try it. It would need the H option.

If party A is getting hung up, you can probably get round that by using a local channel, with the ."/n" option in the dialstring, to stop its being removed when the call is answered. If you put the H or h on the actual party B dial, and the g on the local channel Dial you should avoid any tendency to hangup party A.

I fully understand the local gray hair and options H, h, g,
but as I send the DTMF on the dial, if the channel or bridge is ringing or I am listening to the start of the voicemail.

note: when i hear the start of the voicemail the call has not been answered yet it is in the early media, after beep is that the call is answered.

but with the local channel and the option \n, have an idea that might work, thanks anyway.

Answering the local channel will take it out of early media, although start charging if the A side is remote.

I assume this is network provide voicemail, as end users wouldn’t normally have the luxury of using early media.