[asterisk-bugs] [JIRA] (ASTERISK-25990) PJSIP TLS registration should respect client_uri scheme when generating Contact URI

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Mon May 16 13:30:56 CDT 2016


     [ https://issues.asterisk.org/jira/browse/ASTERISK-25990?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett closed ASTERISK-25990.
--------------------------------------

    Resolution: Fixed

> PJSIP TLS registration should respect client_uri scheme when generating Contact URI
> -----------------------------------------------------------------------------------
>
>                 Key: ASTERISK-25990
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-25990
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_pjsip, Resources/res_pjsip_outbound_registration
>    Affects Versions: 13.8.2
>            Reporter: Sebastian Damm
>            Severity: Minor
>
> As already written on the Asterisk-User list, Asterisk always sends a sips Contact URI when registering via TLS. This can be bad when interoperating with a server which uses sip:a at b.de;transport=tls Contact URIs. Then inbound calls don't work, because Asterisk expects a sips URI in the incoming INVITE as well.
> The discussion can be found here:
> http://lists.digium.com/pipermail/asterisk-users/2016-May/289096.html
> Asterisk should respect the client_uri scheme and send an appropriate Contact URI.
> This is how it should be:
> client_uri=sips:1234567 at example.org
> --> Contact: sips:1234567 at 1.2.3.4
> client_uri=sip:1234567 at example.org\;transport=tls
> --> Contact: sip:1234567 at 1.2.3.4;transport=tls
> Content of list post:
> {quote}
> Hi,
> I'm registering an Asterisk against my TLS capable service, using
> res_pjsip. My config looks like this:
> {noformat}
> [devtrunk_reg]
> type=registration
> outbound_auth=devtrunk_auth
> server_uri=sip:example.org\;transport=tls
> client_uri=sip:1234567 at example.org\;transport=tls
> outbound_proxy=sip:dev.example.org\;transport=tls\;lr
> contact_user=1234567
> retry_interval=60
> expiration=600
> line=yes
> endpoint=222
> [devtrunk_auth]
> type=auth
> auth_type=userpass
> username=1234567
> password=secret
> realm=example.org
> {noformat}
> It registers fine, but this is what the REGISTER request looks like:
> {noformat}
> <--- Transmitting SIP request (903 bytes) to TLS:1.2.3.4:5061 --->
> REGISTER sip:example.org;transport=tls SIP/2.0
> Via: SIP/2.0/TLS
> 9.8.7.6:55664;rport;branch=z9hG4bKPjNlqlgmSOP7O4LqOTUqJtFZB8fTmc0ZKL;alias
> Route: <sip:dev.example.org;transport=tls;lr>
> From: <sip:1234567 at example.org>;tag=vhDrzKtv9lMR53ZJFgVTnvGcACJiN6Aa
> To: <sip:1234567 at example.org>
> Call-ID: nzgHdLyliuBwecmae2Y..0oY2DqYjH0V
> CSeq: 14861 REGISTER
> Contact: <sips:1234567 at 9.8.7.6:55664;transport=TLS;line=dhslasr>
> Expires: 600
> Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL,
> UPDATE, PRACK, MESSAGE, REFER, REGISTER
> Max-Forwards: 70
> User-Agent: Asterisk PBX 13.8.2
> Content-Length:  0
> {noformat}
> What I really don't like is the Contact line. It starts with sips
> instead of sip. This makes inbound calls not work because the server
> sends a sip Contact header instead of sips. And Asterisk rejects that.
> In the header of the 480 response I see this line:
> Warning: 381 SIP "SIPS Required"
> Since I can't reconfigure the server to send sips Contact URIs, I need
> Asterisk to send out a contact URI in the register, that starts with
> sip: as well. Then inbound calls would work.
> Is there any way to get rid of this sips URI?
> Interestingly, when sending out calls, the Contact URI starts with sip
> instead of sips, so outbound calls work.
> {quote}



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



More information about the asterisk-bugs mailing list