[SR-Users] Kamailio under NAT
Aidar Kamalov
aidar.kamalov at gmail.com
Fri Jun 5 12:46:32 CEST 2020
Hello,
I am trying to start kamailio+rtpengine+asterisk in docker with
docker-compose (not in network host mode). And I faced behavior that I
can't understand.
When my phone(fanvil) sends a register to kamailio with his ip in contact -
192.168.88.55 (to host's ip address 192.168.88.55), kamailio 200OK answers
with "received=172.18.0.1" param in Via. (172.18.0.1 it is host's docker
interface, kamailio's ip is 172.18.0.4)
After that my phone unregisters with Expires: 0 and sends a new register
with 172.18.0.1 in contact.
Is that correct? Is there any way to fix this?
2020/06/05 12:05:51.764617 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK14305253915361123;rport
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=1125027099
To: akamvm <sip:1000 at 192.168.88.55:5060>
Call-ID: 2849918516212-27188555511609 at 192.168.88.100
CSeq: 1 REGISTER
Contact: <sip:1000 at 192.168.88.100:5756>
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0
2020/06/05 12:05:51.765716 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK14305253915361123;rport=46142;received=172.18.0.1
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=1125027099
To: akamvm <sip:1000 at 192.168.88.55:5060
>;tag=1cbccc00ba5f7d13255bc12726ccacc5.59da
Call-ID: 2849918516212-27188555511609 at 192.168.88.100
CSeq: 1 REGISTER
Contact: <sip:1000 at 192.168.88.100:5756>;expires=3600
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0
2020/06/05 12:05:51.779447 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK251317807114669601;rport
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=1125027099
To: akamvm <sip:1000 at 192.168.88.55:5060>
Call-ID: 2849918516212-27188555511609 at 192.168.88.100
CSeq: 2 REGISTER
Contact: <sip:1000 at 192.168.88.100:5756>
Max-Forwards: 70
Expires: 0
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0
2020/06/05 12:05:51.780479 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK251317807114669601;rport=46142;received=172.18.0.1
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=1125027099
To: akamvm <sip:1000 at 192.168.88.55:5060
>;tag=1cbccc00ba5f7d13255bc12726ccacc5.f669
Call-ID: 2849918516212-27188555511609 at 192.168.88.100
CSeq: 2 REGISTER
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0
And new register:
2020/06/05 12:05:51.780287 172.18.0.1:46142 -> 172.18.0.4:5060
REGISTER sip:192.168.88.55 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.100:5756;branch=z9hG4bK2696168232620424454;rport
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=2649930762
To: akamvm <sip:1000 at 192.168.88.55:5060>
Call-ID: 257831362525663-2610472014851 at 172.18.0.1
CSeq: 1 REGISTER
Contact: <sip:1000 at 172.18.0.1:46142>
Max-Forwards: 70
Expires: 3600
Supported: path
User-Agent: Fanvil X3S 2.10.2.6887 0c383e217eb9
Allow: INVITE, ACK, OPTIONS, BYE, CANCEL, REFER, NOTIFY, INFO, PRACK,
UPDATE, MESSAGE
Content-Length: 0
2020/06/05 12:05:51.781208 172.18.0.4:5060 -> 172.18.0.1:46142
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.100:5756
;branch=z9hG4bK2696168232620424454;rport=46142;received=172.18.0.1
From: akamvm <sip:1000 at 192.168.88.55:5060>;tag=2649930762
To: akamvm <sip:1000 at 192.168.88.55:5060
>;tag=1cbccc00ba5f7d13255bc12726ccacc5.4b3b
Call-ID: 257831362525663-2610472014851 at 172.18.0.1
CSeq: 1 REGISTER
Contact: <sip:1000 at 172.18.0.1:46142>;expires=3600
Server: kamailio (5.2.1 (x86_64/linux))
Content-Length: 0
--
Aydar A. Kamalov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200605/f4a754cd/attachment.html>
More information about the sr-users
mailing list