[asterisk-bugs] [JIRA] (ASTERISK-27131) PJSIP: Registration problems with Polycom phones behind NAT
Sergej Kasumovic (JIRA)
noreply at issues.asterisk.org
Tue Jul 25 02:31:58 CDT 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-27131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237808#comment-237808 ]
Sergej Kasumovic commented on ASTERISK-27131:
---------------------------------------------
Ok, will re-work the patch with additional config option.
> 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: Sergej Kasumovic
> 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