Discussion:
[SR-Users] BUG: ip_addr2sbuf: unknown address family 0
AliReza Khoshgoftar Monfared
2014-07-14 15:47:15 UTC
Permalink
Hi,

I am running a simple command on timer in a kamailio proxy.
Here is the related parts of the config scripts:

loadmodule "timer"
modparam("timer", "declare_timer", "tmr1=LOG_STATS,1,fast,enable");
route{
...
}
route[LOG_STATS] {
exec_avp("netstat -ul | grep ':sip' | awk '{print
$$2}'","$avp(s:test)");
xlog("L_ALERT","logged RecvQ as $avp(s:test)");
return;
}
Each time I run the "netstat" using the exec() inside the timer route
BUG: ip_addr2sbuf: unknown address family 0
What is the meaning of this error, and what does kamailio mean by reporting
it as a "BUG"?

Is there any obvious reason, I am getting this? Is it related to calling
netstat to survey the RecvQ?


Thanks,
Alireza
Daniel-Constantin Mierla
2014-07-16 07:54:53 UTC
Permalink
Hello,

the timer executes using a fake sip request which doesn't have all the
attributes related to source and destination address. Perhaps exec_avp()
tries to set one of these addresses as a environment variable. I will
check the code and try to come up with a fix.

Cheers,
Daniel
Post by AliReza Khoshgoftar Monfared
Hi,
I am running a simple command on timer in a kamailio proxy.
loadmodule "timer"
modparam("timer", "declare_timer", "tmr1=LOG_STATS,1,fast,enable");
route{
...
}
route[LOG_STATS] {
exec_avp("netstat -ul | grep ':sip' | awk '{print
$$2}'","$avp(s:test)");
xlog("L_ALERT","logged RecvQ as $avp(s:test)");
return;
}
Each time I run the "netstat" using the exec() inside the timer route
ip_addr2sbuf(): BUG: ip_addr2sbuf: unknown address family 0
What is the meaning of this error, and what does kamailio mean by
reporting it as a "BUG"?
Is there any obvious reason, I am getting this? Is it related to
calling netstat to survey the RecvQ?
Thanks,
Alireza
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Loading...