Hello,

indeed, as Alex said, it is just a stylistic choice, the main purpose
would be to use a character that is not allowed in variable names to
mark the end of the variable (to avoid the use of ( ) to surround the
name of the variable). Anyhow, it is not needed to use any static string
as part of the key, can be only a variable, like $sht(x=>$ru); or can be
only a static string, like $sht(x=>abc); or many variables and static
strings: $sht(x=>$si::$rU::count). The :: is not seen as a special
delimiter or anything similar, is pure static string from htable key
point of view.

The choice of :: has probably relation with its usage in other languages
like C++ to refer to (static) fields/methods. For me is also more
friendly from human reading point of view, quite (white-)spacious,
allowing to spot quickly the tokens composing the key.

Cheers,
Daniel

On 09.01.23 01:45, Alex Balashov wrote:
> Hi,
>
> This is an arbitrary stylistic choice that is just consistently followed in 
> the documentation examples, likely because it was written by the same person, 
> or imitated by others. The colons are not required. 
>
> -- Alex
>
>> On Jan 8, 2023, at 1:57 PM, Noah Mehl <[email protected]> wrote:
>>
>> Hey everyone,
>>
>> Whenever I read documentation for htable usage, and other examples of other 
>> scripts in Kamailio, htable keys are typically named:
>>
>> something::something
>>
>> Examples are: $au::auth_count, $ci::srcip, join::$rU
>>
>> Why are there two colons (as opposed to a | )?  Is this just a standard 
>> semantic thing in Kamailio?  Is there something about that double character 
>> that’s unusual and easy to parse with SIP values?  Or is it just what people 
>> do, and that’s a good choice to continue for all other Kamailio script 
>> writers to have understanding?
>>
>> Any insight would be appreciated.
>>
>> Thanks!
>>
>> ~Noah
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>> To unsubscribe send an email to [email protected]
>> Important: keep the mailing list in the recipients, do not reply only to the 
>> sender!
>> Edit mailing list options or unsubscribe:
> -- 
> Alex Balashov
> Principal Consultant
> Evariste Systems LLC
> Web: https://evaristesys.com
> Tel: +1-706-510-6800
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - June 5-7, 2023 - www.kamailioworld.com

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to