I have for each phone such a paragraph in my dialplan. I would like to save this by using a Macro. How can I do that? exten => 8863959,1,Dial(SIP/8863959,60,r) exten => 8863959,2,NoOp(${DIALSTATUS}) exten => 8863959,3,Voicemail,u8863959@Customers exten => 8863959,104,Voicemail,b8863959@Customers exten => 8863959,105,hangup
On Jun 4, 2006, at 11:50 AM, Ronald Wiplinger wrote:> I have for each phone such a paragraph in my dialplan. > I would like to save this by using a Macro. How can I do that? > > exten => 8863959,1,Dial(SIP/8863959,60,r) > exten => 8863959,2,NoOp(${DIALSTATUS}) > exten => 8863959,3,Voicemail,u8863959@Customers > exten => 8863959,104,Voicemail,b8863959@Customers > exten => 8863959,105,hangup >Hi Ronald, Just make something like this: exten => 8863959,1,Macro(dial,8863959) [macro-dial] exten => s,1,Dial(SIP/${ARG1},60,r) exten => s,2,NoOp(${DIALSTATUS}) exten => s,3,Voicemail,u${ARG1}@Customers exten => s,104,Voicemail,b$(ARG1}@Customers exten => s,105,hangup Regards, Attilla
On Sun, Jun 04, 2006 at 05:50:41PM +0800, Ronald Wiplinger wrote:> I have for each phone such a paragraph in my dialplan. > I would like to save this by using a Macro. How can I do that? > > exten => 8863959,1,Dial(SIP/8863959,60,r) > exten => 8863959,2,NoOp(${DIALSTATUS}) > exten => 8863959,3,Voicemail,u8863959@Customers > exten => 8863959,104,Voicemail,b8863959@Customers > exten => 8863959,105,hangupFor starters: exten => 8863959,1,Dial(SIP/${EXTEN},60,r) exten => 8863959,2,NoOp(${DIALSTATUS}) exten => 8863959,3,Voicemail,u${EXTEN}@Customers exten => 8863959,104,Voicemail,b${EXTEN}@Customers exten => 8863959,105,hangup Now replace the specific numbers with a generic pattern of the sort of: exten => _XXXXXXX,1,Dial(SIP/${EXTEN},60,r) exten => _XXXXXXX,2,NoOp(${DIALSTATUS}) exten => _XXXXXXX,3,Voicemail,u${EXTEN}@Customers exten => _XXXXXXX,104,Voicemail,b${EXTEN}@Customers exten => _XXXXXXX,105,hangup Now, I don't know much about your system, so the above may, or may not work. But it should give you some ideas. -- Tzafrir Cohen sip:tzafrir@local.xorcom.com icq#16849755 iax:tzafrir@local.xorcom.com +972-50-7952406 tzafrir.cohen@xorcom.com http://www.xorcom.com
> > Just make something like this: > > exten => 8863959,1,Macro(dial,8863959) > > [macro-dial] > exten => s,1,Dial(SIP/${ARG1},60,r) > exten => s,2,NoOp(${DIALSTATUS}) > exten => s,3,Voicemail,u${ARG1}@Customers > exten => s,104,Voicemail,b$(ARG1}@Customers > exten => s,105,hangup > >Just to make a bit more modular... ; this will just allow you to pass in the voicemail box exten => _NXXXXXX,1,Macro(dial,SIP/${EXTEN},${EXTEN}@Customer) ; you can use the same macro... (note you can also ring two extensions. ; we do this and each extensions softphone is ${EXTEN}h for convenience. exten => _4XXX,1,Macro(dial,SIP/${EXTEN}&SIP/${EXTEN}h,${EXTEN}@Office) [macro-dial] exten => s,1,Dial(${ARG1},60,r) exten => s,2,NoOp(${DIALSTATUS}) exten => s,3,Voicemail,u${ARG2} exten => s,104,Voicemail,b$(ARG2} exten => s,105,hangup