Follow Me 403 Forbidden on Outgoing

Hello,

FreePBX 13.0.91 / Asterisks 11

I am new to freepbx and have setup everything successfully to my liking. There is one issue that I am having. I am trying to get followme to call a mobile number.

CLI Debug shows:

<--- SIP read from UDP:203.XXX.XXX.XXX:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 144.XXX.XXX.XXX:5061;received=144.XXX.XXX.XXX;branch=z9hG4bK27586f94;rport=5061
From: <sip:[email protected]:5061>;tag=as6477634a
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 103 INVITE

<------------->
--- (6 headers 0 lines) ---

<--- SIP read from UDP:203.XXX.XXX.XXX:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 144.XXX.XXX.XXX:5061;received=144.XXX.XXX.XXX;branch=z9hG4bK27586f94;rport=5061
From: <sip:[email protected]:5061>;tag=as6477634a
To: <sip:[email protected]>;tag=SDdmf2b99-1683308001-1458784456756
Call-ID: [email protected]
CSeq: 103 INVITE
Content-Length: 0

<------------->
--- (7 headers 0 lines) ---
Transmitting (NAT) to 203.XXX.XXX.XXX:5060:
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 144.XXX.XXX.XXX:5061;branch=z9hG4bK27586f94;rport
Max-Forwards: 70
From: <sip:[email protected]:5061>;tag=as6477634a
To: <sip:[email protected]>;tag=SDdmf2b99-1683308001-1458784456756
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 ACK
User-Agent: FPBX-13.0.91(13.7.1)
Content-Length: 0


---
[2016-03-24 09:54:16] WARNING[1781][C-00000045]: chan_sip.c:23372 handle_response_invite: Received response: "Forbidden" from '<sip:[email protected]:5061>;tag=as6477634a'
Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)

So the mobile number is dialing but is getting rejected.

My voip plan only allows one call outgoing at a time. For this reason followme ring strategy is set to 'ringall’
I also set a dial plan to allow for the # at the end of the number as it is added in the followme setup, I didn’t think it actually dialled with the # but I thought I’d cover my bases.

Any help is greatly appreciated. Please let me know if you need anymore info.

Not so much rejected , SIP 403 means forbidden, check with your vendor why . . .

Thanks @dicko, will do.

Probably need a p-Asserted Identity - you are passing the native caller-id, but most SIP trunks want to see the ID that matches your registered trunk.

Here is the code we use - it goes in /etc/asterisk/extensions_custom.conf:

[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(Adding P-Asserted-Identity)
exten => s,n,ExecIf($["${TRUNKOUTCID}"=“XXXXXXXXXX”]?SipAddHeader(P-Asserted-Identity: sip:[email protected] )
exten => s,n,Set(FAXOPT(gateway)=yes,10)
exten => s,n,MacroExit()

@GSnover thanks for your response.

It ended up being on the providers side… They hadn’t enabled our other lines for our sip trunk so it was only allowing 1 line.