[SR-Users] Kamailio and RTPEngine acting as SBC : wrong IP address returned

Cyril Ramière cyril.ramiere at gmail.com
Tue Nov 23 10:11:31 CET 2021


Hi there,

I'm already using Kamailio as a simple proxy and it worked flawlessly.

This time, I need to have a new setup like this:

[UAC (sip phone)] <--- register & has to deal only with ----> | PUBLIC |
[Kamailio + RtpEngine] | PRIVATE | <----> [Asterisk]
Client = 37.100.100.100 (public)
Asterisk = 172.17.200.20 (private)
Kamailio/RtpEngine = 172.17.203.102 (private, advertising 3.99.99.99 public
IP)

Kamailio and RtpEngine will behave as a SBC/B2BUA, the client will deal
only with kamailio using public access (internet), and asterisk will handle
the calls but stays 100% private behind kamailio.

Kamailio will handle registrations to reduce the load put on the asterisk
boxes.

The setup is running on AWS, my Kamailio has 1 Private IP address tied to 1
Public IP address (an Elastic public IP) so, no multi-homing, one network
interface.

I made a "simple" work in progress configuration, the registration is
working as a PoC, and my calls are *almost* working but with some nonsense.

My Main issue is that when my UAC (SIP phone) make a call, to let's
say +1000, the call enters kamailio, then kamailio handle the invite,
trigger rtpEngine, but the IP addresses in Record-Route and Via headers are
wrong.

>From Kamailio to UAC Sip Phone, it seems OK.
But from Kamailio to Asterisk, the record-route/via headers are set with
Kamailio Public IP when it should be the Kamailio private IP.

So, when Asterisk sends a BYE, it tries to send it to the public IP of
Kamailio, which is wrong.
There are probably other quirks in the configuration but this one, I can't
figure out what's wrong.

I'm attaching a capture file, a log file and my configuration file (some
informations are redacted).
I am missing something and sadly I can't figure out what, a little help
would be appreciated :)

Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211123/96558b44/attachment.htm>
-------------- next part --------------
## Network capture from Kamailio box

08:43:33.472017 IP (tos 0x0, ttl 102, id 48545, offset 0, flags [none], proto UDP (17), length 30)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP
08:43:35.592685 IP (tos 0x0, ttl 102, id 48546, offset 0, flags [none], proto UDP (17), length 1021)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 993
	INVITE sip:+1000 at sip1.redacted.com SIP/2.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport;branch=z9hG4bKPja0fcc9509b4c43269259445a4912e1a3
	Max-Forwards: 70
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>
	Contact: <sip:test at 37.100.100.100:56065;ob>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12028 INVITE
	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
	Supported: replaces, 100rel, timer, norefersub
	Session-Expires: 1800
	Min-SE: 90
	User-Agent: MicroSIP/3.20.7
	Content-Type: application/sdp
	Content-Length:   339

	v=0
	o=- 3846649415 3846649415 IN IP4 37.100.100.100
	s=pjmedia
	b=AS:84
	t=0 0
	a=X-nat:1
	m=audio 4000 RTP/AVP 8 0 101
	c=IN IP4 37.100.100.100
	b=TIAS:64000
	a=rtcp:4001 IN IP4 37.100.100.100
	a=sendrecv
	a=rtpmap:8 PCMA/8000
	a=rtpmap:0 PCMU/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=ssrc:801129593 cname:67e4069c62f84408
08:43:35.593656 IP (tos 0x10, ttl 255, id 5473, offset 0, flags [none], proto UDP (17), length 572)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > 100.100.100.37.rev.sfr.net.56065: [bad udp cksum 0x732b -> 0x5b71!] SIP, length: 544
	SIP/2.0 401 Unauthorized
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;branch=z9hG4bKPja0fcc9509b4c43269259445a4912e1a3;received=37.100.100.100
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=3cd483beb4ee8a26c384c7540ab382f6.a416a2e2
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12028 INVITE
	WWW-Authenticate: Digest realm="sip1.redacted.com", nonce="YZyq42GcqbcosEWlY5prHZTM2GIvDdBx", qop="auth"
	Server: kamailio (5.4.7 (x86_64/linux))
	Content-Length: 0

08:43:35.621964 IP (tos 0x0, ttl 102, id 48547, offset 0, flags [none], proto UDP (17), length 435)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 407
	ACK sip:+1000 at sip1.redacted.com SIP/2.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport;branch=z9hG4bKPja0fcc9509b4c43269259445a4912e1a3
	Max-Forwards: 70
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=3cd483beb4ee8a26c384c7540ab382f6.a416a2e2
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12028 ACK
	Content-Length:  0

