Hi, Bogdan.

Here is my simple scenario description:

UA1----Opensips----Asterisk ---- Opensips ----UA2

Transport protocol doesn't change during this chain and it's tls, if I
understand you right.

I attached SIP capture of the call. As you can see, there is the
dynamic tcp port in the RR hrd of last reply to client from which Opensips
connected to the Asterisk. Instead of one, to which UA1 connected to
Opensips (5061). As a result, there is a media session between UAs, but
only for 30 sec, during of which the UA1 tried to send ACK to the Opensips,
but unsuccessfully for quite clear reason. Is there the resolution how to
realize this scenario without rewriting RR?

Best Regards,
Sergey Pysanko.






[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
01/04/22,
01:46:49 PM

вт, 4 янв. 2022 г. в 11:47, Bogdan-Andrei Iancu <[email protected]>:

> Hi Sergey,
>
> Manually altering the RR hdr is a receipt for disaster :). Somehow I
> suspect you do not do double RR (as the protocol changes for the call).
> This double RR is automatically done (by default) when doing
> `record_route()`. Do you get 2 RR hdrs when routing the initial INVITE ?
>
> Regards,
>
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>   https://www.opensips-solutions.com
> OpenSIPS eBootcamp 2021
>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>
> On 1/4/22 11:27 AM, Sergey Pisanko wrote:
>
> Hello, Bogdan, .
>
> Thank you for your answer. I've solved my issue recently just rewriting
> Record - Route header with appropriate port within "onreply route block" by
> subst function.
>
> Best Regards,
> Sergey Pysanko.
>
>
>
> [image: Mailtrack]
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
>  Sender
> notified by
> Mailtrack
> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
>  01/04/22,
> 11:27:07 AM
>
> пн, 3 янв. 2022 г. в 17:59, Bogdan-Andrei Iancu <[email protected]>:
>
>> Hello Sergey,
>>
>> Could you provide a SIP capture (and calling scenario) to underline the
>> issue you have ?
>>
>> Best regards,
>>
>> Bogdan-Andrei Iancu
>>
>> OpenSIPS Founder and Developer
>>   https://www.opensips-solutions.com
>> OpenSIPS eBootcamp 2021
>>   https://opensips.org/training/OpenSIPS_eBootcamp_2021/
>>
>> On 12/30/21 2:50 PM, Sergey Pisanko wrote:
>>
>> Hello!
>>
>> I try to realize the next scenario with UAs, Opensips-2.4 and Asterisk.
>> UAs are registered onto Asterisk through Opensips and also - on Opensips
>> if the 200 OK is came back from Asterisk.
>> Calls between UAs are relayed to Asterisk by Opensips.
>> This scenario works fine with udp. But it needs to do with tls. And here
>> I have the problem. What happens.
>> Unlike udp, tcp cannot listen its port and create clients connection at
>> the same time. Opensips listens tls port for clients connection
>> whereas it creates dynamic tcp port to connect to Asterisk. As a result,
>> I see that port in Record-Route header in 200 OK addressed to caller.
>> Thus, callers ACK comes to that dynamic port instead of Opensips listened
>> port and Opensips dropped it.
>> And question is how to force Opensips to put right port for caller?
>>
>> Regards,
>> Serhii Pysanko.
>>
>>
>>
>> [image: Mailtrack]
>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
>>  Sender
>> notified by
>> Mailtrack
>> <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality11&;>
>>  12/30/21,
>> 02:49:47 PM
>>
>> _______________________________________________
>> Users mailing 
>> [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
----------------------------------
UA1 to OPENSIPS Opensips_IP:5061:
----------------------------------

INVITE sip:508080@asterisk_IP:5062;transport=tls SIP/2.0
Via: SIP/2.0/TLS 
UA1_IP:52732;rport;branch=z9hG4bKPjb0cc2bffdc81454eb26583c7d3925484;alias
Max-Forwards: 70
From: <sip:505050@asterisk_IP>;tag=d8e0d49a268d4b51aa85b8f79d2dc062
To: <sip:508080@asterisk_IP>
Contact: <sip:505050@UA1_IP:52732;transport=TLS;ob>
Call-ID: adb91a11aeb84cebbb1a0e9b3f737f9c
CSeq: 9147 INVITE
Route: <sip:Opensips_IP:5061;transport=tls;lr>
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.5
Authorization: Digest username="505050", realm="asterisk", 
nonce="1641298342/d7e3fb8b3d36162e02c6f06ba7ce025d", 
uri="sip:508080@asterisk_IP:5062;transport=tls", 
response="ef89c414b398b86f836c647a4618716e", algorithm=md5, 
cnonce="882c1c44e3634a188fee3c3cfcea4893", opaque="6a1b7faf68185146", qop=auth, 
nc=00000001
Content-Type: application/sdp
Content-Length:   693

v=0
o=- 3850294342 3850294342 IN IP4 UA1_IP
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 4000 RTP/SAVP 8 0 96 101 102
c=IN IP4 UA1_IP
b=TIAS:64000
a=rtcp:4001 IN IP4 UA1_IP
a=sendrecv
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 opus/48000/2
a=fmtp:96 
maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=64000;useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:102 telephone-event/48000
a=fmtp:102 0-16
a=ssrc:427376828 cname:51ff0c590e976fab
a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:sk7/Eszxo1FzEK7yX2uLJ31YtX41abwzMzB9+TLI
a=crypto:2 AES_CM_128_HMAC_SHA1_32 
inline:pYLtDmaE+aUjy1+3orAeDjO9nonOJo7M2DuTSO6k

-------------------------------
Opensips (48470) to Asterisk (5062)
-------------------------------

<--- Received SIP request (2110 bytes) from TLS:Opensips_IP:48470 --->
INVITE sip:508080@asterisk_IP:5062;transport=tls SIP/2.0
Record-Route: 
<sip:Opensips_IP:5061;transport=tls;lr;ftag=d8e0d49a268d4b51aa85b8f79d2dc062>
Via: SIP/2.0/TLS Opensips_IP:5061;branch=z9hG4bKb8a2.9fe1b065.0;i=9b32ca86
Via: SIP/2.0/TLS 
UA1_IP:52732;received=UA1_IP;rport=52732;branch=z9hG4bKPjb0cc2bffdc81454eb26583c7d3925484;alias
Max-Forwards: 68
From: <sip:505050@asterisk_IP>;tag=d8e0d49a268d4b51aa85b8f79d2dc062
To: <sip:508080@asterisk_IP>
Contact: <sip:505050@UA1_IP:52732;transport=TLS;ob>
Call-ID: adb91a11aeb84cebbb1a0e9b3f737f9c
CSeq: 9147 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.5
Authorization: Digest username="505050", realm="asterisk", 
nonce="1641298342/d7e3fb8b3d36162e02c6f06ba7ce025d", 
uri="sip:508080@asterisk_IP:5062;transport=tls", 
response="ef89c414b398b86f836c647a4618716e", algorithm=md5, 
cnonce="882c1c44e3634a188fee3c3cfcea4893", opaque="6a1b7faf68185146", qop=auth, 
nc=00000001
Content-Type: application/sdp
Content-Length: 899

v=0
o=- 3850294342 3850294342 IN IP4 UA1_IP
s=pjmedia
b=AS:84
t=0 0
a=X-nat:0
m=audio 24120 RTP/SAVP 8 0 96 101 102
c=IN IP4 Opensips_IP
b=TIAS:64000
a=ssrc:427376828 cname:51ff0c590e976fab
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:96 opus/48000/2
a=rtpmap:101 telephone-event/8000
a=rtpmap:102 telephone-event/48000
a=fmtp:96 
maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=64000;useinbandfec=1
a=fmtp:101 0-16
a=fmtp:102 0-16
a=sendrecv
a=rtcp:24121
a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:sk7/Eszxo1FzEK7yX2uLJ31YtX41abwzMzB9+TLI
a=setup:actpass
a=fingerprint:sha-1 E8:4F:19:70:C7:74:B5:73:7A:65:2C:60:1C:0F:72:B6:C9:D6:44:B7
a=ice-ufrag:ORyCsYFJ
a=ice-pwd:YWCdb2Dnreyoz8P0IU54yPAR8r
a=candidate:IEU3ysrf067x3ln1 1 UDP 2130706431 Opensips_IP 24120 typ host
a=candidate:IEU3ysrf067x3ln1 2 UDP 2130706430 Opensips_IP 24121 typ host


---------------------------
Asterisk to Opensips reply
---------------------------

<--- Transmitting SIP response (1465 bytes) to TLS:Opensips_IP:48470 --->
SIP/2.0 200 OK
Via: SIP/2.0/TLS 
Opensips_IP:5061;rport=48470;received=Opensips_IP;branch=z9hG4bKb8a2.9fe1b065.0;i=9b32ca86
Via: SIP/2.0/TLS 
UA1_IP:52732;rport=52732;received=UA1_IP;branch=z9hG4bKPjb0cc2bffdc81454eb26583c7d3925484;alias
Record-Route: 
<sip:Opensips_IP:48470;transport=TLS;lr;ftag=d8e0d49a268d4b51aa85b8f79d2dc062>
Call-ID: adb91a11aeb84cebbb1a0e9b3f737f9c
From: <sip:505050@Asterisk_IP>;tag=d8e0d49a268d4b51aa85b8f79d2dc062
To: <sip:508080@Asterisk_IP>;tag=3d503b27-cbd7-49e9-b076-49686b709c95
CSeq: 9147 INVITE
Server: FPBX-14.0.16.11(16.19.0)
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, MESSAGE, REFER
Contact: <sip:Asterisk_IP:5062;transport=TLS>
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
P-Asserted-Identity: "508080" <sip:508080@Asterisk_IP>
Content-Type: application/sdp
Content-Length:   477

v=0
o=- 3850294342 3850294344 IN IP4 Asterisk_IP
s=Asterisk
c=IN IP4 Asterisk_IP
t=0 0
m=audio 30410 RTP/SAVP 96 0 8 101
a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:umKjN3UNSUtW+Cn/R2uStQZBhIWgJeDVyO2T5gCs
a=rtpmap:96 opus/48000/2
a=fmtp:96 
maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=64000;useinbandfec=1
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

---------------------------
Opensips to UA1 reply
---------------------------

SIP/2.0 200 OK
Via: SIP/2.0/TLS 
UA1_IP:52732;rport=52732;received=UA1_IP;branch=z9hG4bKPjb0cc2bffdc81454eb26583c7d3925484;alias
Record-Route: 
<sip:Opensips_IP:48470;transport=TLS;lr;ftag=d8e0d49a268d4b51aa85b8f79d2dc062>
Call-ID: adb91a11aeb84cebbb1a0e9b3f737f9c
From: <sip:505050@Asterisk_IP>;tag=d8e0d49a268d4b51aa85b8f79d2dc062
To: <sip:508080@Asterisk_IP>;tag=3d503b27-cbd7-49e9-b076-49686b709c95
CSeq: 9147 INVITE
Server: FPBX-14.0.16.11(16.19.0)
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, 
UPDATE, PRACK, MESSAGE, REFER
Contact: <sip:Asterisk_IP:5062;transport=TLS>
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800;refresher=uac
Require: timer
P-Asserted-Identity: "508080" <sip:508080@Asterisk_IP>
Content-Type: application/sdp
Content-Length: 639

v=0
o=- 3850294342 3850294344 IN IP4 Asterisk_IP
s=Asterisk
c=IN IP4 Opensips_IP
t=0 0
m=audio 24138 RTP/SAVP 96 0 8 101
a=maxptime:20
a=rtpmap:96 opus/48000/2
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:96 
maxplaybackrate=24000;sprop-maxcapturerate=24000;maxaveragebitrate=64000;useinbandfec=1
a=fmtp:101 0-16
a=sendrecv
a=rtcp:24139
a=crypto:1 AES_CM_128_HMAC_SHA1_80 
inline:umKjN3UNSUtW+Cn/R2uStQZBhIWgJeDVyO2T5gCs
a=ptime:20
a=candidate:IEU3ysrf067x3ln1 1 UDP 2130706431 Opensips_IP 24138 typ host
a=candidate:IEU3ysrf067x3ln1 2 UDP 2130706430 Opensips_IP 24139 typ host



































_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to