core_local: Fix local channel parsing with slashes. #249
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, trying to call a Local channel with a slash in the extension will fail due to the parsing of characters after such a slash as being dial modifiers. Additionally, core_local is inconsistent and incomplete with
its parsing of Local dial strings in that sometimes it uses the first slash and at other times it uses the last.
For instance, something like DAHDI/5 or PJSIP/device is a perfectly usable extension in the dialplan, but Local channels in particular prevent these from being called.
This creates inconsistent behavior for users, since using a slash in an extension is perfectly acceptable, and using a Goto to accomplish this works fine, but if specified through a Local channel, the parsing prevents this.
This fixes this by explicitly parsing options from the last slash in the extension, rather than the first one, which doesn't cause an issue for extensions with slashes.
ASTERISK-30013 #close
Imported from Gerrit: https://gerrit.asterisk.org/c/asterisk/+/18369
Resolves: #248