1. Brekeke Product Name and Version:
Brekeke sip server 3.7.4.8
2. Java version:
3. OS type and the version:
windows 10
4. UA (phone), gateway or other hardware/software involved:
pjsip s,p phone, x-lite
5. Your problem:
I have a 2 sip server which connect to internet over firewall/NAT device. sip server 2 is behind checkpoint firewall, sip server 1 is behind the another brand firewall. And I have 2 sip phone which connect to internet over NAT(DSL modem or 4G modem) device. sip phones located separetly locations.
When sip phones call each other over sip server 2, everything works. if they call each other over server 1, 200 ok and ACK messages goes to wrong ip. sip phone 1 send invite message to server, server send this invite message to sipphone 2 . during calls, invite messages which comes from sip phones to server, are almost same. but sip server send this invite message to other phone, sip server 1 change invite message contact ip to its private ip , sip server 2 change invite message contact ip to its public ip. because of that, sip phone 2 try to send 200ok message to sip server 1 private ip address and sip server 2 public ip address. sip server 2 can get 200ok message but sip server 1 cannot get 200ok message. how can I solve this problem. both sip server version and configuration are same. Could I push sip server to use its public ip for invite message contact information.
PS: RTP packets goes over TURN server which connect to internet directly.
sip server change contact ip address to its private address
Moderator: Brekeke Support Team
Go to [Status]->[SIP Server] status page and find the [interface] filed.
Does it show the SIP Server's public IP address?
If not, set the public IP address at [Configuration]->[System] page -> [Interface address 1] field, and then restart the SIP Server.
Refer the following wiki topic.
http://wiki.brekeke.com/wiki/Set-port-forwarding
If you don't have the above setting at the SIP server 2 too, I suppose the firewall has the SIP-ALG function which replaces Contact header of INVITE with the public IP address.
SIP-ALG is a challenging function but it will not cover all of SIP situations so I recommend that you disable SIP-ALG at the firewall.
Does it show the SIP Server's public IP address?
If not, set the public IP address at [Configuration]->[System] page -> [Interface address 1] field, and then restart the SIP Server.
Refer the following wiki topic.
http://wiki.brekeke.com/wiki/Set-port-forwarding
If you don't have the above setting at the SIP server 2 too, I suppose the firewall has the SIP-ALG function which replaces Contact header of INVITE with the public IP address.
SIP-ALG is a challenging function but it will not cover all of SIP situations so I recommend that you disable SIP-ALG at the firewall.
I have already set the public address and when I checked from status section, I see the both public and private address. Both sip server configs are same.
on the other hand, when I analyze packets which comes and goes from sip server, "contact" information change at sip server not at firewall. So, in my opinion, firewall sip-alg function is not effect this situation.
I changed sip server locations and the IP address, same thing is occur. maybe, sip server 1 firewall has change the first invite message some fields which comes to the sip server and because of this change, sip server is add its private address to contact field which goes from sip server. But I couldn't find what changed.
on the other hand, when I analyze packets which comes and goes from sip server, "contact" information change at sip server not at firewall. So, in my opinion, firewall sip-alg function is not effect this situation.
I changed sip server locations and the IP address, same thing is occur. maybe, sip server 1 firewall has change the first invite message some fields which comes to the sip server and because of this change, sip server is add its private address to contact field which goes from sip server. But I couldn't find what changed.
Which firewall product are you using for SIP Server 1?
Can you go to [Dial Plan]->[History] page after you make a test call over the Server 1?
And then click the latest field number which indicates "INVITE".
If so, the both Incoming and Outgoing packets are shown.
At the Outgoing packet, check "Contact:" header to see whether it is a private IP address or public IP address.
Can you go to [Dial Plan]->[History] page after you make a test call over the Server 1?
And then click the latest field number which indicates "INVITE".
If so, the both Incoming and Outgoing packets are shown.
At the Outgoing packet, check "Contact:" header to see whether it is a private IP address or public IP address.
I couldnt say firewall brand.
I checked incoming and outgoing invite messages from server 1, outgoing contact field is server 1 private ip. server 2 outgoing invite message contact field is public ip.
when I check these messages, I saw that, server 1 invite message -incoming and outgoing both of them- message header order is "via-contact-to-from", server 2 invite message message header order is "via-from-to-contact". sip phones send invite message message header order is "via-from-to-contact". During invite message arriving to server from sipphone, this order changing. Is this order cause this problem?
I checked incoming and outgoing invite messages from server 1, outgoing contact field is server 1 private ip. server 2 outgoing invite message contact field is public ip.
when I check these messages, I saw that, server 1 invite message -incoming and outgoing both of them- message header order is "via-contact-to-from", server 2 invite message message header order is "via-from-to-contact". sip phones send invite message message header order is "via-from-to-contact". During invite message arriving to server from sipphone, this order changing. Is this order cause this problem?