Asterisk 13.6 PJSIP outbound_proxy 'asterisk'

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):

[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'

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.

[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)

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’)

Other relevant log entries:

[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…

Data in astdb also changes such that both outbound_proxy and path change from “” to “asterisk” (I purge astdb if I do a restart):

I also get these. Again, I’m not specifying tone_zone as the default is the empty string. Don’t know how relevant this is; it’s just an observation.

I’ve now reached the stage where I’m getting stuck. I can’t appear to see anyone else with this problem, which puzzles me somewhat. One option for me is to remove from Asterisk source the bit that sets and validates the outbound_proxy on loading config, but I don’t know how to do this cleanly or even if it would work.

Does anyone have any ideas? I appreciate the information is a bit brief and I can supply more. Thanks for reading,

Neil Sunerton

I’d suggest filing an issue on the issue tracker[1] with full configuration details, console output, and system information. This is not something anyone else has experienced and I’m not really sure how it would happen…