Why not this?
[macro-extcall]
;Macro created by Ish to handle external national calls
exten => s,1,Set(CALLERID(all)=${ARG2})
exten => s,n,Gotoif($["${ARG3}" != "1"]?dialit)
exten => s,n,ExecIf(${ARG3}=1|Monitor|My monitor arguments)
exten => s,n(dialit),Dial(SIP/44${ar...@carrier,45)
exten => s,n,Hangup


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ishfaq Malik
Sent: Friday, October 16, 2009 9:08 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Check if a variable is set

Hi

Here it is

[macro-extcall]
;Macro created by Ish to handle external national calls
exten => s,1,Set(CALLERID(all)=${ARG2})
exten => s,2,ExecIf(${ARG3}=1|Monitor|My monitor arguments)
exten => s,3,Dial(SIP/44${ar...@carrier,45)
exten => s,4,Hangup

Execution id Macro(extcall|Dialled Number|Caller CLI)

Now to enable monitoring for an outgoing line it would be

Macro(extcall|Dialled Number|Caller CLI|1)

But I have 79 of these in the system already with just the 2 arguments and
we use realtime so they are all in a DB rather than text file so I'd rather
not go through all the existing ones and change them to

Macro(extcall|Dialled Number|Caller CLI|0)

If I don't have to.

Also, I don't like getting bested by machines!

Ish




_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to