Hi,
I have found recently that in order to detect retransmits I have to
create a transaction explicitly when the request comes in:
force_rport();
if(!t_check_trans())
t_newtran();
sl_send_reply("100", "Trying");
xlog("L_INFO", "New request - $ci\n");
it appears like there are carriers or UAs that do not honor the T1
retransmission interval retransmit the INVITE sooner than proxy creates
a transaction in t_relay(). And since we are counting concurrent calls,
we count the same call multiple times, which is not good.
But with this patch we've faced another sporadic problem - if the
transaction is created beforehand the accounting record is lost.. we use
acc_db mode and set flag to account the transaction. And there are no
errors in kamailio log but no insert into acc in mysql binlog either. I
wasn't successful reproducing it in the lab systems with identical setup.
Is anybody here perhaps aware of some limitation in acc module or
callbacks which makes a transaction created beforehand not accountable?
On a related note, it could make sense to create a transaction
implicitly if dlg_manage() is called to avoid counting same call many
times, I just don't know yet how common this issue is in real life.
Hello,
I'm observing that Via Header domain name of type SRV is resolving as DNS
A.
I looked at the code and it does support only A. It is basically setting to
default SIP port check_via_address which is causing DNS A query.
Is there any specific reason to do so?
I changed the code to support SRV as below and working fine.
static int check_via_address(struct ip_addr* ip, str *name,
unsigned short port, *short proto*, int resolver)
{
:
:
//if (port==0) port=SIP_PORT;
if (resolver&DO_DNS){
DBG("check_via_address: doing dns lookup\n");
/* try all names ips */
he=sip_resolvehost(name, &port, *(char *) &proto*); /* don't use naptr */
if (he && ip->af==he->h_addrtype){
for(i=0;he && he->h_addr_list[i];i++){
if ( memcmp(&he->h_addr_list[i], ip->u.addr, ip->len)==0)
return 0;
}
}
}
:
:
:
}
/* check if IP address in Via != source IP address of signaling */
int received_test( struct sip_msg *msg )
{
int rcvd;
rcvd=msg->via1->received
|| check_via_address(&msg->rcv.src_ip, &msg->via1->host,
msg->via1->port,* msg->via1->proto*, received_dns);
return rcvd;
}
Thanks
Jijo
Hello,
Would it be advised to simply comment out this error when doing
nat-pinging externally to Kamailio? It seems the error is a result of
Kamailio receiving a reply where no transaction is found (which is because
the OPTIONS request and or "nat pinging" is being handled external to
Kamailio). Which results in quite a bit of logging for each non
transaction matching reply.
Thoughts? Solutions?
Thanks as always in advance!
Sincerely,
Brandon Armstead
i tried to use db_cluster with presence server and got crash:
core was generated by `/usr/sbin/pres-serv -f /etc/pres-serv/pres-serv.cfg -P /var/run/pres-serv/pres-'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f39f3c13b13 in db_do_query_internal (_h=0x7f39f53b5708, _k=0x7fff811b8c90, _op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0,
_n=1, _nc=0, _o=0x0, _r=0x0, val2str=0x7f39f4c31cbc <db_mysql_val2str>, submit_query=0x7f39f4c2b615 <db_mysql_submit_query>,
store_result=0x7f39f4c2bb9c <db_mysql_store_result>, _l=0) at db_query.c:83
83 db_query.c: No such file or directory.
(gdb) where
#0 0x00007f39f3c13b13 in db_do_query_internal (_h=0x7f39f53b5708, _k=0x7fff811b8c90, _op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0,
_n=1, _nc=0, _o=0x0, _r=0x0, val2str=0x7f39f4c31cbc <db_mysql_val2str>, submit_query=0x7f39f4c2b615 <db_mysql_submit_query>,
store_result=0x7f39f4c2bb9c <db_mysql_store_result>, _l=0) at db_query.c:83
#1 0x00007f39f3c14303 in db_do_query (_h=0x7f39f53b5708, _k=0x7fff811b8c90, _op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0, _n=1,
_nc=0, _o=0x0, _r=0x0, val2str=0x7f39f4c31cbc <db_mysql_val2str>, submit_query=0x7f39f4c2b615 <db_mysql_submit_query>,
store_result=0x7f39f4c2bb9c <db_mysql_store_result>) at db_query.c:156
#2 0x00007f39f4c2c727 in db_mysql_query (_h=0x7f39f53b5708, _k=0x7fff811b8c90, _op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0, _n=1,
_nc=0, _o=0x0, _r=0x0) at km_dbase.c:261
#3 0x00007f39f1abec8e in db_cluster_query (_h=0x7f39f53b4788, _k=0x7fff811b8c90, _op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0, _n=1,
_nc=0, _o=0x0, _r=0x0) at dbcl_api.c:300
#4 0x00007f39f3c1651f in db_fetch_query_internal (dbf=0x7f39f03cec20, frows=500, _h=0x7f39f53b4788, _k=0x7fff811b8c90,
_op=0x7fff811b8c50, _v=0x7fff811b8c60, _c=0x0, _n=1, _nc=0, _o=0x0, _r=0x7fff811b8c88, _query=0x7f39f1abe854 <db_cluster_query>)
at db_query.c:427
#5 0x00007f39f3c169cc in db_fetch_query (dbf=0x7f39f03cec20, frows=500, _h=0x7f39f53b4788, _k=0x7fff811b8c90, _op=0x7fff811b8c50,
_v=0x7fff811b8c60, _c=0x0, _n=1, _nc=0, _o=0x0, _r=0x7fff811b8c88) at db_query.c:466
#6 0x00007f39f01aab1f in clean_puadb (update_period=30, min_expires=0) at pua_db.c:171
#7 0x00007f39f01a60a2 in hashT_clean (ticks=95327236, param=0x0) at pua.c:685
#8 0x0000000000525839 in compat_old_handler (ti=1525235788, tl=0x7f39ecc03a90, data=0x7f39ecc03a90) at timer.c:1017
#9 0x0000000000525da1 in slow_timer_main () at timer.c:1151
#10 0x00000000004656f0 in main_loop () at main.c:1692
#11 0x00000000004685f8 in main (argc=16, argv=0x7fff811b9088) at main.c:2563
i don't know why gdb complains about missing db_query.c.
this is with latest master.
-- juha