[Asterisk-code-review] core_local: Fix local channel parsing with slashes (asterisk[master])

N A asteriskteam at digium.com
Fri Apr 8 20:35:10 CDT 2022


Attention is currently required from: Richard Mudgett.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/18369 )

Change subject: core_local: Fix local channel parsing with slashes
......................................................................


Patch Set 3:

(1 comment)

Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/18369/comment/bb4fc1dc_396c69d1 
PS3, Line 16: For instance, something like DAHDI/5 or PJSIP/device
> Are you talking about a dialplan extension like this? […]
I've never actually used a static extension, like that, what I have is stuff like this:

;exten => _DAHDI[A-Za-z0-9].,1,Goto(DAHDI/${EXTEN:5},1)
;exten => _SIP[A-Za-z0-9].,1,Goto(SIP/${EXTEN:3},1)
;exten => _PJSIP[A-Za-z0-9].,1,Goto(PJSIP/${EXTEN:5},1)
;exten => _MGCP[A-Za-z0-9].,1,Goto(MGCP/${EXTEN:4},1)
exten => _[A-Z].,1,Set(CDR_PROP(disable)=1)
	same => n,Answer()
	same => n,Set(__fullpeername=${EXTEN})

The number/callerid only applies to statically defined extensions.
If it is a pattern match, then "anything goes".

I often use the device name as an extension as is, and for a while have had to use hacky workarounds to work around the limitation of local channels not being able to access them directly, as you would be able to with a Goto. That's what's demonstrated above... the commented out extensions I don't need anymore with this fix.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/18369
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I8e85bc14072e452d0537a801aba17779569d0360
Gerrit-Change-Number: 18369
Gerrit-PatchSet: 3
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Sat, 09 Apr 2022 01:35:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220408/5fe97fc4/attachment-0001.html>


More information about the asterisk-code-review mailing list