[Asterisk-Users] Dialing phone number and extension together to
avoid listening to voice menu (incoming call)
Roman Zhovtulya
roman at fh-offenburg.de
Tue Mar 1 13:29:55 MST 2005
Hello,
I'm trying to figure out how to get Asterisk to dial an extension when a
call comes from the outside and contains the extension already.
(Somebody wants to call a user of Asterisk with extension "111" from the
outside)
For example: I've hooked Asterisk to sipgate.de and received a landline
phone number (say 0781205237).
Now if you dial 0781205237 and and an extension altogether
(0781205237111) I would like Asterisk to redirect the call to the
extension "111", without having to listen to the greetings message and
then typing the extension on the keypad.
Please help me to figure it out. Any suggestions and code excerpts would
be highly appreciated.
Also, I was trying to use a voice menu setup for that, so that when the
user dials "0781205237", he/she would listen to the greeting and then
can enter the extension on the phone.
However, I couldn't get this to work either.
Here is the excerpt of my "extensions.conf":
***************
; defining the voice menu for incoming calls:
[fhostaffmenu]
exten => s,1,Ringing ; Make them comfortable with
some seconds of ringback
exten => s,2,Answer ; Answer the line
exten => s,3,DigitTimeout(1) ; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout(3) ; Set Response Timeout to 10 seconds
exten => s,5,Read(mynumber,beep,3) ; Read DTMF input and save it into
"mynumber" variable
exten => s,6,Macro(fhostaff,${mynumber},SIP/${mynumber}) ; dial the
extension that is saved in "mynumber"
***************
When I execute this, it says that "User entered ''". Why wouldn't it
read the numbers punched on the phone?
The Voicemail works very well.
I use dtmfmode = rfc2833 and iLBC codec.
Also, please check if the comments I made to the code below are correct.
Thank you very much,
Roman Zhovtulya
More information about the asterisk-users
mailing list