[asterisk-bugs] [JIRA] (ASTERISK-27131) PJSIP: Registration problems with Polycom phones behind NAT

Kevin Harwell (JIRA) noreply at issues.asterisk.org
Wed Jul 11 14:41:54 CDT 2018


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

Kevin Harwell commented on ASTERISK-27131:
------------------------------------------

Yes this functionality should be wrapped in a config option.

[~sergej] have you been able to update the patch?

Also once done if you'd like your contribution to be included faster, you should submit your patch for code review by the Asterisk Developer Community. To do so, please follow the Code Review [1] instructions on the wiki. Be sure to:
* Verify that your patch conforms to the Coding Guidelines [2]
* Review the Code Review Checklist [3] for common items reviewers will look for
* If necessary, provide tests for the Asterisk Test Suite that verify the correctness of your patch [4]

When ready, submit your patch and any tests to Gerrit [5] for code review.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Code+Review
[2] https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines
[3] https://wiki.asterisk.org/wiki/display/AST/Code+Review+Checklist
[4] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Test+Suite+Documentation
[5] https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage

> PJSIP: Registration problems with Polycom phones behind NAT
> -----------------------------------------------------------
>
>                 Key: ASTERISK-27131
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27131
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>    Affects Versions: 13.17.0
>            Reporter: Sergej Kasumovic
>            Assignee: Unassigned
>              Labels: patch, pjsip
>         Attachments: pjsip_register_one_contact.diff
>
>
> This is not strictly a bug, but what end user will see manifests itself as bug.
> The issue affects Polycom phones and only if they are behind NAT and Asterisk server is somewhere else.
> Consider the following scenario:
> * Asterisk is publicly available and it is irrelevant if it is behind NAT or not
> * Polycom phone is behind NAT. This is important step. 
> * PJSIP is used
> * Endpoint is defined with max_contacts > 1 in aor section
> * We define all options necessary to combat NAT (such as rewrite_contact=yes, force_rport, rtp_symmetric etc)
> * We register couple of different devices (softphones) with different registration expiry times on the same endpoint
> Now here is the problem with Polycom.
> Polycom will try to register and Asterisk will reply with 200 OK with all contacts currently registered to server. Since Polycom is behind NAT and we use rewrite_contact option, Polycom phone will not be able to find its Contact in response and will use the first one from the list.
> If the first one from the list, does not match its ;expires=T time, Polycom's registration timer will simply not work. What happens is that the phone won't re-register on time, will start losing registration as well as displaying messages about 'registration failure' on display and so on. 
> One can easily replicate this with all Polycom models (VVX, Soundpoints etc). 
> This used to work perfectly in chan_sip and of course it will work perfectly in PJSIP if max_contacts=1 and remove_existing=yes are set. The reason for it is that the only one Contact will be returned and this one will have correct ;expires parameter. 
> It will also work if Asterisk and Polycom are in same network, as the phone will find the relevant Contact in the list.  
> So I am attaching a patch. 
> It is not perfect and you probably won't accept the way it is as it is not what the RFC says (return all bindings). 
> What it does is that it will simply return the one and only Contact header that we got on register.
> Possibly this should be rewritten to have config option or something. 



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



More information about the asterisk-bugs mailing list