[SR-Users] host to get name of local server

Henry Fernandes henry at usinternet.com
Thu Jun 29 18:11:28 CEST 2017


We have multiple Kamailio 4.4.x servers and I am setting up stats tracking.  I would like to track the stats for each individual Kamailio server separately like so:

kamailio_1.sip.register.count
kamailio_2.sip.register.count
kamailio_3.sip.register.count

The problem is that we use one common file (in version control) for our Kamailio configuration.  Thus, I can’t just hardcode the hostname into the file because it will be the same for each server.

Does anyone have a solution for me?  Is there a variable that provides the hostname or is there something else I can do?

Ideally, I’d love to be able to do something like this.

statsd_incr($host_name + “.sip.register.count");


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20170629/e3c62045/attachment.html>


More information about the sr-users mailing list