[OpenSIPS-Users] segfault in dialog.so
Антон Ершов
suharik71 at gmail.com
Thu Nov 7 03:19:19 EST 2019
Hello friends,
I already wrote about this problem and there was no answer.
http://lists.opensips.org/pipermail/users/2019-October/041771.html
I still want to process call profiles in event_route, but opensips falls
into error at the same time.
opensips -V
version: opensips 3.0.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 3d2bd5318
main.c compiled on 02:53:35 Nov 7 2019 with gcc 4.8.5
my event_route
event_route[E_DLG_STATE_CHANGED] {
xlog("L_INFO", "[$param(callid)] - new state dialog changed
$param(new_state) old state $param(old_state) \n");
cache_raw_query("redis:group3", "HGET callid
$param(callid)","$avp(reknum)");
if ($avp(reknum) != NULL) {
xlog("L_INFO", "[$param(callid)] - get reknum $avp(reknum) \n");
if ( get_dialogs_by_profile("reknumber", $avp(reknum), $avp(dlg_jsons),
$avp(callcount)) ) {
xlog("L_INFO", "[$param(callid)] - advertising number $avp(reknum) has
$avp(callcount) other calls \n");
} else {
xlog("L_INFO", "[$param(callid)] - this profile does not have active
dialogs \n");
$avp(callcount) = 0;
}
switch($param(new_state)) {
case 4:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount $avp(reknum)
$avp(callcount) \n");
if ($avp(reknum) != "" && $avp(callcount) != "") {
cache_raw_query("redis:group3","HSET callcount $avp(reknum)
$avp(callcount)");
cache_raw_query("redis:group3","EXPIRE callconut 360");
xlog("L_INFO", "[$param(callid)] - call established. Now on number
$avp(reknum) $avp(callcount) calls \n");
}
break;
case 5:
xlog("L_INFO", "[$param(callid)] - write in REDIS \"callcount $avp(reknum)
$avp(callcount) \n");
if ($avp(reknum) != "" && $avp(callcount) != "") {
cache_raw_query("redis:group3","HSET callcount $avp(reknum)
$avp(callcount)");
cache_raw_query("redis:group3","EXPIRE callcount 360");
xlog("L_INFO", "[$param(callid)] - call end. Now on number $avp(reknum)
$avp(callcount) calls \n");
cache_raw_query("redis:group3","HDEL callid $param(callid)");
}
break;
}
} else {
xlog("L_INFO", "[$param(callid)] - reknum vareable is NULL");
exit;
}
}
when we try to get a profile of an already dead dialog opensips falls.
please tell me is it possible to implement what I want or is it worth
looking for another solution?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20191107/8a24e148/attachment.html>
More information about the Users
mailing list