[asterisk-bugs] [JIRA] (ASTERISK-28993) res_pjsip: Wrong Via and Contact is chosen, despite explicit configured transport

Marin Odrljin (JIRA) noreply at issues.asterisk.org
Fri Aug 21 09:40:43 CDT 2020


    [ https://issues.asterisk.org/jira/browse/ASTERISK-28993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=251722#comment-251722 ] 

Marin Odrljin commented on ASTERISK-28993:
------------------------------------------

I've just noticed one interesting thing in log. In the INVITE Via header is SIP/2.0/UDP 10.5.20.42:5060..., but in the response from ITSP asterisk gets back 'received' tag in Via header with correct IP 10.5.20.52. In the documentation it is written following: A received tag is added to a Via header field if a UA or proxy receives the request from a different address than that specified in the top Via header field. Does it means that asterisk sends INVITE over IP .52 but just sends wrong Via and Contact value?

{code}
[Aug 19 16:48:02] VERBOSE[2541] res_pjsip_logger.c: <--- Transmitting SIP request (921 bytes) to UDP:138.187.57.135:5060 --->
INVITE sip:+41786144341 at 138.187.57.135 SIP/2.0
Via: SIP/2.0/UDP 10.5.20.42:5060;rport;branch=z9hG4bKPj6516df3d-4f78-4fef-9ab9-9e89d94c2a67

[Aug 19 16:48:02] VERBOSE[2540] res_pjsip_logger.c: <--- Received SIP response (323 bytes) from UDP:138.187.57.135:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 10.5.20.42:5060;received=10.5.20.52;branch=z9hG4bKPj6516df3d-4f78-4fef-9ab9-9e89d94c2a67;rport=5060
{code}

It would be interesting in the future to add those information into logging such as:
res_pjsip_logger.c: <--- Transmitting SIP request (921 bytes) to UDP:138.187.57.135:5060 *from 10.5.20.52:5060* ---> and
res_pjsip_logger.c: <--- Received SIP response (323 bytes) from UDP:138.187.57.135:5060 *at 10.5.20.52:5060* --->
So we could immediatelly see from/to which local IP data were sent/received

> res_pjsip: Wrong Via and Contact is chosen, despite explicit configured transport
> ---------------------------------------------------------------------------------
>
>                 Key: ASTERISK-28993
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-28993
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip, Resources/res_pjsip_sdp_rtp
>    Affects Versions: 16.11.0
>         Environment: Debian GNU/Linux 9
>            Reporter: Marin Odrljin
>            Severity: Minor
>         Attachments: ari-app.log, full-log-filtered, http.conf, pjsip.conf, pjsip-new.conf, rtp.conf
>
>
> We are having multiple local IP addresses 10.5.20.42 ,.52, ,.62, ,.72 for multiple PJSIP trunks toward 2 different provider IP addresses. SIP INVITE sends SDP as following:
> {code}
> c=IN IP4 10.5.20.42
> m=audio 12442 RTP/AVP 8 3 101
> {code}
> but UDP listening address is the last one .72:
> {code}
> ss -na
> udp    UNCONN     0      0      10.5.20.72:12442                 *:*
> {code}
> So the result is no incoming RTP packets are comming into Asterisk - no IN audio.
> Intersting thing is that in Asterisk 13 we have had the same configuration and it worked because Asterisk was listening on all IPs 0.0.0.0



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list