[Asterisk-code-review] func_channel: Adds TECH_EXISTS function. (asterisk[master])

N A asteriskteam at digium.com
Tue Feb 22 11:03:18 CST 2022


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

Change subject: func_channel: Adds TECH_EXISTS function.
......................................................................


Patch Set 1:

(1 comment)

Patchset:

PS1: 
> I believe this should exist as a separate module, externally, and if it sees enough use then it coul […]
This seems like such a basic core thing I couldn't believe there wasn't already a function for it. How else do you suggest doing this? It's not like there's a "workaround" currently.

Dial will bail out if it fails, but at that point it's already two late. A user needs to be able to know if a tech is available before the Dial actually runs. I should not need to do this:

same => n,Dial(PJSIP/something)
same => n,ExecIf($["${HANGUPCAUSE}"="20"]?Dial(SIP/something)) ; channel not registered

Besides being clunky, it also emits errors.

A separate module just seems silly considering the function itself is literally 4 lines. And if it's not in the tree (and even if it is), how do you propose "measuring use"? There's just no way to know at that point, those stats don't exist.

I'm fine with keeping things out of tree at your discretion generally, but I really do think this specifically is such a basic, core thing that it's silly not to be there.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Idf110464ed69a757b3e0c9d0e8d95d4d24559b46
Gerrit-Change-Number: 18063
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Tue, 22 Feb 2022 17:03:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Joshua Colp <jcolp at sangoma.com>
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220222/36e668a6/attachment.html>


More information about the asterisk-code-review mailing list