Summary:ASTERISK-01665: Blocked CallerIDs appear as from 'asterisk' not as 'unavailable'
Reporter:grunky (grunky)Labels:
Date Opened:2004-05-20 15:26:14Date Closed:2011-06-07 14:11:54
Versions:Frequency of
Description:When asterisk receives a call that has the callerid blocked or unavailable the CALLERID is set to 'asterisk'.  

Most users are puzzled when presented w/ a call from asterisk w/ no phone number.  The CALLERID should be set to 'CallerID blocked' or 'CallerID unavailable'.

This will clarify things for average users.


Yes technically all incoming calls come from the pbx hence the CALLERID is set to 'asterisk' I feel this is ambiguous at best, ie Joe User will ask "Who's asterisk?" and downright confusing at worst.
Comments:By: Mark Spencer (markster) 2004-05-20 20:34:55

Blocked callerid's show up as Asterisk only because that's how your SIP endpoint chooses to display it.  You have "name" <number@host> format for the From.  If we don't have a name, then we send just number@host, and if we don't have a number, we put asterisk.  I'm not sure how much more helpful "unknown" is, but you can override it anyway with "callerid=<foo>" in your general section.

By: Mark Spencer (markster) 2004-05-21 02:03:02

Let me know if that works for you, so i can close this one out.

By: grunky (grunky) 2004-05-21 11:47:25

I have the following in extensions.conf in the general section.

callerid=<caller id unavialable>

And still get a call from asterisk.

The reason I opened this bug is if a company has a pbx their replacing thats correctly accounces callerid as blocked or unavialable and said pbx gets replaced w/ asterisk.  All the sudden calls pour in as asterisk - the end users thinks this behavior is wrong and gets confused as to why the pbx admin would let this pass.

By: zoa (zoa) 2004-05-21 11:54:27

i think kram means change it in zaptel or was it zapata.conf, but even then all calls will have that caller id i think, even the ones with a non blocked callerid.

Never changed that value, so i'm not even sure if it will affect incoming or outgoing calls but its worth a try.

By: zoa (zoa) 2004-05-21 11:55:19

you could of course just add some extra extension logic to see if the callerid is empty and if it is change it to 'blocked' or so for all incoming calls.

By: Mark Spencer (markster) 2004-05-21 11:55:19

it can only be the word "unknown" or something else that has no formatting characters or spaces in it.

This is about how SIP sends callerid, and about how the end point renders it.  There is no way to say "unknown" callerid in SIP that i know if you simply have to put whatever you want in front of the "@" sign.

So, to clarify...

try "callerid=unknown"

and see if that helps.

By: Mark Spencer (markster) 2004-05-21 11:56:00

And yes, i'm talking about sip.conf [general] section...

By: grunky (grunky) 2004-05-21 12:17:10

In reference to zoa who suggested I put in some logic to rewrite the callerid, I've tried to put this in....  and it doesn't work - each one at a time after stopping and restarting.

exten => s,1,gotoif,"$[${CALLERID} = asterisk]?2:3";
exten => s,2,SetCallerID("unknown" <0>)

exten => s,1,gotoif,"$[${CALLERID} = asterisk<asterisk>]?2:3";
exten => s,2,SetCallerID("unknown" <0>)

exten => s,1,gotoif,"$[${CALLERID} = ]?2:3";
exten => s,2,SetCallerID("unknown" <0>)

If however I put in a number, ie the number from my cell phone, example below - this will re-write the caller id

exten => s,1,gotoif,"$[${CALLERIDNUM} = 1235551212]?2:3";
exten => s,2,SetCallerID("unknown" <0>)

By: grunky (grunky) 2004-05-21 12:29:58


Sorry about that - in my sip.conf file I now have


And that has replaced the


when unknown/blocked callerids come in.

I just feel this bug is a small behavior bug.  Didn't want to start anything big over it.  Just felt unaviable or blocked should show up as so.

Anyway thanks Mark!

By: Mark Spencer (markster) 2004-05-21 15:25:08

Well, as long as it's sufficient to make it say something else.  "asterisk" seemed a reasonable default to me.  might be handy if we could also set the name so you could do:

callerid="Unknown Number" <unknown>

or something but even that syntax seems kludgy.  If you think of anything better just post a patch.