Hang Up on DTMF 'A'

I’m trying to interface an analog FXO device on Asterisk with a PBX that has an FXS card. The PBX seems to expect to be able to send the DTMF digit ‘A’ to the FXO device and get a hang-up. Can someone help me figure out how to generate the correct rules in Asterisk to recognize and act on receiving this digit?

Thanks,
Nick

Howdy,

Have you created an “a” extension in the dialplan context in which incoming calls from the FXO device arrive?

Sorry…my original post wasn’t exactly clear about where I need this to happen. Here’s the scenario:

  • Call comes in from “Far End” to the Comdial PBX, let’s say to extension 1234
  • Comdial PBX rings handset, when there is no answer call is transferred to the voicemail station, a set of analog lines
  • The Comdial system has the FXS end, the Asterisk system has the FXO end
  • Call rings down to FXO end, Asterisk picks up the line.
  • The analog lines are directly associated with a single DID. This DID is a “Dialplan Injection” entry in FreePBX. The injection waits for five DTMF digits (four extension digits and one additional function digit), then routes the call to the appropriate voicemail box using the Macro command to send it to the VM macro for the specified station.
  • One in the voicemail box, one of two things happens: either the far end caller decides to hang up and try sometime later, or they leave a message. This is where it gets a little tricky. When the caller hangs up - either before or after leaving a message - Comdial does not hang up the loop; instead, it sends the DTMF digit A (or a) down to the FXO end (Asterisk end, in this case), expecting the FXO end to terminate the loop.
  • I’ve been unable thus far to get Asterisk to act on this digit. Asterisk simply keeps the line open and continues through the voicemail session, eventually terminating the call after 10 seconds of silence. In the case of the caller leaving a message, this isn’t a huge deal, as there’s a message there, anyway, and Asterisk actually trims the 10 seconds of silence. However, in the case of the caller hanging up without leaving a message, asterisk trims all but the first second of the call, leaving a 1 second message in the persons box. This is a bit annoying, as it means that every single time someone ends up in a user’s voicemail box, a message will be generated.

So, that’s why I need to deal with the DTMF digit ‘A’ - I need to be able to have whatever is running at the time interrupted by this digit and the call terminated. I’ve tried setting the disconnect feature to A, but this doesn’t seem to work. I’ve also tried creating a custom feature called “vmendcall” with the digit A and setting it in DYNAMIC_EXTENSIONS, but, again, the system does not seem to respond at all to this digit being sent down the wire.

If you think I should still create a station called A, I’m happy to give that a shot, but I’m guessing I just wasn’t clear about how I was trying to deal with the A.

Thanks,
Nick

Howdy,

The voicemail escape character only applies to the Greeting, it seems:
wiki.asterisk.org/wiki/display/ … _VoiceMail
not to any time during the voicemail application. So, you might not be able to accomplish escaping at any point without some code modification.

Cheers.

Okay, so it looks like Asterisk will already be listening for the a digit (I’m guessing this is case-insensitive, so A = a??), but I need to define the extension “a” in the current dialplan context?? What’s the best way to do that and send it straight to a hang-up??

Should I decide that a code modification is necessary, any hints on where in the Asterisk code I would make that modification??

Thanks,
Nick

[quote=“necouchman”]Okay, so it looks like Asterisk will already be listening for the a digit (I’m guessing this is case-insensitive, so A = a??), but I need to define the extension “a” in the current dialplan context?? What’s the best way to do that and send it straight to a hang-up??

Should I decide that a code modification is necessary, any hints on where in the Asterisk code I would make that modification??

Thanks,
Nick[/quote]

Asterisk is only going to be listening if you’ve set the d option for the VoiceMail application. Find the context you’ve called the VoiceMail application from, and put a new extension in that context for the a extension and connect it to the Hangup application.

Okay, so here’s the context for my call to the voicemail application:

[ext-injection-5]
include => ext-injection-5-custom
exten => 5011,1,Goto(injection-5,${EXTEN},1)

; end of [ext-injection-5]


[injection-5]
include => injection-5-custom
exten => _.,1,Noop(Entering Injection: VoicemailDTMF)
exten => _.,n,Set(DYNAMIC_FEATURES=hangup#vmendcall)
exten => _.,n,Read(vminput,,5)
exten => _.,n,Set(vmbox=${vminput:0:4})
exten => _.,n,Set(vmfunc=${vminput:4})
exten => _.,n,Macro(vm,${vmbox},DIRECTDIAL)
exten => _.,n,Goto(vmret,1)
exten => _.,n,Goto()
exten => h,1,Macro(hangupcall,)

So, I did two things. First, I changed the Macro line that calls vm to the following:

and, second, I added the following in the [injection-5] section:

Should this be sufficient? Behavior is the same, but I’m hoping I’m just doing something wrong.

-Nick