[asterisk-users] Dificult macro, please advise

Jonathan GF jonathangf at gmail.com
Mon Sep 3 07:52:31 CDT 2007


Hi,

BRIEF RESUME:
Is there any other way to obtain the same result but being easier to
configure?? Thanks!

EXTENDED RESUME:
i've configured a, rather difficult, macro that even for me without
being documented is difficult. I ask for the help of the experts to
know if the functionality it apports can be achieved better in another
way.

What i'm trying is to enable call a channel (e.g. SIP/3) and being
able to leave a message only on box 2 while any other call to any
other user (e.g.SIP/1 or SIP/2) and leave a message only on mailbox 1.
This is inteded for a SOHO environment.

I have defined only two mailboxes, the 1'st for personal ussage and
the 2'nd for profesional usage.

The macro that now allows me to do that is the following:

EXT_CALLER=
EXT_STUDIO=SIP/3

exten => _X,1,Macro(diallocal|SIP/${EXTEN}|20,Tr)

[macro-diallocal]
exten => s,1,Dial(${ARG1}|${ARG2}|${ARG3})
exten => s,2,Set(EXT_CALLED=${ARG1})
exten => s,3,GotoIf($["${EXT_CALLED}"="${EXT_STUDIO}"]?s-STUDIO-${DIALSTATUS},1:s-REST-${DIALSTATUS},1)
exten => s-STUDIO-NOANSWER,1,Voicemail(u2)
exten => s-STUDIO-NOANSWER,2,Hangup()
exten => s-STUDIO-BUSY,1,Voicemail(b2)
exten => s-STUDIO-BUSY,2,Hangup()
exten => _s-STUDIO-.,1,Hangup()
exten => s-REST-NOANSWER,1,Voicemail(u1)
exten => s-REST-NOANSWER,2,Hangup()
exten => s-REST-BUSY,1,Voicemail(b1)
exten => s-REST-BUSY,2,Hangup()
exten => _s-REST-.,1,Hangup()

Is there any other way to obtain the same result but being easier to configure??

Thanks in advance.
Best regards,

Jonathan GF



More information about the asterisk-users mailing list