Outbound CID issues

Hi all,

Running into a little problem. I had an asterisk 16 system setup with sip and when I would call out on a specific extension, the caller id name/number listed in the callerid directive would show up on the receiving phone. However, since moving to asterisk 20 and pjsip, the callerid directive doesn’t seem to work correctly. When I put a NoOp in the dialplan before the outbound call and output the callerid , it shows the value that’s listed in the callerid directive in pjsip.conf. However, the cid on the receiving end is not that same value. My provider is Vitelity and here’s a sample of the config in pjsip

[endpoint](!)
type=endpoint
context=start
transport=transport-udp
disallow=all
allow=ulaw
direct_media=no
send_rpid=yes
send_pai=yes

[auth-userpass](!)
type=auth
auth_type=userpass

[aor-multi-reg](!)
type=aor
remove_existing=no
max_contacts=10
qualify_frequency=15

[Phone1](endpoint)
auth=Phone1
aors=Phone1
trust_id_outbound=yes
callerid="Test Phone" <5555555555>   ; This number is fake for this post, the real one is in my config and registerd in dnis with my provider.

[Phone1](auth-userpass)
username=Phone1
password=password

[Phone1](aor-multi-reg)

You need to actually show a SIP trace using “pjsip set logger on” to show what is being sent to your provider.

myendpoint.com = Endpoint IP 
7777777777 = DID being dialed
Phone1 = Endpoint 
myastserver.com = asterisk server
5555555555 = outbound CID (this is registered with vitelity)
64.2.142.189/outbound.vitelity.net = vitelity 

<--- Transmitting SIP request (497 bytes) to UDP:myendpoint.com:17105 --->
OPTIONS sip:Phone1@myendpoint.com:17105 SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPj38e79ef9-37b6-4907-8724-87e615bff38e
From: <sip:Phone1@myastserver.com>;tag=e0261304-ed97-4c15-9b81-cebe6b39585f
To: <sip:Phone1@myendpoint.com>
Contact: <sip:Phone1@myastserver.com:5060>
Call-ID: 496c2b3f-e2c5-4502-8cc9-045749294ad7
CSeq: 61135 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


<--- Received SIP response (521 bytes) from UDP:myendpoint.com:17105 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP myastserver.com:5060;rport=5060;branch=z9hG4bKPj38e79ef9-37b6-4907-8724-87e615bff38e
From: <sip:Phone1@myastserver.com>;tag=e0261304-ed97-4c15-9b81-cebe6b39585f
To: <sip:Phone1@myendpoint.com>;tag=1830663429
Call-ID: 496c2b3f-e2c5-4502-8cc9-045749294ad7
CSeq: 61135 OPTIONS
Supported: replaces, path
User-Agent: Grandstream GRP2616 1.0.11.15
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP request (1342 bytes) from UDP:myendpoint.com:17105 --->
INVITE sip:7777777777@myastserver.com SIP/2.0
Via: SIP/2.0/UDP myendpoint.com:17105;branch=z9hG4bK1637823782;rport
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 510 INVITE
Contact: "8767" <sip:Phone1@myendpoint.com:17105>
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2616 1.0.11.15
Privacy: none
P-Preferred-Identity: "8767" <sip:Phone1@myastserver.com>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=04-D9-F5-14-31-04
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-57-74-B0
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   470

v=0
o=Phone1 8000 8000 IN IP4 myendpoint.com
s=SIP Call
c=IN IP4 myendpoint.com
t=0 0
m=audio 34544 RTP/AVP 0 8 4 18 9 97 2 123 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Transmitting SIP response (509 bytes) to UDP:myendpoint.com:17105 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP myendpoint.com:17105;rport=17105;received=myendpoint.com;branch=z9hG4bK1637823782
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>;tag=z9hG4bK1637823782
CSeq: 510 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1723913946/75582dc138f2e35fbaaff06e4932801c",opaque="22d731ef79d7087f",algorithm=MD5,qop="auth"
Server: Asterisk PBX 20.6.0
Content-Length:  0


