[Home]

Summary:ASTERISK-28638: Simplify dialplan for Dial, Page, and ChanIsAvail
Reporter:cmaj (cmaj)Labels:patch
Date Opened:2019-11-27 15:32:58.000-0600Date Closed:2020-01-07 10:54:58.000-0600
Priority:MinorRegression?
Status:Closed/CompleteComponents:Channels/chan_pjsip
Versions:13.29.1 14.7.8 GIT 15.7.3 16.6.1 17.0.0 Frequency of
Occurrence
Related
Issues:
causesASTERISK-29989 app_dial, chan_dahdi: DIALSTATUS is inconsistent for busy
Environment:Debian GNU/LinuxAttachments:( 0) please_PJSIP_DIAL_CONTACTS.diff
Description:It is convenient to get back a dialable string from the PJSIP_DIAL_CONTACTS function so you can pass it in to Dial() right away. But if there are no contacts, then the string is empty, and therefore not dialable. (The channel will hang up.)

This patch does not change existing behaviour. It only returns 'PJSIP/endpoint' if you provide the 'please' argument:

{noformat}
Dial(${PJSIP_DIAL_CONTACTS(555,,,please)})
{noformat}

...will never let you down, even if 555 is not reachable, or if 555 is not a defined endpoint in your configuration.

Addition ([~rmudgett]):
Instead of changing PJSIP_DIAL_CONTACTS, I made patches to the Dial, Page, and ChanIsAvail applications to allow empty technology/resource positions in the list including the empty list.  Dialplan is now simplified for more cases than an empty PJSIP_DIAL_CONTACTS list.  Patches are up on Gerrit.
Comments:By: Asterisk Team (asteriskteam) 2019-11-27 15:33:00.613-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].

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.

By: cmaj (cmaj) 2019-11-27 16:44:39.591-0600

I was unable to upload this patch via Gerrit ... maybe I broke it too many times...

To ssh://gerrit.asterisk.org:29418/asterisk.git
! [remote rejected]       HEAD -> refs/publish/13/ASTERISK-28638 (prohibited by Gerrit: not permitted: create)


By: Joshua C. Colp (jcolp) 2019-12-02 06:58:20.253-0600

What version of git-review do you have installed? If it is an old version then you need to upgrade to at least 1.27.0

By: cmaj (cmaj) 2019-12-03 15:51:52.522-0600

Thanks, seems to work now with git-review version 1.27.0 on Debian 10!

New version of git-review reported:

{noformat}
remote: ERROR: commit 3b8a6ca: subject >80 characters; use shorter first paragraph
{noformat}

And also:

{noformat}
To ssh://gerrit.asterisk.org:29418/asterisk.git
! [remote rejected]       HEAD -> refs/for/13%topic=ASTERISK-28638 (commit 3b8a6ca: Commit length validation failed)
{noformat}

Much more helpful!

By: Richard Mudgett (rmudgett) 2020-01-06 19:24:22.257-0600

Instead of changing PJSIP_DIAL_CONTACTS, I made patches to the Dial, Page, and ChanIsAvail applications to allow empty technology/resource positions in the list including the empty list.  Dialplan is now simplified for more cases than an empty PJSIP_DIAL_CONTACTS list.  Patches are up on Gerrit.

By: Friendly Automation (friendly-automation) 2020-01-07 10:54:59.333-0600

Change 13557 merged by Friendly Automation:
app_page.c: Simplify dialplan using Page.

[https://gerrit.asterisk.org/c/asterisk/+/13557|https://gerrit.asterisk.org/c/asterisk/+/13557]

By: Friendly Automation (friendly-automation) 2020-01-07 11:04:04.957-0600

Change 13514 merged by Friendly Automation:
app_page.c: Simplify dialplan using Page.

[https://gerrit.asterisk.org/c/asterisk/+/13514|https://gerrit.asterisk.org/c/asterisk/+/13514]

By: Friendly Automation (friendly-automation) 2020-01-07 11:32:16.078-0600

Change 13558 merged by Friendly Automation:
app_page.c: Simplify dialplan using Page.

[https://gerrit.asterisk.org/c/asterisk/+/13558|https://gerrit.asterisk.org/c/asterisk/+/13558]

By: Friendly Automation (friendly-automation) 2020-01-07 11:36:53.646-0600

Change 13560 merged by Friendly Automation:
app_dial.c: Simplify dialplan using Dial.

[https://gerrit.asterisk.org/c/asterisk/+/13560|https://gerrit.asterisk.org/c/asterisk/+/13560]

By: Friendly Automation (friendly-automation) 2020-01-07 11:41:52.442-0600

Change 13559 merged by Friendly Automation:
app_page.c: Simplify dialplan using Page.

[https://gerrit.asterisk.org/c/asterisk/+/13559|https://gerrit.asterisk.org/c/asterisk/+/13559]

By: Friendly Automation (friendly-automation) 2020-01-07 11:46:36.461-0600

Change 13515 merged by Friendly Automation:
app_dial.c: Simplify dialplan using Dial.

[https://gerrit.asterisk.org/c/asterisk/+/13515|https://gerrit.asterisk.org/c/asterisk/+/13515]

By: Friendly Automation (friendly-automation) 2020-01-07 11:49:37.423-0600

Change 13561 merged by Friendly Automation:
app_dial.c: Simplify dialplan using Dial.

[https://gerrit.asterisk.org/c/asterisk/+/13561|https://gerrit.asterisk.org/c/asterisk/+/13561]

By: Friendly Automation (friendly-automation) 2020-01-07 11:49:57.228-0600

Change 13562 merged by Friendly Automation:
app_dial.c: Simplify dialplan using Dial.

[https://gerrit.asterisk.org/c/asterisk/+/13562|https://gerrit.asterisk.org/c/asterisk/+/13562]

By: Friendly Automation (friendly-automation) 2020-01-07 13:59:20.475-0600

Change 13516 merged by Friendly Automation:
app_chanisavail.c: Simplify dialplan using ChanIsAvail.

[https://gerrit.asterisk.org/c/asterisk/+/13516|https://gerrit.asterisk.org/c/asterisk/+/13516]

By: Friendly Automation (friendly-automation) 2020-01-07 14:00:04.148-0600

Change 13564 merged by Friendly Automation:
app_chanisavail.c: Simplify dialplan using ChanIsAvail.

[https://gerrit.asterisk.org/c/asterisk/+/13564|https://gerrit.asterisk.org/c/asterisk/+/13564]

By: Friendly Automation (friendly-automation) 2020-01-07 14:29:08.264-0600

Change 13563 merged by George Joseph:
app_chanisavail.c: Simplify dialplan using ChanIsAvail.

[https://gerrit.asterisk.org/c/asterisk/+/13563|https://gerrit.asterisk.org/c/asterisk/+/13563]

By: Friendly Automation (friendly-automation) 2020-01-07 14:29:49.458-0600

Change 13565 merged by George Joseph:
app_chanisavail.c: Simplify dialplan using ChanIsAvail.

[https://gerrit.asterisk.org/c/asterisk/+/13565|https://gerrit.asterisk.org/c/asterisk/+/13565]