NO caller ID on incoming calls

Yes it’s me again, this time there is no DAHDI involved.

Trunk SIP settings

OutGoing
–Peer Details–
type=friend
qualify=yes
secret=“password”
host=“IP Address”
insecure=invite
context=from-trunk
trustrpid=yes
dtmfmode=rfc2833
port=5060
canreinvite=no
disallow=all
allow=ulaw
disallowed_methods=UPDATE

There is nothing in inbound (Based off instructions on wiki page)

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:2] Macro(“Local/[email protected];2”, “exten-vm,223,223,0,0,0”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:1] Macro(“Local/[email protected];2”, “user-callerid,”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:1] Set(“Local/[email protected];2”, “TOUCH_MONITOR=1567693684.17”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:2] Set(“Local/[email protected];2”, “AMPUSER=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:3] GotoIf(“Local/[email protected];2”, “0?report”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:4] ExecIf(“Local/[email protected];2”, “1?Set(REALCALLERIDNUM=unknown)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:5] Set(“Local/[email protected];2”, “AMPUSER=”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:6] GotoIf(“Local/[email protected];2”, “0?limit”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:7] Set(“Local/[email protected];2”, “AMPUSERCIDNAME=”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:8] ExecIf(“Local/[email protected];2”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:9] GotoIf(“Local/[email protected];2”, “1?report”) in new stack

VERBOSE[17441][C-00000004] pbx_builtins.c: Goto (macro-user-callerid,s,16)
VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:16] NoOp(“Local/[email protected];2”, “Macro Depth is 2”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:17] GotoIf(“Local/[email protected];2”, “1?report2:macroerror”) in new stack

VERBOSE[17441][C-00000004] pbx_builtins.c: Goto (macro-user-callerid,s,18)
VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:18] GotoIf(“Local/[email protected];2”, “0?continue”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:19] ExecIf(“Local/[email protected];2”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:20] Set(“Local/[email protected];2”, “__TTL=63”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:21] GotoIf(“Local/[email protected];2”, “1?continue”) in new stack

