Invite To Header Issues

Status
Not open for further replies.

gunemalli

New Member
Dec 18, 2018
24
3
3
Hi Folks,

I'm having a bit of an issue with the Invite headers sent to extensions. To put this simply, this for the last mile for inbound call i.e. when the call is being delivered to the handset.

For example, X723 calls X719. This can be split into two parts.
Part 1 : X723 -> FusionPBX (No Issues)
Part 2 : FusionPBX -> X719 (Issue)

Here's SIP Trace
Part 1
Code:
2019/05/30 14:25:56.153691 120.233.120.210:19523 -> 110.214.110.149:5060
INVITE sip:719@pbx.domain.com:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.168:9723;branch=z9hG4bK2915884698;rport
From: "723" <sip:723@pbx.domain.com:5060>;tag=310905458
To: <sip:719@pbx.domain.com:5060>                       <<<<------------------
Call-ID: 0_3488828307@192.168.1.168
CSeq: 1 INVITE
Contact: <sip:723@192.168.1.168:9723>

Part 2:
Code:
2019/05/30 14:25:56.439189 110.214.110.149:5060 -> 120.233.120.210:41995
INVITE sip:719@192.168.1.164:9719 SIP/2.0
Via: SIP/2.0/UDP 110.214.110.149;rport;branch=z9hG4bK1ZeD6yjpejy7D
Route: <sip:719@120.233.120.210:41995>
Max-Forwards: 69
From: "Ivor" <sip:723@pbx.domain.com>;tag=KrDD771rH08mS
To: <sip:719@192.168.1.164:9719>            <<<<<<<------------------
Call-ID: dc335d73-fd35-1237-3baa-666331386236
CSeq: 5041386 INVITE
Contact: <sip:mod_sofia@110.214.110.149:5060>
User-Agent: FreeSWITCH-mod_sofia/64bit
Remote-Party-ID: "Ivor" <sip:723@pbx.domain.com>;party=calling;screen=yes;privacy=off


As it stands, calls work without any issues for directly connected extensions. However, I'm trying implement a Kamailio Proxy and for inbound calls to devices registered behind the proxy, Kamailio sends a 404 Not Found as the Part 2 Invite Header send the TO field as Extn@IP:5060 instead of Extn@pbx.domain.com:5060

Is there a way for me to change this behaviour on FusionPBX side?
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
So. In the case you have just shown, is the phone 719 sat with an IP and port of 192.168.1.164:9719 behind a NAT router at 120.233.120.210?
 

gunemalli

New Member
Dec 18, 2018
24
3
3
So. In the case you have just shown, is the phone 719 sat with an IP and port of 192.168.1.164:9719 behind a NAT router at 120.233.120.210?

That is correct. This is just an example and using a directly connected extension. If the devices is behind Kamailio, the the IP's would be Kamailio's IPs. For example, it would do

Code:
To: <sip:719@Kam.ail.io.IP:5060>

I have the same issue with other proxies/SBCs as well due to this.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
This is absolutely not a problem, the FusionPBX is sending to the correct IP, the contact should not need to be modified. The thing is, you are talking about using kamailio as a registrar it seems, that is the ONLY case where it should be the kamailio IP. In that case, kamailio will handle the NAT by itself. I'm actually working myself on this now and its quite difficult using kamailio as the registrar for other reasons.

If FusionPBX is the registrar, then what you need to do is make kamailio an outbound proxy for FusionPBX.

Though the To header will contain the private IP, fs_path on FusionPBX should contain the public IP and port and that should end up in the route set.
 
  • Like
Reactions: gunemalli

gunemalli

New Member
Dec 18, 2018
24
3
3
This is absolutely not a problem, the FusionPBX is sending to the correct IP, the contact should not need to be modified. The thing is, you are talking about using kamailio as a registrar it seems, that is the ONLY case where it should be the kamailio IP. In that case, kamailio will handle the NAT by itself. I'm actually working myself on this now and its quite difficult using kamailio as the registrar for other reasons.

If FusionPBX is the registrar, then what you need to do is make kamailio an outbound proxy for FusionPBX.

Though the To header will contain the private IP, fs_path on FusionPBX should contain the public IP and port and that should end up in the route set.

Thanks for this.

Yes, I'm using kamailio as a pass-through registrar & FusionPBX handles all registrations. The ultimate goal is for the proxy/SBC to handle all SIP/RTP communications and no extensions should connect to the FusionPBX directly.

Hope this helps.
 
Status
Not open for further replies.