It is a sip trunk. I have changed the CID many times, but it didn’t work.
This is pjsip log when it fails.
First this is the inviting and the bad gateway response from the sip station, when it tried to do the call:
INVITE sip:MOBILENUMERFOLLOWME@TRUNK SIP/2.0
Via: SIP/2.0/UDP MYEXTERNALIP:5060;rport;
From: sip:EXTERNALNUMBER@MYEXTERNALIP>;tag=
To: sip:MOBILENUMERFOLLOWME@TRUNKNUMBER>
Contact: <sip:asterisk@MYEXTERNALIP:5060
Call-ID: c
CSeq: 14760 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-14.0.13.26(13.29.2)
Content-Type: application/sdp
Content-Length: 261
v=0
o=- 683791826 683791826 IN IP4 MYEXTERNALIP
s=Asterisk
c=IN IP4 MYEXTERNALIP
t=0 0
m=audio 19318 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:150
a=sendrecv
***************************************************************************************************+
Bad Gateway response
SIP/2.0 502 Bad Gateway
Via: SIP/2.0/UDP MYEXTERNALIP:5060;rport=5060;received=MYEXTERNALIP;branch=
From: “EXTERNALNUMBER” <sip:EXTERNALNUMBER@MYEXTERNALIP;tag=
To: <sip:MOBILENUMBERFOLLOWME@TRUNK;tag=c6cegd11
Call-ID:
CSeq: 22639 INVITE
Warning: 399 37959.2432.P.261.5.118.0.4.32839.0.1075445762.ims.** “Service lost”
Content-Length: 0
Content-Length: 0
When I try to (and it works) call that MOBILENUMERFOLLOWME from my extension:
INVITE sip: MOBILENUMERFOLLOWME@TRUNK SIP/2.0
Via: SIP/2.0/UDP 10.11.223.134:5060;rport;branch=
From: “MYNAME” <sip:MYNUMBER@MYEXTERNALIP;tag=
To: sip: MOBILENUMERFOLLOWME@ TRUNKNUMBER
Contact: <sip:asterisk@ MYEXTERNALIP :5060
Call-ID:
CSeq: 9620 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-14.0.13.26(13.29.2)
Content-Type: application/sdp
Content-Length: 263
v=0
o=- 2057668841 2057668841 IN IP4 MYEXTERNALIP
s=Asterisk
c=IN IP4 MYEXTERNALIP
t=0 0
m=audio 18704 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:150
a=sendrecv
-> MOBILENUMERFOLLOWME : The number that I want to include in the follow me list.
-> MYEXTERNALIP : The ip used to connect to the trunk.
-> TRUNK : Sip station IP
-> EXTERNALNUMBER : Outside number that I am using to test follow me rule.