Hi All I am trying to simplify a dialplan for a few thousand users. Would what I have below work? If someone dials exten 710001 would it go through answer and then to the macro to try dialing the SIP phone thats registered on 710001 and then onto voicemail if no answer or not signed on? exten => 71XXXX,1,Answer() exten => 71XXXX,2,Macro(71macro,${EXTEN}) exten => 71XXXX,3,Hangup() [macro-71macro] exten => s,1,Dial(SIP/${ARG1},30,tr) exten => s,2,VoiceMail(${ARG1}) exten => s,3,PlayBack(vm-goodbye) Many Thanks in Advance Scott Pinhorne
If you have to ask this question, please get professional help to install this, otherwise you might end up with a few thousand users picketing at your door. On 1/6/06, scott <scott@mysecretworld.co.uk> wrote:> Hi All > > I am trying to simplify a dialplan for a few thousand users. > Would what I have below work? > > If someone dials exten 710001 would it go through answer and then to the macro to try dialing the SIP phone thats registered on 710001 and then onto voicemail if no answer or not signed on? > > > exten => 71XXXX,1,Answer() > exten => 71XXXX,2,Macro(71macro,${EXTEN}) > exten => 71XXXX,3,Hangup() > > > [macro-71macro] > > exten => s,1,Dial(SIP/${ARG1},30,tr) > exten => s,2,VoiceMail(${ARG1}) > exten => s,3,PlayBack(vm-goodbye) > > > Many Thanks in Advance > Scott Pinhorne > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Don't forget, patterns (for matching) must begin with an underscore (_) I find it nicer to just use ${MACRO_EXTEN} rather than declaring $ {ARG1} for the sake of it. --------- exten => _71XXXX,1,Answer() exten => _71XXXX,2,Macro(71macro) exten => _71XXXX,3,Hangup() [macro-71macro] exten => s,1,Dial(${MACRO_EXTEN},30,t) ; Ring the interface, 20 seconds maximum exten => s,2,Goto(s-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER) exten => s-BUSY,1,Voicemail(bs${MACRO_EXTEN}) ; If busy, send to voicemail w/ busy announce ; you may want to use a variable such as ${MACRO_OFFSET} to exit back to where you called the macro in the dialplan with a Goto(). exten => s-NOANSWER,1,Voicemail(us${MACRO_EXTEN}) ; If unavailable, send to voicemail w/ unavail announce ; you may want to use a variable such as ${MACRO_OFFSET} to exit back to where you called the macro in the dialplan with a Goto(). exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer --------- btw.. its late and I have not double checked it so expect it not to work :) Regards, Nathan> exten => 71XXXX,1,Answer() > exten => 71XXXX,2,Macro(71macro,${EXTEN}) > exten => 71XXXX,3,Hangup() > > > [macro-71macro] > > exten => s,1,Dial(SIP/${ARG1},30,tr) > exten => s,2,VoiceMail(${ARG1}) > exten => s,3,PlayBack(vm-goodbye)On 06/01/2006, at 6:27 PM, scott wrote:> Hi All > > I am trying to simplify a dialplan for a few thousand users. > Would what I have below work? > > If someone dials exten 710001 would it go through answer and then > to the macro to try dialing the SIP phone thats registered on > 710001 and then onto voicemail if no answer or not signed on? > > > exten => 71XXXX,1,Answer() > exten => 71XXXX,2,Macro(71macro,${EXTEN}) > exten => 71XXXX,3,Hangup() > > > [macro-71macro] > > exten => s,1,Dial(SIP/${ARG1},30,tr) > exten => s,2,VoiceMail(${ARG1}) > exten => s,3,PlayBack(vm-goodbye) > > > Many Thanks in Advance > Scott Pinhorne > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
On Fri, 2006-01-06 at 10:27 +0000, scott wrote:> [macro-71macro] > > exten => s,1,Dial(SIP/${ARG1},30,tr) > exten => s,2,VoiceMail(${ARG1}) > exten => s,3,PlayBack(vm-goodbye)You appear to be missing some potential error codes. Here is what I use which is just an extended version of what you have. [macro-dialvmb] exten => s,1,Dial(${ARG1},16,t) exten => s,2,Voicemail(u${ARG2}) exten => s,3,Hangup exten => s,102,Voicemail(b${ARG2}) exten => s,103,Hangup I have set this up so I pass 2 args, one is the extension to dial the other is the voicemail box to goto if dial fails. I added the hangups cause I am paranoid about that :) -- Trixter http://www.0xdecafbad.com Bret McDanel UK +44 870 340 4605 Germany +49 801 777 555 3402 US +1 360 207 0479 or +1 516 687 5200 FreeWorldDialup: 635378 http://www.sacaug.org/ Sacramento Asterisk Users Group -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060106/8137fd7c/attachment.pgp