[Asterisk-Users] How to make this into a Macro?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Jun 4 03:07:14 MST 2006


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 at Customers
> exten => 8863959,104,Voicemail,b8863959 at Customers
> exten => 8863959,105,hangup


For 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 at local.xorcom.com
icq#16849755       iax:tzafrir at local.xorcom.com
+972-50-7952406           
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-users mailing list