Summary: | ASTERISK-25621: res_pjsip: outbound_proxy arbitrarily and occasionally set to 'asterisk' during reload | ||||
Reporter: | Neil Sunerton (neilsunerton) | Labels: | |||
Date Opened: | 2015-12-10 06:40:34.000-0600 | Date Closed: | 2017-12-13 12:24:30.000-0600 | ||
Priority: | Major | Regression? | No | ||
Status: | Closed/Complete | Components: | Resources/res_pjsip | ||
Versions: | 13.6.0 | Frequency of Occurrence | Occasional | ||
Related Issues: |
| ||||
Environment: | CentOS release 6.6 (Final) Linux c6c17.c6tel.gs.rr 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux | Attachments: | ( 0) database-show.txt ( 1) pjsip.conf | ||
Description: | I'm having some odd problems with Asterisk 13.6 (and the same problem previously in Certified Asterisk 13.1-cert1). During some reloads the outbound_proxy value 'asterisk' is applied to all PJSIP endpoints resulting in the following in /var/log/asterisk/messages (the two entries appear for each and every defined endpoint):
{noformat} [Nov 23 09:35:06] ERROR[1051] res_pjsip/pjsip_configuration.c: Invalid outbound proxy 'asterisk' specified on endpoint '2306...' [Nov 23 09:35:06] ERROR[1051] res_sorcery_config.c: Could not create an object of type 'endpoint' with id '2306...' from configuration file 'pjsip.conf' {noformat} Asterisk will then not process further calls. I can't tell if this is due to endpoints no longer existing or it's trying to route calls via the outbound proxy 'asterisk'. A restart is required to get things working again. {noformat} [Nov 23 09:34:19] ERROR[868] chan_pjsip.c: Failed to create outgoing session to endpoint '2306...' [Nov 23 09:34:19] WARNING[11137][C-000001b6] app_dial.c: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination) {noformat} My initial config did not specify an outbound_proxy as the documentation states it has a default values of the empty string. I have tried explicity setting outbound_proxy= for endpoint and aor types (I don't use any registration types) with no change. I typically have around 10 to 15 reloads per day with this problem occurring on roughly 10% of them. (By reload I mean asterisk -rx 'core reload') I cannot replicate on demand as it happens arbitrarily. It only happens on a live server with real users, which does have more use than my development server. Other relevant log entries: {noformat} [Nov 23 09:35:06] ERROR[10344] res_pjsip/pjsip_options.c: Unable to apply outbound proxy on request to qualify contact sip:2306... [Nov 23 09:35:06] ERROR[10344] res_pjsip.c: Unable to apply outbound proxy on request NOTIFY to endpoint 2306... {noformat} Data in astdb also changes such that both outbound_proxy and path change from "" to "asterisk" (I purge astdb if I do a restart): {noformat} /registrar/contact/2306...;@6d18ff3c9ad83dd313eff61b2b445375: {"qualify_timeout":"3.000000","outbound_proxy":"asterisk","expiration_time":"1449057422","path":"asterisk","qualify_frequency":"30","user_agent":"snom320/8.7.3.25.9","uri":"sip:2306...@81.2...:2048;line=hmo728hd"} {noformat} I also make this observation in case it is relevant. I'm not specifying tone_zone as the default is the empty string. {noformat} [Nov 23 09:35:06] ERROR[4708] chan_pjsip.c: Unknown country code 'asterisk' for tonezone. Check indications.conf for available country codes. {noformat} For information, I have made two modifications to Asterisk source code before building: {noformat} [asterisk-13.6.0]# diff apps/app_queue-orig.c apps/app_queue.c 6744c6744 < if (ast_asprintf(&gosub_args, "%s,%s,1(%s)", gosubexec, what_is_s, gosub_argstart + 1) < 0) { --- > if (ast_asprintf(&gosub_args, "%s,%s,1", gosubexec, gosub_argstart + 1) < 0) { {noformat} {noformat} [asterisk-13.6.0]# diff include/asterisk/channel-orig.h include/asterisk/channel.h 161c161 < #define AST_MAX_ACCOUNT_CODE 20 /*!< Max length of an account code */ --- > #define AST_MAX_ACCOUNT_CODE 256 /*!< Max length of an account code */ {noformat} On posting to Asterisk forum was told "This is not something anyone else has experienced and I'm not really sure how it would happen..." Attachments are obfuscated. | ||||
Comments: | By: Asterisk Team (asteriskteam) 2015-12-10 06:40:36.022-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Neil Sunerton (neilsunerton) 2015-12-10 06:46:16.831-0600 Current pjsip.conf Output from asterisk -rx 'database show' shows some data with path and outbound_proxy values 'asterisk'. On a newly restarted service these are all the empty string. This example is from a running server which hasn't yet reached the condition where it cannot process calls but is exhibiting the outbound_proxy value problem to some extent. By: Rusty Newton (rnewton) 2015-12-10 16:53:57.017-0600 It will help to get a debug log captured during a reload where the issue occurs. Please follow the instructions on the wiki [1] for how to collect debugging information from Asterisk. For expediency, where possible, attach the debug with a '.txt' file extension so that the debug will be usable for further analysis. Thanks! [1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information By: Neil Sunerton (neilsunerton) 2015-12-14 10:09:06.207-0600 Thanks. I've turned up the debug level and am now waiting for the condition to re-occur. Will post the logs then. By: Asterisk Team (asteriskteam) 2016-01-05 12:00:21.613-0600 Suspended due to lack of activity. This issue will be automatically re-opened if the reporter posts a comment. If you are not the reporter and would like this re-opened please create a new issue instead. If the new issue is related to this one a link will be created during the triage process. Further information on issue tracker usage can be found in the Asterisk Issue Guidlines [1]. [1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines By: Serinf BCO (serinfbco) 2016-04-25 04:13:22.437-0500 I confirm we have the exact same problem as Neil describe. It happen not frequently, about 1 time per month and a complete rebbot of the server is require. It could happen many minutes after a reload but not immediately. In the log we see this: {noformat}[2016-04-24 09:15:10] ERROR[13545] res_pjsip/pjsip_options.c: Unable to apply outbound proxy on request to qualify contact sip:539@172.16.101.34:5060{noformat} At this time Asterisk does not work, not calls could be made. We need to restart all system. After a restart this line continue to be written in the asterisk log but calls could be made. A complete flush of the asdb doesn't help in our case. We need to restart the phones to force inscription and get rid of this. For more details I had already post this issue on the asterisk and Freepbx forums here: http://forums.asterisk.org/viewtopic.php?f=1&t=92546 http://community.freepbx.org/t/pjsip-bug-or-misconfig-after-upgrade-registrar-suddenly-change-with-outbound-proxy-set/27585 http://community.freepbx.org/t/issues-with-freepbx-12-upgraded-system-pjsip-registration-and-new-extensions-showing/26770 Asterisk 13.2.0 About 250 phones (Polycom) By: Sean Bright (seanbright) 2017-12-13 12:24:30.543-0600 This was most likely fixed by https://gerrit.asterisk.org/#/c/1469/ which was released in Asterisk 13.10. If you can reproduce this in a more recent version of Asterisk, feel free to re-open. |