[A*UG] Polycom and Caller ID

Gil Kloepfer aaug at kloepfer.org
Sun Jul 25 16:08:24 CDT 2010


Jim-

On Sat, Jul 24, 2010 at 08:58:41PM -0500, Jim Freeze wrote:
> I am trying to get Polycom 550 phones to display callerid name and
> callerid number.

The easiest way to do that is to not set the Caller-ID manually, but
let Asterisk handle it.  In other words, put what you want in sip.conf
(callerid=fred <555>) so that the call is originated with the correct
Caller-ID.

If you do what you're doing (below), then anytime someone calls the
extension (in your case, 6825) the Caller-ID *name* will always show up
as 555(fred), which is what you see now.

That's not Polycom-specific, that's Asterisk 101.

> My dialplan is simple:
> 
> exten => _6825,1,Answer()
> exten => _6825,n,Set(CALLERID(name)="555(fred)")

If you feel you *must* do things this way, then what works is:

exten => _6825,n,Set(CALLERID(name)="fred <555>")

BUT this is not the right way to do this.  You should set the number
with CALLERID(num) and the name with CALLERID(name)...or, you can
use CALLERID(all) to set both at the same time, but again I'm not sure
why you'd do things this way.

> exten => _6825,1,Answer()
> exten => _6825,n,Set(CALLERID(name)="555(fred)")
> exten => _6825,n,Set(CALLERID(num)=)
> 
> I get the callerid name displayed on the first line and 'asterisk' on
> the second line.
> 
> Anyone know what I am doing wrong?

You should either be setting the name or num or all, and when you
mix these you get weird results depending on what Asterisk already
knew as "authoritative" (what the internals refer to as the ANI)
and what was a default.  I wouldn't do it this way unless you think
you really need to do it for some specific application (see "one final
comment" below for one of those).

Another comment I'll make is that you should not be using the "_"
prefix on the extension unless you are doing pattern matching (with
wildcards).  If you are just matching an extension, then you should
only have the extension number.

Also, you shouldn't use Answer() when you are directing a call to a phone.
Use Progress() somewhere before the Dial() so that the call progress
tones/speech get sent to the caller, but the call will not be
actually answered until the recipient picks-up.  You'd use Answer() before
you do something like go to voicemail or to an IVR procedure.  This makes
a difference when a call is coming in from the telco on a digital
circuit.  If you Answer() and Dial() and the phone someone is calling
is busy, then the caller gets billed for a completed call only to hear
a busy signal.  If you use Progress() and Dial(), then the caller is
not charged if the target phone is not lifted, and the caller is not
billed for a busy call.  You'll see the difference with this in the
CDR also, I believe.

I discovered the Answer() thing when I was calling the office from my
cell phone and discovered that the cell phone indicated a call was
completed when I never got through to someone (it just rang) or I was
calling a "number disconnected" message on one of our unused DIDs.
In both of those cases, a call was not really completed.

I think all this should answer your question, and probably more than
you wanted.

One final comment:  There IS a reason to be setting your Caller-ID
specifically in the dialplan and this is when you have a digital
telco trunk with DID and you are originating a call from your PBX
from a non-DID extension to the telco.  In this case, you should set
your Caller-ID to some kind of reasonable default, such as the
"switchboard" or main number for your organization.  If I had a nickel
for every time I got a call on a telco trunk with the Caller-ID set to
some invalid number because of someone's misconfigured PBX...

---
Gil Kloepfer
aaug at kloepfer.org


More information about the Austin-Asterisk-Users-Group mailing list