Re: how to use is_socket_name()
Denys Pozniak via sr-users <[email protected]>
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <CA+x3Axoyp-VE4av-km-fXy_m60n1OZidKV1n_KbRZEsf85nwGw@mail.gmail.com> |
Thanks for the clarification! Is there a function to compare the socket name with the parameter to which traffic has arrived? чт, 11 сент. 2025 г. в 11:21, Daniel-Constantin Mierla <[email protected]>: > 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 > > -- BR, Denys Pozniak __________________________________________________________ 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!