[HELP] SetCIDName won't work on anonymous calls


#1

When we receive a call (with caller id) we can set the caller name to “Dept 1” or "Dept 2 " or “Dept 3” depending on the sip account (and the number) dialed, so we know which number they have phoned.

But when an anonymous call comes in and I try to set the name it doesn’t come through on the phone. It just shows “Unknown”.

This what we are using:

exten => s,1,SetCIDName(Dept 1)
exten => s,2,Dial(SIP/200)

If I use this:

exten => s,1,NoOp(${CALLERID})
exten => s,2,SetCIDName(Dept 1)
exten => s,3,NoOp(${CALLERID})
exten => s,4,Dial(SIP/200)

It tells me that it has set the caller id but it hasn’t.

We have 3 incoming SIP accounts and two phones using SIP.

Any ideas or is it a bug?


#2

Bump. Surely I’m not the only one with this problem. I have searched google many times and can not find an answer.


#3

richardys,

I have seen this also. Your callerID on your phone is 1) seeing “Unknown” as the callerID NUMBER and treating it as an anonymous call display, or 2) some ‘bit’ is set somewhere signaling your phone to display an anonymous call.

Personally, I do this:

[code]ANONYMOUSNUM=9999999999
ANONYMOUSNAME=No Caller ID
; …
exten => s,100,GotoIf($[$[${LEN(${CALLERIDNUM})}] < 6]?190)
exten => s,101,GotoIf($["${CALLERIDNUM:0:7}" = “Unknown”]?190)
exten => s,102,GotoIf($["${CALLERIDNUM:0:10}" = “Restricted”]?190)
exten => s,103,GotoIf($["${CALLERIDNUM:0:7}" = “Private”]?190)
exten => s,104,GotoIf($["${CALLERIDNUM:0:9}" = “Anonymous”]?190)
exten => s,105,GotoIf($["${CALLERIDNUM:0:4}" = “PSTN”]?190)
exten => s,106,GotoIf($["${CALLERIDNUM}" = “8005551212”]?190)
exten => s,107,GotoIf($["${CALLERIDNUM:3:1}" < “0”]?190)
exten => s,108,GotoIf($["${CALLERIDNUM:3:1}" > “9”]?190)
exten => s,109,Goto(200)

exten => s,190,NoOp(${CALLERIDNUM})
exten => s,191,Set(CALLERID(number)=${ANONYMOUSNUM}) ; Anonymous call
exten => s,192,Set(CALLERID(name)=${ANONYMOUSNAME})
; …
[/code]
My phones, ATA driven analog phones as well as IP phones, display the globals as I would expect.

Lonnie


#4

I have tried setting name and the number. It seems to show in the log that it has been changed but that change doesn’t seem to pass to the IP phone.

Currently using:

exten => s,1,NoOp(${CALLERIDNAME}) exten => s,2,NoOp(${CALLERIDNUM}) exten => s,3,Set(CALLERID(name)=Sales Department) exten => s,4,Set(CALLERID(number)=999999999) exten => s,5,NoOp(${CALLERIDNAME}) exten => s,6,NoOp(${CALLERIDNUM}) exten => s,7,Goto(menu-phones,s,1)

Log file from the code above:

Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing NoOp("SIP/213.166.5.134-089fff80", "anonymous") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing NoOp("SIP/213.166.5.134-089fff80", "") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing Set("SIP/213.166.5.134-089fff80", "CALLERID(name)=Sales Department") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing Set("SIP/213.166.5.134-089fff80", "CALLERID(number)=999999999") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing NoOp("SIP/213.166.5.134-089fff80", "Sales Department") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing NoOp("SIP/213.166.5.134-089fff80", "999999999") in new stack Dec 21 10:11:11 VERBOSE[3124] logger.c: -- Executing Goto("SIP/213.166.5.134-089fff80", "menu-phones|s|1") in new stack

With this it still shows Unknown on both the Name and Number.


#5

You are missing a ‘9’, you have 9 nines, not 10 9’s like a valid phone number.

Give 10 9’s a try first. (ie. 999-999-9999)

Lonnie


#6

Not sure if this any help but here goes.

exten => s,2,NoOp(${CALLERID})
exten => s,3,GotoIf($["${CALLERIDNUM}" = “”]?s|20)

exten => s,20,VoiceMail(9000@default)
exten => s,21,Hangup()


#7

[quote=“lonnie”]You are missing a ‘9’, you have 9 nines, not 10 9’s like a valid phone number.

Give 10 9’s a try first. (ie. 999-999-9999)

Lonnie[/quote]Thank you for your suggestion, but it didn’t make a difference.


#8

[quote=“Maximo1970”]Not sure if this any help but here goes.

exten => s,2,NoOp(${CALLERID})
exten => s,3,GotoIf($["${CALLERIDNUM}" = “”]?s|20)

exten => s,20,VoiceMail(9000@default)
exten => s,21,Hangup()[/quote]Thank you for your suggestion, but I’m having problems setting the name on anonymous calls. I don’t need to transfer them to voicemail.


#9

richardys,

Well, I use Teliax.com via IAX2 and it works for me.

The only other suggestion is to look at: CallingPres(number)
Though you want to UNSET the bit, not SET it.

voip-info.org/wiki-Asterisk+cmd+callingpres
and
voip-info.org/wiki/view/Aste … CallerPres

It might be that Bit 6 is set and your Phone is ignoring the CallerID data and sticking to an anonymous display.

Looking at the asterisk source might be as enlightening as these docs.

Lonnie


#10

[quote=“lonnie”]richardys,

Well, I use Teliax.com via IAX2 and it works for me.

The only other suggestion is to look at: CallingPres(number)
Though you want to UNSET the bit, not SET it.

voip-info.org/wiki-Asterisk+cmd+callingpres
and
voip-info.org/wiki/view/Aste … CallerPres

It might be that Bit 6 is set and your Phone is ignoring the CallerID data and sticking to an anonymous display.

Looking at the asterisk source might be as enlightening as these docs.

Lonnie[/quote]

:smiley: Thank you, thank you, thank you. Worked a treat.