VERBOSE[17441][C-00000004] pbx_builtins.c: Goto (macro-user-callerid,s,37)
VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:37] Set(“Local/[email protected];2”, “CALLERID(number)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:38] Set(“Local/[email protected];2”, “CALLERID(name)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:39] GotoIf(“Local/[email protected];2”, “0?cnum”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:40] Set(“Local/[email protected];2”, “CDR(cnam)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [[email protected]:41] Set(“Local/[email protected];2”, “CDR(cnum)=unknown”) in new stack

Hopefully this helps a little.

N.B
I have a client who uses PIAF and basically with the same settings as far as I can tell and the caller ID works for them. So I’m not sure as to why this one doesn’t.

Look at the SIP headers on an incoming INVITE and see if the CallerID name/number show up there anywhere. If not, this is a question for the provider.

How do I find the SIP headers?

Use the debug commands for the channel driver associated with the trunk you set up.

For example, if your provider is using 5060 to contact you, you are probably using PJ-SIP to connect, so setting up a PJ-SIP debug session from connecting to the server using “asterisk -vr” from the console would probably be a good plan. The debug output is displayed on the console and in the /var/log/asterisk/full file.

There’s a package called ‘sngrep’ you can “yum install” that can help you interpret your headers, if that would help.

Okay thanks I’ll Post and update in a few

dialparties.agi: Caller ID name is ‘unknown’ number is ‘unknown’
(I hope this is what I should be posting :sweat_smile:)

There was an error with the sngrep update
“Failed connect to mirrorlist.sangoma.net:80; No route to host”

The context of that is the important part. The stuff in front of it, specifically, will give us an idea of what is being sent and why what you are seeing in this line is what is what it is. Did you look at Lorne’s extremely important article on Virtuous Signalling? You really need to read through that so you can get an idea what’s happening.

This is going to be a bigger problem later.

You need to see the SIP header. Turn sip debug on for your trunk and make an incoming call.

A quick thing to try: Change the context for your trunk from
context=from-trunk
to
context=from-pstn-toheader

1 Like

made no difference

what is the command needed to accomplish this?

As the Asterisk command prompt, type
sip set debug on
then call in from your mobile.
The SIP trace will appear in the Asterisk log, along with the normal entries.

Look at the incoming INVITE for caller ID info.

okay thanks I’ll do so and post in a bit

I’m not sure to what to post there’s no much and I’m lost

[2019-09-06 15:03:13] VERBOSE[15071] chan_sip.c: — (11 headers 0 lines) —
[2019-09-06 15:03:13] VERBOSE[15071] chan_sip.c:
<— SIP read from UDP:10.0.0.43:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK74c1839f
From: “unknown” <sip:[email protected]>;tag=as6ea5f25d
To: <sip:[email protected]:5060>;tag=232381116
Call-ID: [email protected]:5060
CSeq: 102 CANCEL
Contact: <sip:[email protected]:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP1615 1.0.2.27
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
[2019-09-06 15:03:13] VERBOSE[15071] chan_sip.c: — (11 headers 0 lines) —
[2019-09-06 15:03:13] VERBOSE[15071] chan_sip.c:
<— SIP read from UDP:10.0.0.43:5060 —>
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK74c1839f
From: “unknown” <sip:[email protected]>;tag=as6ea5f25d
To: <sip:[email protected]:5060>;tag=232381116
Call-ID: [email protected]:5060
CSeq: 102 INVITE
Contact: <sip:[email protected]:5060>
Supported: replaces, path, timer
User-Agent: Grandstream GXP1615 1.0.2.27
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

<------------->
[2019-09-06 15:03:13] VERBOSE[15071] chan_sip.c: — (11 headers 0 lines) —
[2019-09-06 15:03:13] VERBOSE[15071][C-0000002a] chan_sip.c: Transmitting (no NAT) to 10.0.0.43:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK74c1839f
Max-Forwards: 70
From: “unknown” <sip:[email protected]>;tag=as6ea5f25d
To: <sip:[email protected]:5060>;tag=232381116
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 ACK
User-Agent: FPBX-14.0.11(13.22.0)
Content-Length: 0

Post the very first INVITE associated with the incoming call, which should be from the trunking provider to Asterisk. What you posted was related to the call from Asterisk to extension 229.

INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK02fc7d25
Max-Forwards: 70
From: “unknown” <sip:[email protected]>;tag=as70a1af6b
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5060>
Call-ID: [email protected]:5060
CSeq: 102 INVITE
User-Agent: FPBX-14.0.11(13.22.0)
Date: Fri, 06 Sep 2019 19:56:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Asserted-Identity: “unknown” <sip:[email protected]>
Content-Type: application/sdp
Content-Length: 348

v=0
o=root 2130492956 2130492956 IN IP4 10.0.0.30
s=Asterisk PBX 13.22.0
c=IN IP4 10.0.0.30
t=0 0
m=audio 18980 RTP/AVP 0 8 3 111 9 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:9 G722/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

If you are absolutely sure this is an incoming INVITE from your SIP provider (which seems unlikely to me) then you need to contact them. There is nothing to work with here other than the call was sent to ext. 229.

to be real honest I am not sure.
Can I get an example as to what it is suppose to look like?

[2019-09-06 16:12:32] VERBOSE[15071] chan_sip.c: — (10 headers 0 lines) —
[2019-09-06 16:12:32] VERBOSE[15071] chan_sip.c: Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS
[2019-09-06 16:13:06] VERBOSE[15071] chan_sip.c:
<— SIP read from UDP:10.0.0.31:5060 —>
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 10.0.0.31:5060;branch=z9hG4bK7f444c154bf59de5
From: “”<sip:[email protected]>;tag=4f82d89794371e77
To: <sip:[email protected]>
Contact: <sip:10.0.0.31:5060>
Supported: replaces, timer, path
Call-ID: [email protected]
CSeq: 5670 INVITE
User-Agent: Grandstream GXW4108 (HW 2.3, Ch:0) 1.4.1.5
Max-Forwards: 70
Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK
Content-Type: application/sdp
Content-Length: 331

This is the other invite where the “from” is blank. So its either this one or the previous