Getting Caller ID Working [SOLVED]

The Default should work perfect.

I would be guessin but if anything was messing around with the callerid there would be mention of it in the logs.

Perhaps you have an issue with the endpoints.

Check the PAI or RPI in extensions, and
Display CallerID on Calling Phone and
Display Dialed Number on Calling Phone
in advanced, although I think the last two would affect outbound calls

Hv.

But it’s not. As I noted above, turning on Privacy Manager got the incoming Caller ID to at least show up in the logs. But then Privacy Manger blocked the call from coming through and I have no idea how to configure Privacy Manager. A quick search does not turn up any kind of tutorial on Privacy Manager. So I guess it’s an arcane and obscure tool.

I just found a post from a couple of years ago (don’t have it) suggesting Display CallerID on Calling Phone “off” and then CallerID=PAI. Not at home, so will have to try this.

Hey K,

you keep mentioning privacy manager,
am I missing something.
I find no reference to such a module in the stock (perhaps old) fpbx.
maybe it is in that super flash new version I can’t get on with.

Hv.

It’s a tab under Inbound Routes.

I thought for sure I had the answer with sendrpid. I’ve been pointed to trustrid and sendrid both here and over at the Asterisk forum. The help mouseover for sendrpid:

Whether Asterisk should send RPID (or PAI) info to the device. Usually should be enabled to the settings used by your device for CONNECTEDLINE() functionality to work if supported by the endpoint.[sendrpid]

Sure as heck sounds like my problem. Plus it’s off by default. My HT-503s forward their calls to a configured extension. That extension uses an inbound route to activate a ring group. Sure seems like “Send Remote Party ID Header” is the answer on that extension. (There is no P-Asserted-Identity Header in the stream, I checked) But no still the same old same old:

[2016-04-22 14:27:39] VERBOSE[2184][C-00000000] pbx.c: Executing [s@macro-user-callerid:11] Set("SIP/09253131111-00000000", "CALLERID(all)="Home Line" <09253131111>") in new stack

I even tried setting it on the extension I’m working on in case I’m not understanding something.

And has a “mouse over help” and because you actually HAVE a callerid(number) it should not pertain on or off. I suggest a

sip set debug on

and watch the logs, the inbound leg will without doubt have the callerid data, if the outbound leg to the phone also has it , then it would seem to be a “phone” problem, what exactly are you using for extensions 10-15?

I don’t know what you mean. We’ve already established that I’m receiving CallerID information. I got it in once with the Privacy Manager thing.

My phones are Grandstream GXP2130s.

I will try sip set debug on.

If you look carefully, there is a “?” just to the upper right of most variable prompts, if you “hover” the “mouse” pointer "over " it , what do you see :wink: ?

That’s the text I posted

Sorry I can’t see you having posted

“If no CallerID has been received, Privacy Manager will ask the caller to
enter their phone number. If an user/extension has Call Screening enabled,
the incoming caller will be be prompted to say their name when the call
reaches the user/extension.”

anywhere.

Here’s the full FULL log :slight_smile: Too much stuff to grep out the call. Look to the end of it. I

File Deleted

It’s got my phone numbers in it but I think they’re safe with you and I’ll delete the file in a bit.

I do see the calling number in there. Gotta run. Will respond later.

Nor I you have time to grep it out, you will have to spend some time isolating one call with Sip debugging enabled.

I would also suggest you set up the connection to the ATA as a trunk

http://wiki.freepbx.org/pages/viewpage.action?pageId=33293313

if you haven’t

After reading the word Extension a few to many times that was going to be my next question.
Kirk, the log file will be available to anyone on the internet so sanitize it if required.

Ahh… Privacy Manager.

Leave it off, but I guess as a testing process it could be turned on to see if callerid is at least getting to that point, if it asks for a number then no cli was detected.
Never tried it myself.

Hv.

Oh, Dicko, believe me I know that page. That’s where this all started and why I have HT-503s. But if you follow though it, the trunks have nothing to do with the inbound traffic.

Also, look at the end: “Things not done: caller id.” Why? Because, the author says, there are pages all over describing the process. Really? Where? I’m having a hard time.

I don’t have that ATA, just many others so I can’t help you further, but apparently your “trunk” is delivering CallerID as expected, so your problem is probably downline , good luck

(never did like any grandstream stuff though, anything I tried all broke within a few months, YMMV)

INVITE sip:[email protected]:5062 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.28:5060;branch=z9hG4bK0ce5ed05
Max-Forwards: 70
From: "Kirk's Office" ;tag=as3d9ba8ba
To: 
Contact: 
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-13.0.106(13.7.0)
Date: Fri, 22 Apr 2016 21:53:55 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Remote-Party-ID: "Kirk's Office" ;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length: 321

It looks like the Caller ID is being sent to them. Have you asked Grandstream?

1 Like

Caller ID is being set by asterisk. But it is being replaced with the name and number of the extension that is receiving the call from my HT-503s and not allowing the Caller ID information being sent to be displayed on my phones. That’s what I’m trying to figure out.

Yes, I have been in contact with Grandstream. All they did was help me confirm the Caller ID information was being sent by the HT-503s. They are not Asterisk/FreePBX experts.

Xrabau, would you please delete the first and fifth lines of your code post. That’s a real phone number. Thanks.

The code block that is setting Caller ID is in extensions_additional.conf and is the macro [macro-user-callerid]. The code doing the dirty business is:

exten => s,1,Set(TOUCH_MONITOR=${UNIQUEID})
exten => s,n,Set(AMPUSER=${IF($["${AMPUSER}" = ""]?${CALLERID(number)}:${AMPUSER})})
exten => s,n,GotoIf($["${CUT(CHANNEL,@,2):5:5}"="queue" | ${LEN(${AMPUSERCIDNAME})}]?report)
exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""]?Set(REALCALLERIDNUM=${CALLERID(number)}))
exten => s,n,Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)})
exten => s,n,GotoIf($["${AMPUSER}" = "none"]?limit)
exten => s,n,Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)})
exten => s,n,GotoIf($["${AMPUSERCIDNAME:1:2}" = ""]?report)
exten => s,n,Set(AMPUSERCID=${IF($["${ARG2}" != "EXTERNAL" & "${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)}" = "1"]?${DB_RESULT}:${AMPUSER})})
exten => s,n,Set(__DIAL_OPTIONS=${IF($["${DB_EXISTS(AMPUSER/${AMPUSER}/dialopts)}" = "1"]?${DB_RESULT}:${DIAL_OPTIONS})})
exten => s,n,Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSERCID}>)

The AMPUSER stuff is clearly pulling the extension name and number out of the system and using that for the Caller ID.

What I’d like to do is put some custom code in extensions_custom.conf under the included [macro-user-callerid-custom]. I’ve tried but it doesn’t execute. Any experts here?

What is an expert anyway.?

I think there are some very (VERY) knowledgeable people hanging around.

Any time I have used an ATA I configure it as a trunk.
if it also has an FXS port then you can configure that as an extension.
but hey whatever rocks your boat.(as long as it floats)

Hv.

Yes, I haven’t gotten around to that yet. So what’s your point? Some extensions, yes actual Applications | Extensions extensions are configured to receive the inbound calls from my HT-503s. That’s what the instructions on the wiki page said to do. And it’s working. Other than the fact that FreePBX is insisting on replacing the Caller ID information with the name and number of that extension.

No offense was intended by the experts comment. I am merely looking for help on a feature that I think should be working. The logs clearly show the CID information coming in and the dial plan scripts overwriting it with the extension info.

Why?