I use the following:
exten => s,n,GotoIf($["${CALLERID(num)}" :
"[0-9]{10}"]?label)
Cheers,
Chad
On Nov 11, 2005, at 2:02 PM, Adam Robins wrote:
> I am trying to test whether a callerid number is a valid ten digit
> number. I'm a total novice with regular expressions.
> I've tried:
>
> exten => s,n,GotoIf($[${CALLERIDNUM} : \d{10,10}]?label)
>
> But CLI gives an error. Can someone please show me what the correct
> syntax would be to do this?
>
> Thanks,
> Adam
>
> The contents of this email message and any attachments are
> confidential and are intended solely for addressee. The information
> may also be legally privileged. This transmission is sent in trust,
> for the sole purpose of delivery to the intended recipient. If you
> have received this transmission in error, any use, reproduction or
> dissemination of this transmission is strictly prohibited. If you
> are not the intended recipient, please immediately notify the
> sender by reply email and delete this message and its attachments,
> if any.
>
>
> _______________________________________________
> --Bandwidth and Colocation sponsored by Easynews.com --
>
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users