[Home]

Summary:ASTERISK-30342: Receive OPTIONS message, sometimes cannot send response "Unable to send response (-1)"
Reporter:Dan Cropp (daninmadison)Labels:
Date Opened:2022-12-07 11:05:53.000-0600Date Closed:2022-12-07 11:37:41.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:18.15.0 18.15.1 Frequency of
Occurrence
Frequent
Related
Issues:
Environment:Ubuntu 20Attachments:( 0) debug_log
( 1) messages
( 2) pjsip.conf
Description:We have two Asterisk VMs front ended by a Kamailio box.
Kamailio sends OPTIONS messages to Asterisk to determine if it's still alive.
Whichever one has been alive for the longest, is treated as the active Asterisk.

Everything has been working awesome when running Asterisk 18.12.1.
Yesterday, we upgraded the boxes to Asterisk 18.15.0 and started seeing some Asterisk unable to send responses to the OPTIONS messages from Kamailio.  It seems to only happen for a period of time, then it suddenly starts working.

It appears as though the OPTIONS message is processed correctly, but when it attempts to send the response it fails.

ERROR[1281] res_pjsip/pjsip_options.c: Unable to send response (-1)

What is really strange is that after a period of time, it suddenly is able to successfully send responses to OPTIONS messages from Kamailio.

If we then change the configurations and tell asterisk reload, the same issue repeats.

Comments:By: Asterisk Team (asteriskteam) 2022-12-07 11:05:56.902-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. Please note that log messages and other files should not be sent to the Sangoma Asterisk Team unless explicitly asked for. All files should be placed on this issue in a sanitized fashion as needed.

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].

Please note that once your issue enters an open state it has been accepted. As Asterisk is an open source project there is no guarantee or timeframe on when your issue will be looked into. If you need expedient resolution you will need to find and pay a suitable developer. Asking for an update on your issue will not yield any progress on it and will not result in a response. All updates are posted to the issue when they occur.

Please note that by submitting data, code, or documentation to Sangoma through JIRA, you accept the Terms of Use present at [https://www.asterisk.org/terms-of-use/|https://www.asterisk.org/terms-of-use/].

By: Dan Cropp (daninmadison) 2022-12-07 11:06:51.498-0600

Attaching pjsip.conf and debugging/logging

By: Joshua C. Colp (jcolp) 2022-12-07 11:19:05.240-0600

Please remove "allow_reload" from your transport. That option can cause this to happen, as the PJSIP library does not have reload support. This option tries to overcome that by destroying the old transport, waiting some time, and then creating a new one. It's possible for this to fail, and it's also possible for SIP traffic during that time to not flow. That is why the option is disabled by default, and why its documentation warns of this.

This hasn't fundamentally changed between the versions, but timing likely has.

By: Dan Cropp (daninmadison) 2022-12-07 11:36:16.018-0600

Thank you Joshua.

You are absolutely correct (as usual).  Removing the allow_reload (or setting it to no) did solve the problem.
Closing the issue.



By: Dan Cropp (daninmadison) 2022-12-07 11:37:41.648-0600

Disabling allow_reload on the pjsip transport solved the problem.