[asterisk-bugs] [JIRA] (ASTERISK-26782) res_pjsip: URI requirement for fields is not consistently documented and error does not provide indication
Peter Sokolov (JIRA)
noreply at issues.asterisk.org
Thu Feb 9 12:46:12 CST 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-26782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=235135#comment-235135 ]
Peter Sokolov commented on ASTERISK-26782:
------------------------------------------
I can understand your point. However in my case, it was the initial configuration. The registration was not working correctly yet and I was trying to get it working modifying its configuration. At certain state any configuration changes in pjsip.conf that I made, did not have any effect on the behavior. It took me quite some time until I found out that registration has not been reloaded because of problems with some change done already some time ago (outbound_proxy as IP or line=false with endpoint still present).
Also in the case that you have described, if the administrator has not noticed the problem in pjsip.conf because the system is still working correctly, the big surprise will come on next asterisk restart, which might be at a time, the person that made changes is not there or does not remember anymore, what has been changed, so it may take longer to fix the problem. Just my opinion.
> res_pjsip: URI requirement for fields is not consistently documented and error does not provide indication
> ----------------------------------------------------------------------------------------------------------
>
> Key: ASTERISK-26782
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26782
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Documentation, Resources/res_pjsip, Resources/res_pjsip_outbound_registration
> Affects Versions: 14.2.1
> Reporter: Peter Sokolov
> Severity: Minor
>
> In chan_sip the outbound proxy could be entered as IP address. Howewer with PJSIP when
> outbound_proxy=80.x.x.152
> is used, the registration section will not load.
> Using URI as proxy, the problem is solved:
> outbound_proxy=sip:80.x.x.152:5060
> While this requirement is valid and partially documented, there are the following problems:
> 1.
> The other items in pjsip.conf that have to contain URI have _uri in their name, so they are self-explanatory. For outbound_proxy, the URI requirement is only documented for endpoint in the pjsip.conf.sample, but not for registration and aor.
> 2.
> The error end debug messages generated when an IP instead of URI is used does not really give any hint about the problem and makes solving this very difficult:
> [Feb 5 15:58:27] DEBUG[3957]: res_pjsip_outbound_registration.c:1289 sip_outbound_registration_apply: Applying configuration to outbound registration 'sip_via_proxy'
> [Feb 5 15:58:27] DEBUG[3957]: res_pjsip_outbound_registration.c:962 sip_outbound_registration_state_destroy: Destroying registration state for registration to server 'sip:80.x.x.104' from client 'sip:12345 at 80.x.x.104'
> [Feb 5 15:58:27] ERROR[3957]: res_sorcery_config.c:307 sorcery_config_internal_load: Could not create an object of type 'registration' with id 'sip_via_proxy' from configuration file 'pjsip.conf'
> 3.
> Registration/endpoint/aor item is not (re)loaded when the IP is used as outbound_proxy. However on PJSIP reload the old configuration for the Registration/Endpoint remains active and no changes from pjsip.conf are applied for this Registration/Endpoint. On restart of asterisk, the whole Registration/Endpoint is not loaded. This gives an inconsistent behavior. Depending whether reload or restart is done, the registration/endpoint/aor is there or not. I would expect in both cases the complete Registration/endpoint/aor to be removed from the active configuration instead of keeping the old state in the case of reload with errors in pjsip.conf.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list