<--- Received SIP request (320 bytes) from UDP:myendpoint.com:17105 --->
ACK sip:7777777777@myastserver.com SIP/2.0
Via: SIP/2.0/UDP myendpoint.com:17105;branch=z9hG4bK1637823782;rport
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>;tag=z9hG4bK1637823782
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 510 ACK
Content-Length: 0


<--- Received SIP request (1634 bytes) from UDP:myendpoint.com:17105 --->
INVITE sip:7777777777@myastserver.com SIP/2.0
Via: SIP/2.0/UDP myendpoint.com:17105;branch=z9hG4bK62282580;rport
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 511 INVITE
Contact: "8767" <sip:Phone1@myendpoint.com:17105>
Authorization: Digest username="Phone1", realm="asterisk", nonce="1723913946/75582dc138f2e35fbaaff06e4932801c", uri="sip:7777777777@myastserver.com", response="d611536de453e37e56a41227fee4da67", algorithm=MD5, cnonce="05327558", opaque="22d731ef79d7087f", qop=auth, nc=00000001
X-Grandstream-PBX: true
Max-Forwards: 70
User-Agent: Grandstream GRP2616 1.0.11.15
Privacy: none
P-Preferred-Identity: "8767" <sip:Phone1@myastserver.com>
P-Access-Network-Info: IEEE-EUI-48;eui-48-addr=04-D9-F5-14-31-04
P-Emergency-Info: IEEE-EUI-48;eui-48-addr=C0-74-AD-57-74-B0
Supported: replaces, path
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Type: application/sdp
Accept: application/sdp, application/dtmf-relay
Content-Length:   470

v=0
o=Phone1 8000 8000 IN IP4 myendpoint.com
s=SIP Call
c=IN IP4 myendpoint.com
t=0 0
m=audio 34544 RTP/AVP 0 8 4 18 9 97 2 123 101
a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=no
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:9 G722/8000
a=rtpmap:97 iLBC/8000
a=fmtp:97 mode=30
a=rtpmap:2 G726-32/8000
a=rtpmap:123 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

<--- Transmitting SIP response (333 bytes) to UDP:myendpoint.com:17105 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myendpoint.com:17105;rport=17105;received=myendpoint.com;branch=z9hG4bK62282580
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>
CSeq: 511 INVITE
Server: Asterisk PBX 20.6.0
Content-Length:  0


    -- Executing [7777777777@start:1] Set("PJSIP/Phone1-00000175", "CALLERID(num)=5555555555") in new stack
    -- Executing [7777777777@start:2] NoOp("PJSIP/Phone1-00000175", "5555555555") in new stack
    -- Executing [7777777777@start:3] Dial("PJSIP/Phone1-00000175", "PJSIP/7777777777@vitelity") in new stack
    -- Called PJSIP/7777777777@vitelity
<--- Transmitting SIP request (1158 bytes) to UDP:64.2.142.189:5060 --->
INVITE sip:7777777777@outbound.vitelity.net SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPj9d1c62a5-71e4-4e5b-95b3-12fe02fbb511
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Contact: <sip:asterisk@myastserver.com:5060>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20555 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
P-Asserted-Identity: "Test Company" <sip:5555555555@myastserver.com>
Remote-Party-ID: "Test Company" <sip:5555555555@myastserver.com>;party=calling;privacy=off;screen=no
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Type: application/sdp
Content-Length:   261

