Stephen Reese
2008-Oct-09 03:14 UTC
[asterisk-users] Menu for call forwarding or voicemail
I would like to create a simple menu that would allow a caller to decide whether they want to leave a message or be forwarded to another number (i.e cell phone). Thanks in advance for any insight. Here's my current extension.conf [general] static=yes writeprotect=yes [globals] [default] exten => 101,1,Dial(SIP/101,20) exten => 101,n,Voicemail(101 at default) ;This automatically calls the right mailbox using the ${CALLERIDNUM} variable in the current context (var ${CONTEXT}). exten=>*98,1,VoiceMailMain(${CALLERIDNUM}@${CONTEXT}) include => inbound include => outgoing [inbound] exten => 9045622082,1,Goto(default,101,1) [outgoing] ; The following gives an Unknown Caller ID ;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=XXXXXXXXXX) ;exten => _1NXXNXXXXXX,2,Set(CALLERID(name)=XXXXXXXXXX) exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _1NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@vitel-outbound) exten => _NXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _NXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _NXXXXXX,n,Dial(SIP/1904${EXTEN}@vitel-outbound) exten => _NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _NXXNXXXXXX,n,Dial(SIP/1${EXTEN}@vitel-outbound) exten => _011.,1,Set(CALLERID(num)=9045622082) exten => _011.,n,Set(CALLERID(name)="Stephen Reese") exten => _011.,n,Dial(SIP/${EXTEN}@vitel-outbound) exten => _911,1,Set(CALLERID(num)=9045622082) exten => _911,n,Set(CALLERID(name)="Stephen Reese") exten => _911,n,Dial(SIP/911 at vitel-outbound)
Stephen Reese
2008-Oct-10 19:51 UTC
[asterisk-users] Menu for call forwarding or voicemail
> I would like to create a simple menu that would allow a caller to > decide whether they want to leave a message or be forwarded to another > number (i.e cell phone). Thanks in advance for any insight. > > Here's my current extension.conf > > [general] > static=yes > writeprotect=yes > > [globals] > > [default] > > exten => 101,1,Dial(SIP/101,20) > exten => 101,n,Voicemail(101 at default) > > ;This automatically calls the right mailbox using the ${CALLERIDNUM} > variable in the current context (var ${CONTEXT}). > exten=>*98,1,VoiceMailMain(${CALLERIDNUM}@${CONTEXT}) > > include => inbound > include => outgoing > > [inbound] > exten => 9045622082,1,Goto(default,101,1) > > [outgoing] > ; The following gives an Unknown Caller ID > ;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=XXXXXXXXXX) > ;exten => _1NXXNXXXXXX,2,Set(CALLERID(name)=XXXXXXXXXX) > > exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) > exten => _1NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") > exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@vitel-outbound) > > exten => _NXXXXXX,1,Set(CALLERID(num)=9045622082) > exten => _NXXXXXX,n,Set(CALLERID(name)="Stephen Reese") > exten => _NXXXXXX,n,Dial(SIP/1904${EXTEN}@vitel-outbound) > > exten => _NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) > exten => _NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") > exten => _NXXNXXXXXX,n,Dial(SIP/1${EXTEN}@vitel-outbound) > > exten => _011.,1,Set(CALLERID(num)=9045622082) > exten => _011.,n,Set(CALLERID(name)="Stephen Reese") > exten => _011.,n,Dial(SIP/${EXTEN}@vitel-outbound) > > exten => _911,1,Set(CALLERID(num)=9045622082) > exten => _911,n,Set(CALLERID(name)="Stephen Reese") > exten => _911,n,Dial(SIP/911 at vitel-outbound) >Okay I'm going to start simple. First I would like to forward the number to the remote number which we'll make 904-940-9007. I've commented out the voicemail for the time being, I'll bring that in once a menu is composed later on. So anyways I've added a second rule to dial the second number after 20 seconds is that the correct placement? [general] static=yes writeprotect=yes [globals] [default] exten => 101,1,Dial(SIP/101,20) exten => 101,n,Dial(SIP/9049409007 at vitel-outbond) ;exten => 101,n,Voicemail(101 at default) ;This automatically calls the right mailbox using the ${CALLERIDNUM} variable in the current context (var ${CONTEXT}). exten=>*98,1,VoiceMailMain(${CALLERIDNUM}@${CONTEXT}) include => inbound include => outgoing [inbound] exten => 9045622082,1,Goto(default,101,1) [outgoing] ; The following gives an Unknown Caller ID ;exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=XXXXXXXXXX) ;exten => _1NXXNXXXXXX,2,Set(CALLERID(name)=XXXXXXXXXX) exten => _1NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _1NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _1NXXNXXXXXX,n,Dial(SIP/${EXTEN}@vitel-outbound) exten => _NXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _NXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _NXXXXXX,n,Dial(SIP/1904${EXTEN}@vitel-outbound) exten => _NXXNXXXXXX,1,Set(CALLERID(num)=9045622082) exten => _NXXNXXXXXX,n,Set(CALLERID(name)="Stephen Reese") exten => _NXXNXXXXXX,n,Dial(SIP/1${EXTEN}@vitel-outbound) exten => _011.,1,Set(CALLERID(num)=9045622082) exten => _011.,n,Set(CALLERID(name)="Stephen Reese") exten => _011.,n,Dial(SIP/${EXTEN}@vitel-outbound) exten => _911,1,Set(CALLERID(num)=9045622082) exten => _911,n,Set(CALLERID(name)="Stephen Reese") exten => _911,n,Dial(SIP/911 at vitel-outbound)
Stephen Reese
2008-Oct-10 23:15 UTC
[asterisk-users] Menu for call forwarding or voicemail
> Any reason not to ring both at once? > exten => 101,1,Dial(SIP/101&SIP/9049409007 at vitel-outbond,20) > -DarrenThat would also work but what if my sip/101 device (softphone) isn't connected. Currently if my softphone is not connected then the line will go straight to voicemail. If I remove the voicemail to implement your rule then it will error out since the phone isn't connected.