Gotoif question

So here we go

Your case
exten => s,3,GotoIf($["${CALLERID(num)}" = “9996661234”]?100)
exten => s,4,GotoIf($["${CALLERID(num)}" != “9996661234”]?999)

Simple example

exten => s,1,GotoIf($[${CALLERID(num)}=9996661234]?2:3)

If [${CALLERID(num)} = 9996661234] = true go step 2, false go step 3

another one

exten => s,4,GotoIf($[${CALLERID(num)}!=9996661234]?2:3)
If ${CALLERID(num)} take value 9996661234
the result would be false here, go to step 3

Hi

Why not store the numbers in the astdb and then check if they are there or not.
unlimited numbers, a couple of lines of code.

Ian

[quote=“ianplain”]
Why not store the numbers in the astdb and then check if they are there or not.
unlimited numbers, a couple of lines of code.
Ian[/quote]

I don’t know how to do that yet.

Anyway the problem is solved. The analog line I had coming off the PBX did’n want to talk CallerID to the TDM400P card for some reason. A Vonage MTA did just fine so at least I am off an running.

This worked for me in Asterisk 1.4.17:

exten => s,1,NoOp(CallerID is …"${CALLERID(num)}")
exten => s,2,GotoIf($["${CALLERID(num)}" = “15552224444”]?100:300)

Thank you very much.

Regards,

Ike