[asterisk-users] Check if variable contains strings

Jonas Kellens jonas.kellens at telenet.be
Thu Jun 17 10:01:40 CDT 2010


This also gives result "1" but is not correct :

exten => 1234,n,Set(test2=${REGEX("[fot]" ${footest})})
exten => 1234,n,verbose(test2 returned ${test2})

[Jun 17 16:59:01]     -- Executing [1234 at from:7] 
Verbose("SIP/13-00000096", "test2 returned 1") in new stack
[Jun 17 16:59:01] test2 returned 1


Jonas


On 06/17/2010 04:22 PM, Danny Nicholas wrote:
> This worked in 1.4.30
> ; regex test
> exten =>  1234,1,Answer
> exten =>  1234,n,Set(footest=foobar)
> exten =>  1234,n,verbose(test value ${footest})
> exten =>  1234,n,Set(test=${REGEX("[foo]" ${footest})})
> exten =>  1234,n,verbose(test returned ${test})
> exten =>  1234,n,Playback(vm-goodbye)
> exten =>  1234,n,hangup
>
> This line did not
> exten =>  1234,n,Set(test=${REGEX("/foo/" ${footest})})
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100617/8908bf58/attachment.htm 


More information about the asterisk-users mailing list