Cannot set External number in Follow me

I am having some issues when I try to set a mobile phone number in the follow me list. It appears to be something with bad gateway, but I have already set the outbound routes. With the current configuration, everything works except the follow me. I think is something related to traffic redirection but I don’t know what to do. I put the mobile number in the configuration of the follow-me list with an “#” at the end. Important Information: Everything is fine, when I call from another local extension to my extension, it redirects to the mobile phone. But when I do the same from an outside number, the redirection fails.
My asterisk is 13.29.2 and my freepbx is 14.0.13.26.

Thanks for your help.

What type of trunk are you using for that mobile call? Is it possible that callerID is an issue? For example, you might have things set up where the outside caller’s callerid is trying to get passed through to the Follow Me destination, and your provider doesn’t like it. If it’s a sip trunk, you can see if changing its CID Options makes a difference.

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:[email protected]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:[email protected]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:[email protected] 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.

Forget about it. I didn’t use my number registered to the SIP Provider. I forced it as my CID, and now it is working. Thanks for your help

1 Like

The fastest way to find the answer to this question is to call your ITSP and ask for “Tier 2 Tech Support for a question about foreign Caller IDs on outbound calls”.

The person that answers the phone may be able to help, but if not, they should drop you into the Tier-2 queue and you ask them about “foreign” caller ID (CID that isn’t assigned to your account).

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