[Home]

Summary:ASTERISK-27946: dial (API): Storage of dialed target uses AST_MAX_EXTENSION when it shouldn't
Reporter:Joshua Elson (joshelson)Labels:pjsip
Date Opened:2018-06-27 17:51:11Date Closed:2020-03-31 12:00:08
Priority:MinorRegression?
Status:Closed/CompleteComponents:Applications/app_page Core/Dial
Versions:15.4.1 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:We are seeing more issues in what we'd consider "normal" circumstances where Dial strings are exceeding AST_MAX_EXTENSION and AST_CHANNEL_NAME length, currently set to 80.

In particular, PJSIP_DIAL_CONTACTS expansion is often producing dial strings such as these:

PJSIP/102-RelativelyLongStringName/sip:102-RelativelyLongStringName@100.100.100.190:11881;transport=TCP

When called by Page application - Page($\{PJSIP_DIAL_CONTACTS($\{EXTEN})}) - for instance, this ends up getting cut off awkwardly and producing failed dial attempts:

dial.c: Called 102-RelativelyLongStringName/sip:102-RelativelyLongStringName@100.100.100.190:11

Would raising AST_MAX_EXTENSION from 80 to 100 or something slightly more be an acceptable solution here?
Comments:By: Asterisk Team (asteriskteam) 2018-06-27 17:51:13.800-0500

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: Kevin Harwell (kharwell) 2018-07-02 11:16:34.970-0500

I'm not entirely sure if increasing the size of those values would help here.

Also if you can post an example dialplan (steps to duplicate) along with a debug log [1] it might shed some more light on the problem and help distinguish this from a bug vs an improvement.

Thanks!

[1] https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

By: Asterisk Team (asteriskteam) 2018-07-16 12:00:01.337-0500

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: Joshua Elson (joshelson) 2018-07-16 15:31:25.691-0500

Let me see if I can get a better dialplan description of this, but the short version is that when using PJSIP_DIAL_CONTACTS with a TCP or TLS peer with a long name, you end up with a string like this even for a single contact:

PJSIP/102-RelativelyLongStringName/sip:102-RelativelyLongStringName@100.100.100.190:11881;transport=TCP

When you then try to dial that with the Page() Application, you get it cut off at 80 characters. I did verify that extending the length of the field does resolve the issue.

By: Asterisk Team (asteriskteam) 2018-07-16 15:31:25.904-0500

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) 2018-07-17 05:04:30.826-0500

The problem is that the dialing API uses AST_MAX_EXTENSION in begin_dial_prerun and begin_dial_channel to store the dialed string. It shouldn't.

By: Friendly Automation (friendly-automation) 2020-03-31 12:00:09.367-0500

Change 14033 merged by Friendly Automation:
dial.c: Removed dial string 80 character limitation

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:08:20.543-0500

Change 14065 merged by Joshua Colp:
dial.c: Removed dial string 80 character limitation

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:14:59.758-0500

Change 14063 merged by Friendly Automation:
dial.c: Removed dial string 80 character limitation

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

By: Friendly Automation (friendly-automation) 2020-03-31 12:25:29.792-0500

Change 14064 merged by Friendly Automation:
dial.c: Removed dial string 80 character limitation

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