[asterisk-users] Asterisk 1.6 and PrivacyManager with SIP

Jaap Winius jwinius at umrk.nl
Mon Aug 2 21:59:00 CDT 2010


Quoting Warren Selby <wcselby at selbytech.com>:

> Try removing the quotes in your n(true) priority.

 From "FAILED"? That makes no difference: with or without the quotes,  
the result is always 0, which leads in the Dial() rule being executed.  
Actually, though, that's not even relevant, because before Asterisk  
even reaches that rule, the CLI shows that the result from the  
PrivacyManager is:

    -- CallerID Present: Skipping

PrivacyManager is simply failing to determine that the incoming SIP  
calls are anonymous.

Actually, could it be that the second rule of my code, with the Set()  
command, is simply not working with Asterisk 1.6? Let me try that  
without the empty set of quotes after the equals sign...

Yes, that was it -- it's working again! Here's what it looks like now:

    exten => jaap,1,GotoIf($[${CALLERID(num)}=anonymous]?true:false)
    exten => jaap,n(true),Set(CALLERID(num)=)
    exten => jaap,n(false),NoOp()
    exten => jaap,n,PrivacyManager(3,10)
    exten => jaap,n,GotoIf($[${PRIVACYMGRSTATUS}=FAILED]?bad)
    exten => jaap,n,Dial(SIP/1000,20,w)
    exten => jaap,n,Hangup()
    exten => jaap,n(bad),Playback(im-sorry)
    exten => jaap,n,Playback(vm-goodbye)
    exten => jaap,n,Hangup()

Rule five now has both ${PRIVACYMGRSTATUS} and FAILED without quotes,  
but that actually did not make any difference. Two things actually  
fixed the problem. The first and most important was removing the pair  
of empty quotes from rule two -- otherwise the caller ID is no longer  
regarded as empty. Second is the addition of 3,10 as options to the  
PrivacyManager application in rule four. Those are supposed to be the  
defaults, but without them the PrivacyManager fails to recognize a  
ten-digit phone number as being sufficient. I consider that a bug.

Cheers,

Jaap



More information about the asterisk-users mailing list