NO caller ID on incoming calls

configuration
Tags: #<Tag:0x00007fafc124f888>

(Nice Guy) #1

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 [223@ext-local:2] Macro(“Local/223@from-internal-00000002;2”, “exten-vm,223,223,0,0,0”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-exten-vm:1] Macro(“Local/223@from-internal-00000002;2”, “user-callerid,”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:1] Set(“Local/223@from-internal-00000002;2”, “TOUCH_MONITOR=1567693684.17”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:2] Set(“Local/223@from-internal-00000002;2”, “AMPUSER=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:3] GotoIf(“Local/223@from-internal-00000002;2”, “0?report”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:4] ExecIf(“Local/223@from-internal-00000002;2”, “1?Set(REALCALLERIDNUM=unknown)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:5] Set(“Local/223@from-internal-00000002;2”, “AMPUSER=”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:6] GotoIf(“Local/223@from-internal-00000002;2”, “0?limit”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:7] Set(“Local/223@from-internal-00000002;2”, “AMPUSERCIDNAME=”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:8] ExecIf(“Local/223@from-internal-00000002;2”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:9] GotoIf(“Local/223@from-internal-00000002;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 [s@macro-user-callerid:16] NoOp(“Local/223@from-internal-00000002;2”, “Macro Depth is 2”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:17] GotoIf(“Local/223@from-internal-00000002;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 [s@macro-user-callerid:18] GotoIf(“Local/223@from-internal-00000002;2”, “0?continue”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:19] ExecIf(“Local/223@from-internal-00000002;2”, “1?Set(__CALLEE_ACCOUNCODE=)”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:20] Set(“Local/223@from-internal-00000002;2”, “__TTL=63”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:21] GotoIf(“Local/223@from-internal-00000002;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 [s@macro-user-callerid:37] Set(“Local/223@from-internal-00000002;2”, “CALLERID(number)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:38] Set(“Local/223@from-internal-00000002;2”, “CALLERID(name)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:39] GotoIf(“Local/223@from-internal-00000002;2”, “0?cnum”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:40] Set(“Local/223@from-internal-00000002;2”, “CDR(cnam)=unknown”) in new stack

VERBOSE[17441][C-00000004] pbx.c: Executing [s@macro-user-callerid:41] Set(“Local/223@from-internal-00000002;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.


(Lorne Gaetz) #2

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.


(Nice Guy) #3

How do I find the SIP headers?


(Dave Burgess) #4

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.


(Nice Guy) #5

Okay thanks I’ll Post and update in a few


(Nice Guy) #6

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”


(Dave Burgess) #7

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.


#8

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


#9

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


(Nice Guy) #10

made no difference


(Nice Guy) #11

what is the command needed to accomplish this?


#12

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.


(Nice Guy) #13

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


(Nice Guy) #14

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


(Nice Guy) #15

[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:unknown@10.0.0.30>;tag=as6ea5f25d
To: <sip:229@10.0.0.43:5060>;tag=232381116
Call-ID: 291850a862b85c4f09a6416558568089@10.0.0.30:5060
CSeq: 102 CANCEL
Contact: <sip:229@10.0.0.43: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:unknown@10.0.0.30>;tag=as6ea5f25d
To: <sip:229@10.0.0.43:5060>;tag=232381116
Call-ID: 291850a862b85c4f09a6416558568089@10.0.0.30:5060
CSeq: 102 INVITE
Contact: <sip:229@10.0.0.43: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:229@10.0.0.43:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK74c1839f
Max-Forwards: 70
From: “unknown” <sip:unknown@10.0.0.30>;tag=as6ea5f25d
To: <sip:229@10.0.0.43:5060>;tag=232381116
Contact: <sip:unknown@10.0.0.30:5060>
Call-ID: 291850a862b85c4f09a6416558568089@10.0.0.30:5060
CSeq: 102 ACK
User-Agent: FPBX-14.0.11(13.22.0)
Content-Length: 0


#16

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.


(Nice Guy) #17

INVITE sip:229@10.0.0.43:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.30:5060;branch=z9hG4bK02fc7d25
Max-Forwards: 70
From: “unknown” <sip:unknown@10.0.0.30>;tag=as70a1af6b
To: <sip:229@10.0.0.43:5060>
Contact: <sip:unknown@10.0.0.30:5060>
Call-ID: 02c36dcf789579282c8a762d09b7d730@10.0.0.30: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:unknown@10.0.0.30>
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


(Lorne Gaetz) #18

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.


(Nice Guy) #19

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


(Nice Guy) #20

[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 ‘6536e30f4713c9943e1b0bdc34441258@10.0.0.30: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:7584523668@10.0.0.30 SIP/2.0
Via: SIP/2.0/UDP 10.0.0.31:5060;branch=z9hG4bK7f444c154bf59de5
From: “”<sip:unknown@10.0.0.30>;tag=4f82d89794371e77
To: <sip:7584523668@10.0.0.30>
Contact: <sip:10.0.0.31:5060>
Supported: replaces, timer, path
Call-ID: d0e368929c3138f487d6e343a150eee3@10.0.0.31
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