[asterisk-users] Check if a variable is set

Ishfaq Malik ish at pack-net.co.uk
Fri Oct 16 09:42:32 CDT 2009


We have a winner!

Thanks Danny.

My excuse of not thinking of that myself is working wholly in realtime 
and mysql where you have to use priorities apart from when I'm writing 
Macros. Did I get away with that?

Ish

Danny Nicholas wrote:
> 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${ARG1}@carrier,45)
> exten => s,n,Hangup
>
>
> -----Original Message-----
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] 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${ARG1}@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
>
>   

-- 
Ishfaq Malik
Software Developer
PackNet Ltd

Office:   0161 660 3062



More information about the asterisk-users mailing list