On 04/06/13 14:38, Doug Lytle wrote:
Joseph wrote:
exten => s,4,GotoIf($["${CALLERIDNUM}" = "V4*"]?blacklisted,s,1
I don't believe so, you'd have to assign a variable to the first 2
characters and test that variable for V4. i.e.
exten => s,1,Set(goaway=${CALLERID(number):0:2})
exten => s,n,GotoIf($["${goaway}" = "V4" ]?blacklisted,s,1)
exten => s,n,continue on with your normal processing
[blacklisted]
exten => s,1,Set(CDR(userfield)=Blacklisted)
exten => s,n,Zapateller(answer)
exten => s,n,Hangup(2)
Doug
Thank you! Yes, this is working :-/
So if the: "Set(goaway=${CALLERID(number):0:2})" limits the caller ID string to
2-characters, isn't it?
If I set it to 10-characters: ...${CALLERID(number):0:10} can I test it for the first two
characters only "V4" or it has to be string 10-characters long?
--
Joseph
--
_____________________________________________________________________
-- 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