[OpenSIPS-Users] Opensips dosnt send ACK according to the route.

Олег Подгуйко podguiko at mail.ru
Thu Apr 25 13:21:10 EDT 2019


Hello!

I am using  opensips as a proxy for load balansing. It listens two ports. Logically from one side it is SCTP port 5070 and from another side is UDP port 5060.
UAC from UDP side sends INVITE via UDP protocol. OpenSips accepts it, checks it, gets the next sip address from dispatcher module for this request,  and sends INVITE  via SCTP protocol to the next SIP address. All are fine. From SCTP side I get 100, 180 and finaly 200. All messages was got via SCTP protocol.  200 consists record-route header 

SIP/2.0 200 OK
Via: SIP/2.0/SCTP 10.0.2.15:5070;branch=z9hG4bKccbc.5617e394.0, SIP/2.0/UDP 10.0.2.6:5060;branch=z9hG4bK-24303-1-0
From: sipp <sip:sipp at 10.0.2.6:5060>;tag=1
To: sut <sip:79677777777 at 10.0.2.15:5060>;tag=4581SIPpTag015
Call-ID: 1-24303 at 10.0.2.6
CSeq: 1 INVITE
Record-Route:<sip:10.0.2.4:5070;lr;transport=sctp>
Contact: <sip:10.0.2.4:5070>
Content-Length: 0
Opensips sends 200 responce to the UDP side.

In fine opensips get ACK from UDP side which has ROUTE header

 
ACK sip:79677777777 at 10.0.2.15:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.2.6:5060;branch=z9hG4bK-24303-1-4
From: sipp <sip:sipp at 10.0.2.6:5060>;tag=1
To: sut <sip:79677777777 at 10.0.2.15:5060>;tag=4581SIPpTag015
Call-ID: 1-24303 at 10.0.2.6
CSeq: 1 ACK
Route: <sip:10.0.2.4:5070;lr;transport=sctp>
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
 

Furthet the most interesting. This is a log

апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:uri:has_totag: totag found
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:parse_headers: flags=200
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:rr:is_preloaded: No
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:grep_sock_info: checking if host==us: 9==9 && [10.0.2.15] == [10.0.2.15]
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:grep_sock_info: checking if host==us: 9==9 && [10.0.2.15] == [10.0.2.15]
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:grep_sock_info: checking if port 5060 matches port 5060
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:rr:after_strict: Next hop: 'sip:10.0.2.4:5070;lr;transport=sctp' is loose router
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:parse_headers: flags=ffffffffffffffff
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:get_hdr_field: content_length=0
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:core:get_hdr_field: found end of header
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:rr:after_strict: The last route URI: 'sip:10.0.2.4:5070;lr;transport=sctp'
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:rr:run_rr_callbacks: callback id 1 entered with <lr;transport=sctp>
апр 25 12:14:18 OpenSips.server /usr/sbin/opensips[1213]: DBG:dialog:dlg_onroute: Route param 'did' not found

Opensips tryes to send this ACK to the SCTP side using UDP protocol!!! source port it uses 5060 and remote port 5070
Of course, such an ACK does not reach the addressee. And the call does not complete successfully.

ACK sip:10.0.2.4:5070;lr;transport=sctp SIP/2.0
Via: SIP/2.0/UDP 10.0.2.15:5060;branch=z9hG4bKccbc.5617e394.2
Via: SIP/2.0/UDP 10.0.2.6:5060;branch=z9hG4bK-24303-1-4
From: sipp <sip:sipp at 10.0.2.6:5060>;tag=1
To: sut <sip:79677777777 at 10.0.2.15:5060>;tag=4581SIPpTag015
Call-ID: 1-24303 at 10.0.2.6
CSeq: 1 ACK
Max-Forwards: 69
Subject: Performance Test
Content-Length: 0
 Why opensips do not send via SCTP protocol? What I do wrong?







-- 
Oleg Podguyko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190425/65a63bf1/attachment.html>


More information about the Users mailing list