Read digits before answering a call (DMTF)

Hi,

I’ve problems to find how to do the following with my asterisk 1.4 :

I want to set up asterisk so that when i call my phone number from the outside :

  1. if I dial “1” when the line rings, then go to a voice menu (to do some automated things as : say time, read news from Text To Speech, others…)
  2. default (no digit pressed on the dialpad) : go to a pre-defined extension (hardware phone)

I’ve tried to use the read() application as follows:
exten = _X.,1,Read(NUMBER||1|n|1|5)
exten = _X.,2,NoOp( only got one digit. It was ${NUMBER})

But the result is :
– Executing [99@from-internal:1] Read(“SIP/199-b7709e78”, “NUMBER||1|n|1|5”) in new stack
– Accepting a maximum of 1 digits.
– User entered nothing.

“User entered nothing”, though i enter a lot of digits.

Note : I’ve an asterisk 1.4, a linksys SPA3102 ATA (for the incoming context)

Can someone help me to find a way to do that ?

Thanks,
Sylvain

Try put Answer() as the first extension priority and check the Asterisk and the Sipura are using the rfc2833 as the method to trasport the dmtfs.

Hope it helps.

Bye.

well… i don’t want to answer before getting digits : when nobody is at home, i do not want the callers to pay the communication for nothing… that’s why i would like to route the incoming calls if dtmf are sent before dialing…

I’ve checked dtmf as you asked : no dtmfs seem to be received by my asterisk (checked with a standard demo voice menu, no action when keys are pressed!!!)

No dtmf are received either by my sipura nor by another sip trunk (ip centrex)

my sipura is configured as follows :
DTMF Process INFO: yes
DTMF Process AVT: yes
DTMF Tx Method: Auto

your advise ? (thanks)

You should put the Answer() as first priority just temporary, for debugging, when you are able to detect the dtmf remove the Answer() and try again; however I don’t think it’s possible to read a digit before answering a call, you can only check the caller id.

Bye.

I’ve worked on it again. Seems my operator does not support out of band DTMF. That’s why I did not receive any dtmf signals before answering the call. My DTMF was set as rfc2833, I can receive DTMFs since my SIP trunks have dtmfmode = inband… rather than nothing (default : rfc2833)

But inside Asterisk (with an SIP phone x-lite for ex.), with rfc2833 dtmf support, it worked : I’ve an extension that reads DTMFs before answering.

Still searching…

Hi,
After seeing your Post i have tested about Read Digits before channel is unaswered i got the Result as below.
1.X lite i was able to send DTMF With INband
2.Xlite Pro I was unable to send DTMF with Inband or anything.
3.Sipura or Linsys i could with INBAND+Info under codec g711.

regards
surender