[Asterisk-Users] Press 9 to dial by name

Matt G gibson at experthost.com
Wed Sep 15 08:44:04 MST 2004


Daniel Poulsen wrote:

>Hi,
>
>Thank you for your reply. 
>
>I guess what I am trying to do is only different in the sense that I
>want to have multpile 'main menus' for each of our different clients. 
>I was hoping to send them to the correct sub context from the main
>inbound context with a Goto statement using the extension as the
>context name. I suppose I could just have my proxy take them directly
>to sip:<company-name>@asterisk then I would be able to give them the
>'dial 9' option.
>
>I am planning on having a voice prompt to tell them to dial 9.  If I
>don't send them immediately into a voice mailbox,is there a convenient
>way to record 'main menu' outgoing messages other than creating them
>with a voice mailbox and then manually movin them to the sounds
>directory?  Ideally I'd like the clients to be able to record these
>messages without intervention from me.  For example, how did you
>record 'lcrmain'?
>  
>
here is my example on how to implement a recording menu:
there is also an example on the wiki for recording sounds.

extensions.conf:
[common]
; to go to authenticated sound menu
exten => 666,1,Answer
exten => 666,2,Goto(recordext,s,1)

[default]
#include record.ext
include => common



record.ext:
[recordext]
exten => s,1,Answer
exten => s,2,Authenticate(XXXXXX) ; replace with a password if you want 
it authenticated
exten => s,3,DigitTimeout(10)
exten => s,4,ResponseTimeout(20)
exten => s,5,Wait(1)

; welcome message
exten => s,6,Background(record/welcome) ; press 1 to record network 
status, press 2 for current promos
exten => s,7,Background(silence/1) ; one second of silence , play from 
/var/lib/asterisk/sounds/silence/
exten => s,8,Background(record/initial-inst) ; initial instructions , 
play from /var/lib/asterisk/sounds/record/

; press of 1
exten => 1,1,Answer ; answer the line
exten => 1,2,Goto(recordnet,s,1) ; play the instructions for network 
recording
                                 ; press 1 to record your message, then 
press # to hear it repeated to you then hang up
                                 ; press 2 to hear the current message
; press of 2
exten => 2,1,Answer
exten => 2,2,Goto(recordpromo,s,1)

; invalid or hangup
exten => i,1,Playback(pbx-invalid)
exten => t,1,Hangup


[recordnet]
exten => s,1,Answer
exten => s,2,DigitTimeout(10)
exten => s,3,ResponseTimeout(20)
exten => s,4,Wait(1)
exten => s,5,Background(record/net-inst)
exten => s,6,Background(silence/1)

; user presses 1
exten => 1,1,Wait(1)
exten => 1,2,Background(record/record-inst) ; wait for the beep, then 
record your message, then press #
exten => 1,3,Record(/var/lib/asterisk/sounds/record/net-status:gsm)
exten => 1,4,Wait(1)
exten => 1,5,Goto(recordnet,s,4)

; user presses 2
exten => 2,1,Wait(2)
exten => 2,2,Playback(record/net-status)
exten => 2,3,Wait(1)
exten => 2,4,Goto(recordnet,s,4)

; user presses #
exten => #,1,Wait(1)
exten => #,2,Goto(recordext,s,5)

; invalid or hangup
exten => i,1,Playback(pbx-invalid)
exten => t,1,Hangup



[recordpromo]
exten => s,1,Answer
exten => s,2,DigitTimeout(10)
exten => s,3,ResponseTimeout(20)
exten => s,4,Wait(1)
exten => s,5,Background(record/promo-inst)
exten => s,6,Background(silence/1)

; user presses 1
exten => 1,1,Wait(1)
exten => 1,2,Background(record/record-inst) ; wait for the beep, then 
record your message, then press #
exten => 1,3,Record(/var/lib/asterisk/sounds/record/current-promo:gsm)
exten => 1,4,Wait(1)
exten => 1,5,Goto(recordpromo,s,4)

; user presses 2
exten => 2,1,Wait(2)
exten => 2,2,Playback(record/current-promo)
exten => 2,3,Wait(1)
exten => 2,4,Goto(recordpromo,s,4)

; user presses #
exten => #,1,Wait(1)
exten => #,2,Goto(recordext,s,5)

; invalid or hangup
exten => i,1,Playback(pbx-invalid)
exten => t,1,Hangup




