Re: LUA scripting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ian Blenke wrote:
> Jan wrote:
> > Again, I agree that the current names aren't great. But since they
> > don't 1:1 represent Q.931 or H.225 items, we shouldn't pretend they
> > are: The same variables are made available for routing calls based on
> > ARQ, Setup, LRQ and facilty messages. The current fields are filled
> > with the closest equivalent in those messages so you don't have to
> > write specific code for all 4 situations (but you can look at
> > messageType if you really want to know what you are routing).
> 
> I see where you are coming from. From the gnugk maintainer
> perspective, having the Lua variables parallel the gnugk variable
> names is a good idea. From a gnugk user perspective, they may be a bit
> foreign.

Fortunately not every GnuGk has to deal with such a complex routing
process like you. I'm thinking about cases like "add this prefix if its
a 12 digit number and that prefix if its 7 digits and drop the call if
it ends with 5". Thats a requirement easily done with the LUA policy
as is. And you wouldn't want to write code like

if (messageType = "ARQ") && (destinationInfo = ...)
else if (messageType = "Setup") && (destinationAddress = ...)
else if (messageType = "LRQ") ...

when you can write code like

if (calledAlias = ...)

Thats meant to make the easy cases easy.


> > Secondly, if you split eg. the sourceAddress from a Setup by alias type
> > into 4 (or more) variables thats going to lead to terrible if/else
> > cascades in the routing code.
> 
> That may be true, but we do run into cases today where Q.931
> callingParty/calledParty vs h.225 sourceaddress/destinationAddress URL
> vs H323ID vs dialedDigit decisions must be made.
>[...]

I still think you would be better served with having access to the alias
plus the type in 2 input and 2 output variables that combining them
and have 4 input and 4 output variables (just for the alias), like you
suggested with
>     destinationAddressIP
>     destinationAddressDialedDigits
>     destinationAddressH323Id
>     destinationAddressH323Url

Regards,
Jan

-- 
Jan Willamowius, Founder of the GNU Gatekeeper Project
EMail  : jan@xxxxxxxxxxxxxx
Website: http://www.gnugk.org
Support: http://www.willamowius.com/gnugk-support.html

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________________

Posting: mailto:Openh323gk-users@xxxxxxxxxxxxxxxxxxxxx
Archive: http://sourceforge.net/mailarchive/forum.php?forum_name=openh323gk-users
Unsubscribe: http://lists.sourceforge.net/lists/listinfo/openh323gk-users
Homepage: http://www.gnugk.org/


[Index of Archives]     [SIP]     [Open H.323]     [Gnu Gatekeeper]     [Asterisk PBX]     [ISDN Cause Codes]     [Yosemite News]

  Powered by Linux