08:43:35.622643 IP (tos 0x0, ttl 102, id 48548, offset 0, flags [none], proto UDP (17), length 1278)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 1250
	INVITE sip:+1000 at sip1.redacted.com SIP/2.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Max-Forwards: 70
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>
	Contact: <sip:test at 37.100.100.100:56065;ob>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12029 INVITE
	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
	Supported: replaces, 100rel, timer, norefersub
	Session-Expires: 1800
	Min-SE: 90
	User-Agent: MicroSIP/3.20.7
	Authorization: Digest username="test", realm="sip1.redacted.com", nonce="YZyq42GcqbcosEWlY5prHZTM2GIvDdBx", uri="sip:+1000 at sip1.redacted.com", response="178e3ba525529cd187af7f83f7676091", cnonce="e19a1640cbe347229a2074ba58f3e099", qop=auth, nc=00000001
	Content-Type: application/sdp
	Content-Length:   339

	v=0
	o=- 3846649415 3846649415 IN IP4 37.100.100.100
	s=pjmedia
	b=AS:84
	t=0 0
	a=X-nat:1
	m=audio 4000 RTP/AVP 8 0 101
	c=IN IP4 37.100.100.100
	b=TIAS:64000
	a=rtcp:4001 IN IP4 37.100.100.100
	a=sendrecv
	a=rtpmap:8 PCMA/8000
	a=rtpmap:0 PCMU/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=ssrc:801129593 cname:67e4069c62f84408
08:43:35.626298 IP (tos 0x10, ttl 255, id 5480, offset 0, flags [none], proto UDP (17), length 448)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > 100.100.100.37.rev.sfr.net.56065: [bad udp cksum 0x72af -> 0x8554!] SIP, length: 420
	SIP/2.0 100 trying -- your call is important to us
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2;received=37.100.100.100
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12029 INVITE
	Server: kamailio (5.4.7 (x86_64/linux))
	Content-Length: 0

08:43:35.626499 IP (tos 0x10, ttl 255, id 48278, offset 0, flags [none], proto UDP (17), length 1153)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > ip-172-17-200-20.eu-central-1.compute.internal.sip: [bad udp cksum 0xf01c -> 0x9a8f!] SIP, length: 1125
	INVITE sip:+1000 at 172.17.200.20:5060 SIP/2.0
	Record-Route: <sip:3.99.99.99;lr>
	Via: SIP/2.0/UDP 3.99.99.99:5060;branch=z9hG4bK37f1.d3ae697f45b71811bfa3d1a574ffe93d.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;received=37.100.100.100;rport=56065;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Max-Forwards: 69
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>
	Contact: <sip:test at 37.100.100.100:56065;ob>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12029 INVITE
	Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
	Supported: replaces, 100rel, timer, norefersub
	Session-Expires: 1800
	Min-SE: 90
	User-Agent: MicroSIP/3.20.7
	Content-Type: application/sdp
	Content-Length:   317

	v=0
	o=- 3846649415 3846649415 IN IP4 3.99.99.99
	s=pjmedia
	b=AS:84
	t=0 0
	a=X-nat:1
	m=audio 23000 RTP/AVP 8 0 101
	c=IN IP4 3.99.99.99
	b=TIAS:64000
	a=ssrc:801129593 cname:67e4069c62f84408
	a=rtpmap:8 PCMA/8000
	a=rtpmap:0 PCMU/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=sendrecv
	a=rtcp:23001
08:43:35.627367 IP (tos 0xb8, ttl 64, id 26920, offset 0, flags [DF], proto UDP (17), length 563)
    ip-172-17-200-20.eu-central-1.compute.internal.sip > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 535
	SIP/2.0 100 Trying
	Via: SIP/2.0/UDP 3.99.99.99:5060;rport=5060;received=172.17.203.102;branch=z9hG4bK37f1.d3ae697f45b71811bfa3d1a574ffe93d.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Record-Route: <sip:3.99.99.99;lr>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>
	CSeq: 12029 INVITE
	Server: Asterisk PBX 16.9.0
	Content-Length:  0

08:43:35.629478 IP (tos 0xb8, ttl 64, id 26921, offset 0, flags [DF], proto UDP (17), length 751)
    ip-172-17-200-20.eu-central-1.compute.internal.sip > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 723
	SIP/2.0 180 Ringing
	Via: SIP/2.0/UDP 3.99.99.99:5060;rport=5060;received=172.17.203.102;branch=z9hG4bK37f1.d3ae697f45b71811bfa3d1a574ffe93d.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Record-Route: <sip:3.99.99.99;lr>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12029 INVITE
	Server: Asterisk PBX 16.9.0
	Contact: <sip:172.17.200.20:5060>
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Content-Length:  0