>Thanks,
>Dan
>
>
>On Tue, 14 Sep 2004 20:59:28 -0500, Lyle Giese <lyle at lcrcomputer.net> wrote:
>  
>
>>How is the user going to know about the 9 if you don't tell them via a voice
>>prompt?  This is how I do it.  I drop incoming calls into lcrmainmenu and if
>>they press a 1 during the first background, they will drop into the second
>>menu which gives the company directory and if they fail to press a key, they
>>drop into the general vm box.
>>
>>One note, once you go to Voicemail, this menu is history and the keypresses
>>that apply to Voicemail apply and not those showen here(or in your case 9).
>>
>>Lyle
>>
>>[lcrmainmenu]
>>exten => s,1,Dial(Zap/1r2&SIP/desk1&SIP/ncc1701,20,rtT)
>>exten => s,2,DigitTimeout,5 ; set Digit Timeout to 5 seconds
>>exten => s,3,ResponseTimeout,10 ; Set Response Timeout to 10 sec.
>>exten => s,4,Background(lcrmain) ; LCR Main Menu
>>exten => s,5,Voicemail(u110); Drop into general vm for LCR
>>
>>exten => 1,1,Goto(usersmenu,s,1)
>>exten => 0,1,Goto(lcrmainmenu,s,2)
>>
>>exten => 2,1,Hangup
>>
>>include => default
>>;
>>[usersmenu]
>>exten => s,1,DigitTimeout,5 ;set digit timeout to 5 seconds
>>exten => s,2,ResponseTimeout,10 ; Set Response Timeoute to 10 sec
>>exten => s,3,Background(usermenuopts) ; Press 1 for lyle, 2 for Adam, 3 for
>>Lois or timeout to next step
>>exten => s,4,Voicemail(u110); Drop into general vm for LCR
>>
>>exten => 1,1,Voicemail(u101)
>>exten => 2,1,Voicemail(u103)
>>exten => 3,1,Voicemail(u102)
>>exten => 4,1,Voicemail(u110)
>>exten => 0,1,Goto(usersmenu,s,1)
>>
>>include => default
>>
>>
>>
>>----- Original Message -----
>>From: "Daniel Poulsen" <dpoulsen at gmail.com>
>>To: <asterisk-users at lists.digium.com>
>>Sent: Tuesday, September 14, 2004 8:25 PM
>>Subject: [Asterisk-Users] Press 9 to dial by name
>>
>>    
>>
>>>Hi all.  I am new to the list and new to asterisk.  I have asterisk
>>>installed and  running.  I am using it as a voicemail server only.
>>>What I would like to do is send users to a general mailbox that will
>>>be addressed as <companyname>@asterisk and give them the option to
>>>wait for the tone and leave a message, or press 9 to dial by name.
>>>
>>>My questions are:
>>>
>>>1.  What is the best way to do this?
>>>
>>>Right now I have incoming SIP calls going to a context called
>>>[From_SER].  My config looks like this:
>>>
>>>[From_SER]
>>>include => MailBox
>>>include => ACMEInc
>>>
>>>exten => 1,1,Goto(${EXTEN},s,1)
>>>
>>>
>>>[MailBox]
>>>exten => _XXXX,1,Wait(2)
>>>exten => _XXXX,2,Voicemail(u${EXTEN})
>>>
>>>
>>>[ACMEInc]
>>>exten => s,1,Answer
>>>exten => s,2,DigitTimeout,5
>>>exten => s,3,ResponseTimeout,10
>>>exten => s,4,Voicemail(${EXTEN})
>>>
>>>exten => 9,1,Directory(${EXTEN})
>>>
>>>It seems to me like this should work, but I never reach the ACMEInc
>>>voice mailbox.  If I address a mailbox number like <sip:1234 at asterisk>
>>>it takes me right in based on the _XXXX dial pllan so I know I have a
>>>working system.
>>>
>>>
>>>2.  Once I am in the ACMEInc mailbox, if I dial 9 to reach the
>>>directory, it doesn't do the transfer.  How can I set some kind of
>>>global paramater that says if I dial 9, go to Directory(${EXTEN}) ?
>>>
>>>Your input is greatly appreciated.
>>>
>>>Thank you.
>>>
>>>Dan Poulsen
>>>_______________________________________________
>>>Asterisk-Users mailing list
>>>Asterisk-Users at lists.digium.com
>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>>
>>>      
>>>
>>    
>>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users
>To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users
>  
>




More information about the asterisk-users mailing list