Louis-David Mitterrand
2009-Jul-24 08:17 UTC
[asterisk-users] how to match "no callerid" in 1.6 ?
Hi, This used to work fine in 1.4: exten => 2131/,1,NoOp(reject3: ${CALLERID(num)}) exten => 2131/,n,Playback(no_unknow_callerid_here) exten => 2131/,n,Hangup And now, after upgrading to 1.6.1.x it matches every callerid. Did something change? Thanks,
Michiel van Baak
2009-Jul-24 08:37 UTC
[asterisk-users] how to match "no callerid" in 1.6 ?
On 10:17, Fri 24 Jul 09, Louis-David Mitterrand wrote:> Hi, > > This used to work fine in 1.4: > > exten => 2131/,1,NoOp(reject3: ${CALLERID(num)}) > exten => 2131/,n,Playback(no_unknow_callerid_here) > exten => 2131/,n,Hangup > > And now, after upgrading to 1.6.1.x it matches every callerid. > > Did something change?Yes, it's now working as it supposed to work. Use something like this: exten => 2131,1,GotoIf($["${CALERID(num)" = ""]?nocallerid,1) exten => 2131,n,Dia(SIP/Something); or whatever you want to do exten => nocallerid,1,Playback(no_unknown_callerid_here) exten => nocallerid,n,Hangup() -- Michiel van Baak michiel at vanbaak.eu http://michiel.vanbaak.eu GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD "Why is it drug addicts and computer aficionados are both called users?"
Stanisław Pitucha
2009-Jul-25 15:43 UTC
[asterisk-users] how to match "no callerid" in 1.6 ?
2009/7/24 Louis-David Mitterrand <vindex+lists-asterisk-users at apartia.org>:> This used to work fine in 1.4: > > ? ? ? ?exten => 2131/,1,NoOp(reject3: ${CALLERID(num)}) > ? ? ? ?exten => 2131/,n,Playback(no_unknow_callerid_here) > ? ? ? ?exten => 2131/,n,Hangup > > And now, after upgrading to 1.6.1.x it matches every callerid.I'm not sure if it's the same reason, but have a look at this bug (exists in 1.6.1.1): https://issues.asterisk.org/view.php?id=15476 Whether you want to use the function, or a pattern match in version 1.6, you might want to upgrade past revision 206705. Especially if you're trying to detect no callerid. Otherwise you'll get a wrong result. (assuming you're using SIP) HTH