08:43:35.629750 IP (tos 0x10, ttl 255, id 5481, offset 0, flags [none], proto UDP (17), length 628)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > 100.100.100.37.rev.sfr.net.56065: [bad udp cksum 0x7363 -> 0x00a9!] SIP, length: 600
	SIP/2.0 180 Ringing
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Record-Route: <sip:3.99.99.99;lr>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12029 INVITE
	Server: Asterisk PBX 16.9.0
	Contact: <sip:172.17.200.20:5060>
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Content-Length:  0

08:43:37.632035 IP (tos 0xb8, ttl 64, id 26992, offset 0, flags [DF], proto UDP (17), length 1144)
    ip-172-17-200-20.eu-central-1.compute.internal.sip > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 1116
	SIP/2.0 200 OK
	Via: SIP/2.0/UDP 3.99.99.99:5060;rport=5060;received=172.17.203.102;branch=z9hG4bK37f1.d3ae697f45b71811bfa3d1a574ffe93d.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Record-Route: <sip:3.99.99.99;lr>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12029 INVITE
	Server: Asterisk PBX 16.9.0
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Contact: <sip:172.17.200.20:5060>
	Supported: 100rel, timer, replaces, norefersub
	Session-Expires: 1800;refresher=uac
	Require: timer
	Content-Type: application/sdp
	Content-Length:   263

	v=0
	o=- 3846649415 3846649417 IN IP4 172.17.200.20
	s=Asterisk
	c=IN IP4 172.17.200.20
	t=0 0
	m=audio 10786 RTP/AVP 8 0 101
	a=rtpmap:8 PCMA/8000
	a=rtpmap:0 PCMU/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=ptime:20
	a=maxptime:150
	a=sendrecv
08:43:37.633396 IP (tos 0x10, ttl 255, id 5619, offset 0, flags [none], proto UDP (17), length 1029)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > 100.100.100.37.rev.sfr.net.56065: [bad udp cksum 0x74f4 -> 0x502e!] SIP, length: 1001
	SIP/2.0 200 OK
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPjf0384dab541e481f9b5dfdb3c4dd6ed2
	Record-Route: <sip:3.99.99.99;lr>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12029 INVITE
	Server: Asterisk PBX 16.9.0
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Contact: <sip:172.17.200.20:5060>
	Supported: 100rel, timer, replaces, norefersub
	Session-Expires: 1800;refresher=uac
	Require: timer
	Content-Type: application/sdp
	Content-Length:   271

	v=0
	o=- 3846649415 3846649417 IN IP4 3.99.99.99
	s=Asterisk
	c=IN IP4 3.99.99.99
	t=0 0
	m=audio 23020 RTP/AVP 8 0 101
	a=maxptime:150
	a=rtpmap:8 PCMA/8000
	a=rtpmap:0 PCMU/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=sendrecv
	a=rtcp:23021
	a=ptime:20
08:43:37.679055 IP (tos 0x0, ttl 102, id 48552, offset 0, flags [none], proto UDP (17), length 448)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 420
	ACK sip:172.17.200.20:5060 SIP/2.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport;branch=z9hG4bKPj1df5c9a4fada4c28a9ad5f7540513287
	Max-Forwards: 70
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12029 ACK
	Route: <sip:3.99.99.99;lr>
	Content-Length:  0

08:43:37.679671 IP (tos 0x0, ttl 102, id 48553, offset 0, flags [none], proto UDP (17), length 943)
    100.100.100.37.rev.sfr.net.56065 > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 915
	UPDATE sip:172.17.200.20:5060 SIP/2.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport;branch=z9hG4bKPj553ecda2f38547e884efd5bba4cc313d
	Max-Forwards: 70
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	Contact: <sip:test at 37.100.100.100:56065;ob>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12030 UPDATE
	Route: <sip:3.99.99.99;lr>
	Supported: replaces, 100rel, timer, norefersub
	Session-Expires: 1800;refresher=uac
	Min-SE: 90
	Content-Type: application/sdp
	Content-Length:   315

	v=0
	o=- 3846649415 3846649416 IN IP4 37.100.100.100
	s=pjmedia
	b=AS:84
	t=0 0
	a=X-nat:1
	m=audio 4000 RTP/AVP 8 101
	c=IN IP4 37.100.100.100
	b=TIAS:64000
	a=rtcp:4001 IN IP4 37.100.100.100
	a=ssrc:801129593 cname:67e4069c62f84408
	a=rtpmap:8 PCMA/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=sendrecv
