[Asterisk-code-review] func_channel: Added new OTHER_CHANNEL function (asterisk[master])

N A asteriskteam at digium.com
Sat Feb 12 07:30:17 CST 2022


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

Change subject: func_channel: Added new OTHER_CHANNEL function
......................................................................


Patch Set 7:

(1 comment)

Patchset:

PS7: 
> Great feedback.  Thank you.  We will investigate.
What would be a good methodical way to test this type of thing?

I ran some stress tests per the following, and nothing bad ever seems to happen.
The test synchronizes the two channels as much as possible to increase the chances of simultaneous access, but of course it may be hard to guarantee if that's only a split second access window to begin with:

[test]
exten => s,1,Set(GLOBAL(c1)=${CHANNEL})
        same => n,Set(GLOBAL(time2)=$[${EPOCH}+4])
        same => n,Answer()
        same => n,WaitUntil(${time2})
        same => n,Set(c=0)
        same => n,While($[${INC(c)}<10000])
        same => n,NoOp(c1: ${c})
        same => n,Set(OTHER_CHANNEL(CDR(test),${c2})=12)
        same => n,EndWhile()
        same => n,Wait(1)
        same => n,Hangup()

[test2]
exten => s,1,Set(GLOBAL(c2)=${CHANNEL})
        same => n,Answer()
        same => n,WaitUntil(${time2})
        same => n,Set(c=0)
        same => n,While($[${INC(c)}<10000])
        same => n,NoOp(c2: ${c})
        same => n,Set(OTHER_CHANNEL(CDR(test),${c1})=12)
        same => n,EndWhile()
        same => n,Wait(1)
        same => n,Hangup()



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I7492645ae4307553d0f586d78e13a4f586231fdf
Gerrit-Change-Number: 15893
Gerrit-PatchSet: 7
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Murawski <markm at intellasoft.net>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Mark Murawski <markm at intellasoft.net>
Gerrit-Comment-Date: Sat, 12 Feb 2022 13:30:17 +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>
Comment-In-Reply-To: Mark Murawski <markm at intellasoft.net>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220212/39539e11/attachment-0001.html>


More information about the asterisk-code-review mailing list