v=0
o=- 80749785 80749785 IN IP4 myastserver.com
s=Asterisk
c=IN IP4 myastserver.com
t=0 0
m=audio 10616 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<--- Received SIP response (376 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPj9d1c62a5-71e4-4e5b-95b3-12fe02fbb511;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20555 INVITE
Content-Length: 0


<--- Received SIP response (561 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPj9d1c62a5-71e4-4e5b-95b3-12fe02fbb511;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=4850.55bbe6d5c3f31952a4d11d9110f9b2a9
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20555 INVITE
Proxy-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="193682b3"
Server: OpenSIPS (3.2.11 (x86_64/linux))
Content-Length: 0


<--- Transmitting SIP request (468 bytes) to UDP:64.2.142.189:5060 --->
ACK sip:7777777777@outbound.vitelity.net SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPj9d1c62a5-71e4-4e5b-95b3-12fe02fbb511
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=4850.55bbe6d5c3f31952a4d11d9110f9b2a9
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20555 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


<--- Transmitting SIP request (1346 bytes) to UDP:64.2.142.189:5060 --->
INVITE sip:7777777777@outbound.vitelity.net SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPja2a32b78-479e-4059-961a-ec7afd88a038
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Contact: <sip:asterisk@myastserver.com:5060>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20556 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Proxy-Authorization: Digest username="myVitUser", realm="asterisk", nonce="193682b3", uri="sip:7777777777@outbound.vitelity.net", response="cbe0efb610f530666dd93ed2c00fedb2", algorithm=MD5
P-Asserted-Identity: "Test Company" <sip:5555555555@myastserver.com>
Remote-Party-ID: "Test Company" <sip:5555555555@myastserver.com>;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length:   261

v=0
o=- 80749785 80749785 IN IP4 myastserver.com
s=Asterisk
c=IN IP4 myastserver.com
t=0 0
m=audio 10616 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<--- Received SIP response (376 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPja2a32b78-479e-4059-961a-ec7afd88a038;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20556 INVITE
Content-Length: 0


<--- Received SIP response (606 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPja2a32b78-479e-4059-961a-ec7afd88a038;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=as3403e4f0
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20556 INVITE
Server: packetrino
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="11dcf3b9"
Content-Length: 0


<--- Transmitting SIP request (441 bytes) to UDP:64.2.142.189:5060 --->
ACK sip:7777777777@outbound.vitelity.net SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPja2a32b78-479e-4059-961a-ec7afd88a038
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=as3403e4f0
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20556 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


<--- Transmitting SIP request (1528 bytes) to UDP:64.2.142.189:5060 --->
INVITE sip:7777777777@outbound.vitelity.net SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPjb78763d7-cb5a-426f-b3d6-65b928baf246
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Contact: <sip:asterisk@myastserver.com:5060>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20557 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Proxy-Authorization: Digest username="myVitUser", realm="asterisk", nonce="193682b3", uri="sip:7777777777@outbound.vitelity.net", response="cbe0efb610f530666dd93ed2c00fedb2", algorithm=MD5
Authorization: Digest username="myVitUser", realm="asterisk", nonce="11dcf3b9", uri="sip:7777777777@outbound.vitelity.net", response="59fec1b872fe92067c57ce3351e44f1f", algorithm=MD5
P-Asserted-Identity: "Test Company" <sip:5555555555@myastserver.com>
Remote-Party-ID: "Test Company" <sip:5555555555@myastserver.com>;party=calling;privacy=off;screen=no
Content-Type: application/sdp
Content-Length:   261

v=0
o=- 80749785 80749785 IN IP4 myastserver.com
s=Asterisk
c=IN IP4 myastserver.com
t=0 0
m=audio 10616 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

<--- Received SIP response (376 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPjb78763d7-cb5a-426f-b3d6-65b928baf246;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20557 INVITE
Content-Length: 0


<--- Received SIP response (901 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPjb78763d7-cb5a-426f-b3d6-65b928baf246;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=as32e9dc05
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20557 INVITE
Server: packetrino
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:7777777777@64.2.142.189:5060;transport=udp>
Content-Type: application/sdp
Content-Length: 275

v=0
o=root 1448593790 1448593790 IN IP4 64.2.142.189
s=Asterisk PBX 16.8.0
c=IN IP4 64.2.142.189
t=0 0
m=audio 31976 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
a=ptime:20

    -- PJSIP/vitelity-00000176 is making progress passing it to PJSIP/Phone1-00000175
<--- Transmitting SIP response (939 bytes) to UDP:myendpoint.com:17105 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP myendpoint.com:17105;rport=17105;received=myendpoint.com;branch=z9hG4bK62282580
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>;tag=664067ee-eac1-4222-8786-59784725752d
CSeq: 511 INVITE
Server: Asterisk PBX 20.6.0
Contact: <sip:myastserver.com:5060>
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
P-Asserted-Identity: <sip:7777777777@myastserver.com>
Remote-Party-ID: <sip:7777777777@myastserver.com>;party=called;privacy=off;screen=no
Content-Type: application/sdp
Content-Length:   229

v=0
o=- 8000 8002 IN IP4 myastserver.com
s=Asterisk
c=IN IP4 myastserver.com
t=0 0
m=audio 10538 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

    -- PJSIP/vitelity-00000176 requested media update control 26, passing it to PJSIP/Phone1-00000175
    -- PJSIP/vitelity-00000176 requested media update control 26, passing it to PJSIP/Phone1-00000175
<--- Received SIP response (887 bytes) from UDP:64.2.142.189:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP myastserver.com:5060;received=myastserver.com;branch=z9hG4bKPjb78763d7-cb5a-426f-b3d6-65b928baf246;rport=5060
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=as32e9dc05
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20557 INVITE
Server: packetrino
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:7777777777@64.2.142.189:5060;transport=udp>
Content-Type: application/sdp
Content-Length: 275

v=0
o=root 1448593790 1448593790 IN IP4 64.2.142.189
s=Asterisk PBX 16.8.0
c=IN IP4 64.2.142.189
t=0 0
m=audio 31976 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=sendrecv
a=ptime:20

<--- Transmitting SIP request (451 bytes) to UDP:64.2.142.189:5060 --->
ACK sip:7777777777@64.2.142.189:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPj4ef62b5a-7b02-4345-8498-047159747aeb
From: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
To: <sip:7777777777@outbound.vitelity.net>;tag=as32e9dc05
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 20557 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


    -- PJSIP/vitelity-00000176 answered PJSIP/Phone1-00000175
<--- Transmitting SIP response (973 bytes) to UDP:myendpoint.com:17105 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP myendpoint.com:17105;rport=17105;received=myendpoint.com;branch=z9hG4bK62282580
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>;tag=664067ee-eac1-4222-8786-59784725752d
CSeq: 511 INVITE
Server: Asterisk PBX 20.6.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Contact: <sip:myastserver.com:5060>
Supported: 100rel, timer, replaces, norefersub
P-Asserted-Identity: <sip:7777777777@myastserver.com>
Remote-Party-ID: <sip:7777777777@myastserver.com>;party=called;privacy=off;screen=no
Content-Type: application/sdp
Content-Length:   229

v=0
o=- 8000 8002 IN IP4 myastserver.com
s=Asterisk
c=IN IP4 myastserver.com
t=0 0
m=audio 10538 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:140
a=sendrecv

    -- Channel PJSIP/vitelity-00000176 joined 'simple_bridge' basic-bridge <03619f43-5c9b-43a4-9247-ef4a42bae004>
    -- Channel PJSIP/Phone1-00000175 joined 'simple_bridge' basic-bridge <03619f43-5c9b-43a4-9247-ef4a42bae004>
<--- Received SIP request (593 bytes) from UDP:myendpoint.com:17105 --->
ACK sip:myastserver.com:5060 SIP/2.0
Via: SIP/2.0/UDP myendpoint.com:17105;branch=z9hG4bK612144937;rport
From: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
To: <sip:7777777777@myastserver.com>;tag=664067ee-eac1-4222-8786-59784725752d
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 511 ACK
Contact: <sip:Phone1@myendpoint.com:17105>
X-Grandstream-PBX: true
Max-Forwards: 70
Supported: replaces, path
User-Agent: Grandstream GRP2616 1.0.11.15
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Transmitting SIP request (497 bytes) to UDP:myendpoint.com:17105 --->
OPTIONS sip:Phone1@myendpoint.com:17105 SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPjeacf32ce-2df9-4f79-844f-49402a716ca3
From: <sip:Phone1@myastserver.com>;tag=673f554f-c1af-4cbc-b948-a5c594bbe929
To: <sip:Phone1@myendpoint.com>
Contact: <sip:Phone1@myastserver.com:5060>
Call-ID: d0d2c611-f483-47c8-8b0b-fff4a7202f9f
CSeq: 18026 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


<--- Received SIP response (521 bytes) from UDP:myendpoint.com:17105 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP myastserver.com:5060;rport=5060;branch=z9hG4bKPjeacf32ce-2df9-4f79-844f-49402a716ca3
From: <sip:Phone1@myastserver.com>;tag=673f554f-c1af-4cbc-b948-a5c594bbe929
To: <sip:Phone1@myendpoint.com>;tag=1825633939
Call-ID: d0d2c611-f483-47c8-8b0b-fff4a7202f9f
CSeq: 18026 OPTIONS
Supported: replaces, path
User-Agent: Grandstream GRP2616 1.0.11.15
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0


<--- Received SIP request (660 bytes) from UDP:64.2.142.189:5060 --->
BYE sip:asterisk@myastserver.com:5060 SIP/2.0
Via: SIP/2.0/UDP 64.2.142.189:5060;branch=z9hG4bK9mfdg6203oihhltm22c0sd00000j1.1
Max-Forwards: 68
From: <sip:7777777777@outbound.vitelity.net>;tag=as32e9dc05
To: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
CSeq: 102 BYE
User-Agent: packetrino
Proxy-Authorization: Digest username="myVitUser", realm="asterisk", algorithm=MD5, uri="sip:outbound.vitelity.net", nonce="11dcf3b9", response="5f89697bc8513c7e465f12da923f87b2"
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0


<--- Transmitting SIP response (401 bytes) to UDP:64.2.142.189:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 64.2.142.189:5060;rport=5060;received=64.2.142.189;branch=z9hG4bK9mfdg6203oihhltm22c0sd00000j1.1
Call-ID: a9b77006-d15a-4c10-a9a9-2bb58cf69c42
From: <sip:7777777777@outbound.vitelity.net>;tag=as32e9dc05
To: "Test Company" <sip:5555555555@myastserver.com>;tag=56e15151-454f-4538-a218-5bc358599220
CSeq: 102 BYE
Server: Asterisk PBX 20.6.0
Content-Length:  0


    -- Channel PJSIP/vitelity-00000176 left 'native_rtp' basic-bridge <03619f43-5c9b-43a4-9247-ef4a42bae004>
    -- Channel PJSIP/Phone1-00000175 left 'native_rtp' basic-bridge <03619f43-5c9b-43a4-9247-ef4a42bae004>
  == Spawn extension (start, 7777777777, 3) exited non-zero on 'PJSIP/Phone1-00000175'
<--- Transmitting SIP request (462 bytes) to UDP:myendpoint.com:17105 --->
BYE sip:Phone1@myendpoint.com:17105 SIP/2.0
Via: SIP/2.0/UDP myastserver.com:5060;rport;branch=z9hG4bKPj532165ea-fa4d-4d43-b8ba-d02928025d8e
From: <sip:7777777777@myastserver.com>;tag=664067ee-eac1-4222-8786-59784725752d
To: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 11594 BYE
Reason: Q.850;cause=16
Max-Forwards: 70
User-Agent: Asterisk PBX 20.6.0
Content-Length:  0


<--- Received SIP response (567 bytes) from UDP:myendpoint.com:17105 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP myastserver.com:5060;rport=5060;branch=z9hG4bKPj532165ea-fa4d-4d43-b8ba-d02928025d8e
From: <sip:7777777777@myastserver.com>;tag=664067ee-eac1-4222-8786-59784725752d
To: "8767" <sip:Phone1@myastserver.com>;tag=1036737970
Call-ID: 2104226561-17105-52@GG.HF.BD.DC
CSeq: 11594 BYE
Contact: <sip:Phone1@myendpoint.com:17105>
Supported: replaces, path
User-Agent: Grandstream GRP2616 1.0.11.15
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0



According to the output, Asterisk is sending the given callerid to the provider. (If you’ve sanitized it to match that is) so either the format isn’t what the provider expects, or they are blocking it for some reason. I’d suggest reaching out to them. I also vaguely recall someone posting on the FreePBX forum about having similar issues with Vitelity and CID but don’t recall specifics.

Yeah, I’m gonna reach out to them on monday. I just figured I had to be doing something wrong since this worked on sip but doesn’t on pjsip.

Could they be misusing the Contact URI as the source of the caller ID?

If so, contact_user may help.

Got it figured out. Asterisk was doing everything right but I had something wrong on Vitelity. I thought the caller id field on the account was “default”, but in fact it’s override.

Thanks all!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.