08:43:37.679712 IP (tos 0x10, ttl 255, id 48327, offset 0, flags [none], proto UDP (17), length 536)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > ip-172-17-200-20.eu-central-1.compute.internal.sip: [bad udp cksum 0xedb3 -> 0x24e3!] SIP, length: 508
	ACK sip:172.17.200.20:5060 SIP/2.0
	Via: SIP/2.0/UDP 3.99.99.99:5060;branch=z9hG4bK37f1.a5e72f99089ff1b4e282c09caaaf3a43.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;received=37.100.100.100;rport=56065;branch=z9hG4bKPj1df5c9a4fada4c28a9ad5f7540513287
	Max-Forwards: 69
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12029 ACK
	Content-Length:  0

08:43:37.681851 IP (tos 0x10, ttl 255, id 48328, offset 0, flags [none], proto UDP (17), length 1021)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > ip-172-17-200-20.eu-central-1.compute.internal.sip: [bad udp cksum 0xef98 -> 0x0f9f!] SIP, length: 993
	UPDATE sip:172.17.200.20:5060 SIP/2.0
	Via: SIP/2.0/UDP 3.99.99.99:5060;branch=z9hG4bKc6f1.36bcd0fe1b2325ed4f511c4581b7e118.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;received=37.100.100.100;rport=56065;branch=z9hG4bKPj553ecda2f38547e884efd5bba4cc313d
	Max-Forwards: 69
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	Contact: <sip:test at 37.100.100.100:56065;ob>
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	CSeq: 12030 UPDATE
	Supported: replaces, 100rel, timer, norefersub
	Session-Expires: 1800;refresher=uac
	Min-SE: 90
	Content-Type: application/sdp
	Content-Length:   305

	v=0
	o=- 3846649415 3846649416 IN IP4 3.99.99.99
	s=pjmedia
	b=AS:84
	t=0 0
	a=X-nat:1
	m=audio 23000 RTP/AVP 8 101
	c=IN IP4 3.99.99.99
	b=TIAS:64000
	a=ssrc:801129593 cname:67e4069c62f84408
	a=rtpmap:8 PCMA/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=sendrecv
	a=rtcp:23001
	a=ptime:20
08:43:37.682503 IP (tos 0xb8, ttl 64, id 27003, offset 0, flags [DF], proto UDP (17), length 1085)
    ip-172-17-200-20.eu-central-1.compute.internal.sip > ip-172-17-203-102.eu-central-1.compute.internal.sip: [udp sum ok] SIP, length: 1057
	SIP/2.0 200 OK
	Via: SIP/2.0/UDP 3.99.99.99:5060;rport=5060;received=172.17.203.102;branch=z9hG4bKc6f1.36bcd0fe1b2325ed4f511c4581b7e118.0
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPj553ecda2f38547e884efd5bba4cc313d
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12030 UPDATE
	Session-Expires: 1800;refresher=uac
	Require: timer
	Contact: <sip:172.17.200.20:5060>
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Supported: 100rel, timer, replaces, norefersub
	Server: Asterisk PBX 16.9.0
	Content-Type: application/sdp
	Content-Length:   239

	v=0
	o=- 3846649415 3846649418 IN IP4 172.17.200.20
	s=Asterisk
	c=IN IP4 172.17.200.20
	t=0 0
	m=audio 10786 RTP/AVP 8 101
	a=rtpmap:8 PCMA/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=ptime:20
	a=maxptime:150
	a=sendrecv
08:43:37.683675 IP (tos 0x10, ttl 255, id 5625, offset 0, flags [none], proto UDP (17), length 970)
    ip-172-17-203-102.eu-central-1.compute.internal.sip > 100.100.100.37.rev.sfr.net.56065: [bad udp cksum 0x74b9 -> 0xf0ba!] SIP, length: 942
	SIP/2.0 200 OK
	Via: SIP/2.0/UDP 37.100.100.100:56065;rport=56065;received=37.100.100.100;branch=z9hG4bKPj553ecda2f38547e884efd5bba4cc313d
	Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
	From: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
	To: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
	CSeq: 12030 UPDATE
	Session-Expires: 1800;refresher=uac
	Require: timer
	Contact: <sip:172.17.200.20:5060>
	Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
	Supported: 100rel, timer, replaces, norefersub
	Server: Asterisk PBX 16.9.0
	Content-Type: application/sdp
	Content-Length:   247

	v=0
	o=- 3846649415 3846649418 IN IP4 3.99.99.99
	s=Asterisk
	c=IN IP4 3.99.99.99
	t=0 0
	m=audio 23020 RTP/AVP 8 101
	a=maxptime:150
	a=rtpmap:8 PCMA/8000
	a=rtpmap:101 telephone-event/8000
	a=fmtp:101 0-16
	a=sendrecv
	a=rtcp:23021
	a=ptime:20

