On Wed, Sep 5, 2012 at 4:30 AM, David Klaverstyn <[email protected]>wrote:

> Hi All,****
>
> ** **
>
> For some reason I can’t get this GotoIf statement to work.  Even if the
> name and number are the same it jumps to line 3.  I’ve tried with and
> without the quotes around each variable.****
>
> ** **
>
> exten => s,1,GotoIf($["${CALLERID(name)}" = "${CALLERID(num)}"]?:3)****
>
> exten => s,2,NoOp(they are the Same)****
>
> exten => s,3,NoOp(they are different)****
>
> ** **
>
>
>
You need to verify if the {CALLERID(num)} can actually match what your
{CALLERID(name)} looks like.  More than likely, the (num) has some sort of
brackets around it, such as < >, or perhaps it's starting with a +.  You
can try to use the FILTER function on it, to strip away any additional
characters that you don't want to see or try to match on.

exten => s,1,GotoIf($["${CALLERID(name)}" =
"${FILTER(0123456789,${CALLERID(num)}}"]?:3)


That is, if you're just looking for numeric callerid.  If you also want to
account for extra characters, you can add those to the first part of the
filter.


-- 
Thanks,
--Warren Selby, dCAP
http://www.SelbyTech.com <http://www.selbytech.com>
--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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

Reply via email to