Hello,
On 11.09.25 10:58, Denys Pozniak via sr-users wrote:
> Hey!
>
> I don't understand how the *is_socket_name()* function works.
> I assigned a name to each socket, but the function works regardless of
> which socket the traffic arrives at.
>
> /# kamailio -c/
> /Listening on/
> / udp: 1.1.1.1 [1.1.1.1]:5060 name sip_fl_udp/
> / tcp: 1.1.1.1 [1.1.1.1]:5060 name sip_fl_tcp/
>
>
> /script:/
> / if ( is_socket_name("sip_fl_udp") ) {/
> / xlog("L_WARN", "[test] * proto=$proto -> sip_fl_udp \n");/
> / } else if ( is_socket_name("sip_fl_tcp") ) {/
> / xlog("L_WARN", "[test] * proto=$proto -> sip_fl_tcp \n");/
> / }/
>
>
> /syslog:/
> /<script>: [test] * proto=udp -> sip_fl_udp/
> /<script>: [test] * proto=tcp -> sip_fl_udp/
>
as documented, the function return true if the parameter is a name of a
local socket:
-
https://www.kamailio.org/docs/modules/stable/modules/corex.html#corex.f.is_socket_name
Cheers,
Daniel
--
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions --
[email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the
sender!