## Call is established (RTP media between asterisk<->kamailio flowing through incorrect network too, should be private).
But if I let the IPBX hangup, nothing shows here, because asterisk is trying to send BYE to the public IP

## Capture from Asterisk box:

[Nov 23 09:43:53] <--- Transmitting SIP request (488 bytes) to UDP:3.99.99.99:5060 --->
[Nov 23 09:43:53] BYE sip:test at 37.100.100.100:56065;ob SIP/2.0
[Nov 23 09:43:53] Via: SIP/2.0/UDP 172.17.200.20:5060;rport;branch=z9hG4bKPjbcb73473-6c8c-4d2d-9e19-58b4f1d282e5
[Nov 23 09:43:53] From: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
[Nov 23 09:43:53] To: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
[Nov 23 09:43:53] Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
[Nov 23 09:43:53] CSeq: 28535 BYE
[Nov 23 09:43:53] Route: <sip:3.99.99.99;lr>
[Nov 23 09:43:53] Reason: Q.850;cause=0
[Nov 23 09:43:53] Max-Forwards: 70
[Nov 23 09:43:53] User-Agent: Asterisk PBX 16.9.0
[Nov 23 09:43:53] Content-Length:  0
[Nov 23 09:43:53]
[Nov 23 09:43:53]
[Nov 23 09:43:53]     -- Remote UNIX connection
[Nov 23 09:43:53]     -- Remote UNIX connection disconnected
[Nov 23 09:43:53]     -- Remote UNIX connection
[Nov 23 09:43:53]     -- Remote UNIX connection disconnected
[Nov 23 09:43:55] <--- Transmitting SIP request (488 bytes) to UDP:3.99.99.99:5060 --->
[Nov 23 09:43:55] BYE sip:test at 37.100.100.100:56065;ob SIP/2.0
[Nov 23 09:43:55] Via: SIP/2.0/UDP 172.17.200.20:5060;rport;branch=z9hG4bKPjbcb73473-6c8c-4d2d-9e19-58b4f1d282e5
[Nov 23 09:43:55] From: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
[Nov 23 09:43:55] To: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
[Nov 23 09:43:55] Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
[Nov 23 09:43:55] CSeq: 28535 BYE
[Nov 23 09:43:55] Route: <sip:3.99.99.99;lr>
[Nov 23 09:43:55] Reason: Q.850;cause=0
[Nov 23 09:43:55] Max-Forwards: 70
[Nov 23 09:43:55] User-Agent: Asterisk PBX 16.9.0
[Nov 23 09:43:55] Content-Length:  0
[Nov 23 09:43:55]
[Nov 23 09:43:55]
[Nov 23 09:43:59] <--- Transmitting SIP request (488 bytes) to UDP:3.99.99.99:5060 --->
[Nov 23 09:43:59] BYE sip:test at 37.100.100.100:56065;ob SIP/2.0
[Nov 23 09:43:59] Via: SIP/2.0/UDP 172.17.200.20:5060;rport;branch=z9hG4bKPjbcb73473-6c8c-4d2d-9e19-58b4f1d282e5
[Nov 23 09:43:59] From: <sip:+1000 at sip1.redacted.com>;tag=826bcfed-1430-4c66-b17a-f66ca997066e
[Nov 23 09:43:59] To: "test user" <sip:test at sip1.redacted.com>;tag=e75ca7ae0a8748e9bb6be82d523a568d
[Nov 23 09:43:59] Call-ID: 445085acf1d7477a9e0b51f25e60c1dd
[Nov 23 09:43:59] CSeq: 28535 BYE
[Nov 23 09:43:59] Route: <sip:3.99.99.99;lr>
[Nov 23 09:43:59] Reason: Q.850;cause=0
[Nov 23 09:43:59] Max-Forwards: 70
[Nov 23 09:43:59] User-Agent: Asterisk PBX 16.9.0
[Nov 23 09:43:59] Content-Length:  0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailio-log.log
Type: application/octet-stream
Size: 24996 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211123/96558b44/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kamailio0.cfg
Type: application/octet-stream
Size: 22624 bytes
Desc: not available
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20211123/96558b44/attachment-0001.obj>


More information about the sr-users mailing list