[Home]

Summary:ASTERISK-27399: ChanIsAvail returns PJSIP peer that is not working
Reporter:Alan (lameventanas)Labels:
Date Opened:2017-11-06 22:25:18.000-0600Date Closed:2020-01-10 15:39:33.000-0600
Priority:MajorRegression?
Status:Closed/CompleteComponents:Applications/app_chanisavail
Versions:13.16.0 Frequency of
Occurrence
Related
Issues:
Environment:Linux x86Attachments:
Description:I have a few Asterisk servers with PJSIP trunks between them.

Server A should make the call via server B if the trunk between them is available.  Otherwise it should send it to server C.

So server A calls:
ChanIsAvail(PJSIP/b&PJSIP/c);

This always returns PJSIP/b in AVAILCHAN, even though that channel is not working (for example, when the network connection between those servers is down).

Comments:By: Asterisk Team (asteriskteam) 2017-11-06 22:25:19.262-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: Richard Mudgett (rmudgett) 2017-11-07 07:33:37.025-0600

The ChanIsAvail application looks at the endpoint's device state if the 's' or 't' options are used and checks to see if it can create a channel to say if a channel is available.

I think your definition of whether a channel is available is different than what ChanIsAvail considers available.
How do you know the network connection between the servers is down?
How could ChanIsAvail know?


By: Max Norba (miralin) 2017-11-07 09:11:16.700-0600

I have same bug or misconfiguration with one installation where availability of peer relies on ChanIsAvail. This installation uses chan_sip and if peer isn't available AVAILCHAN variable isn't set to any value. With pjsip it works as it was written above by Alan.

By: Asterisk Team (asteriskteam) 2017-11-21 12:00:00.606-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: Alan (lameventanas) 2017-11-21 18:51:16.422-0600

I'm not using any option with ChanIsAvail, I call it like this:

ChanIsAvail(PJSIP/b&PJSIP/c);

Based on the documentation, it should check if PJSIP/b is available.  If not, it should check if PJSIP/c is.

I know that the channel PJSIP/b is not available because the VPN between those servers is down.

Asterisk should know it too because it keeps track of the RTT of each endpoint.

This used to work with SIP channels (as opposed to PJSIP).

By: Asterisk Team (asteriskteam) 2017-11-21 18:51:16.612-0600

This issue has been reopened as a result of your commenting on it as the reporter. It will be triaged once again as applicable.

By: Joshua C. Colp (jcolp) 2017-11-21 18:54:40.938-0600

Prior to 13.17.0 PJSIP would dial unreachable things. A change[1] went in to change this behavior. Please update and then report back.

By: Asterisk Team (asteriskteam) 2017-12-06 12:00:01.403-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