[asterisk-users] ExitIf() convention?
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Fri Feb 13 01:09:05 CST 2009
On Thursday 12 February 2009 23:35:42 Jack Bates wrote:
> I want the first line of my dialplan to check and expression, and exit
> from the dailplan if it is true - is there a convention for this?
>
> My goal is to exit from the dialplan before calling Answer() if the
> callerid is null. By this means I hope to work around this issue:
> http://thread.gmane.org/gmane.comp.telephony.pbx.asterisk.user/217794
>
> - I noticed that the callerid is never null for incomming calls - even
> blocked numbers are "PRIVATE", while on occasions when Asterisk
> incorrectly answers during an in progress conversation, the callerid is
> null.
>
> Is it correct to use:
>
> exten => s,1,GotoIf(${ISNULL(CALLERID())}?h)
This syntax will universally fail.
> - or is there a more commonly used convention?
exten => s,1,ExecIf($["${CALLERID(num)}"=""],Hangup)
--
Tilghman
More information about the asterisk-users
mailing list