*** Please forgive if this is a duplicate ***
Hello,
I am running into an issue where there is a race condition happening. I
am looking for opinions / ideas on how to handle the following below
scenario.
Scenario.
UAC places an outbound call -> upstream carrier.
The call is disconnected on both ends at the exact same time,
UAC -> sends BYE upstream
Upstream Carrier -> sends BYE downstream
Upstream 200 OK's the BYE
UAC sends 481 back to Upstream Carrier for their generated BYE.
The upstream carrier is complaining about receiving the relayed 481
responses -- so my first thought was simply to drop() these from relaying
upstream.
I am curious how other people are handling this?
Would you suggest simply dropping the relay from being sent back upstream
on the 481?
Would you simply always 200 OK a downstream BYE from trusted carriers
regardless of UAC response, and create separate transaction to send BYE
downstream?
Thank you as always. Look forward to your thoughts / suggestions / ideas.
Sincerely,
Brandon Armstead
Kamailio 3.2.0
When testing Kamailio 3.2.0, I notice that lcr.dump_gws command does not display ip_addr correctly. Here is my output:
lcr_id: 3
gw_id: 15
gw_index: 2
gw_name: gateway_1
scheme: sip
ip_addr: 1273060816.0.0.0
hostname:
port: 5060
params:
strip: 0
prefix:
tag:
flags: 0
defunct_until: 0
LCR is still working correctly. It just does not display IP in the right form. Does any body also has the same problem?
Gary
I'm not yet using Kamailio. I am looking for something to do a job which
sounds really simple but may not be. Our PBX connects to a SIP service
(voicetrading.com) but does not supply our CallerID, this means that
voicetrading.com provide some very weird callerids for the person at the
other end (international numbers etc). Which is not good.
There is no way to get our PBX to add CallerID itself, so I thought
maybe I could set up a local sip proxy? or sip redirect? server
(Kamailio?) to do nothing other than add in the callerid details to the
sip header and then forward the sip message on to voicetrading i.e. be
otherwise 'invisible'?
If Kamailio is not the right thing to do this with, is there something
else that could do it?
Thanks for any suggestions.
Dominic
Hello,
having trouble running LCR in kamailio 3.3 (head).
Here is my DB excerpt which i use to reproduce the problem:
INSERT INTO `lcr_rule` VALUES (2617960,90,'118','.*',1,1,'.*');
INSERT INTO `lcr_rule_target` VALUES (7771454,90,2617960,1424,0,100);
INSERT INTO `lcr_gw` VALUES
(1424,90,'OP1','10.10.10.10','',5060,NULL,1,0,NULL,'11#',1,NULL,NULL);
I stripped all other LCR data from my DB and only this rule with
from_uri and request_uri seems to bother me.
Tried this version on debian lenny and debian squeeze. On Lenny i am not
able to load lcr tables at all, get a segfault.
On squeeze, lcr tables loads up, but this rule gets marked as disabled.
Here is config part which i use to load a rule:
if (load_gws(90, $rU, $fu)) {
if (next_gw()) {
t_on_failure("FAIL_GW");
} else {
route(NO_ROUTE);
}
On squeeze, if i add following code to lcr_mod.c:1249 :
LM_INFO("LOADING lcr rule <%u> \n", rule_id);
right after:
rule_id = (unsigned int)VAL_INT(ROW_VALUES(row));
rule_id is still printed, but i get segfault like this:
Jul 24 10:17:43 sp1 kernel: [23482626.105865] kamailio[15136]: segfault
at a4 ip 00007fde15cb8802 sp 00007fff39d68320 error 4 in
lcr.so[7fde15ca8000+23000]
Not sure what i do terribly wrong. Setting from_uri and request_uri to
anythig but NULL makes the code to segfault with that print line added.
Without print line, kamailio starts, but never loads that rule.
Any help would be appreciated.
best regards,
Antanas Masevicius
NTT
When calling load_gws(), try putting $rU and $fu in double quotes, e.g. "$rU" rather than $rU bare.
-- Alex
--
Sent from my Samsung mobile, and thus lacking in the refinement one might expect from a proper keyboard.
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/Antanas Masevicius <antanas.masevicius(a)ntt.lt> wrote:Hello,
having trouble running LCR in kamailio 3.3 (head).
Here is my DB excerpt which i use to reproduce the problem:
INSERT INTO `lcr_rule` VALUES (2617960,90,'118','.*',1,1,'.*');
INSERT INTO `lcr_rule_target` VALUES (7771454,90,2617960,1424,0,100);
INSERT INTO `lcr_gw` VALUES
(1424,90,'OP1','10.10.10.10','',5060,NULL,1,0,NULL,'11#',1,NULL,NULL);
I stripped all other LCR data from my DB and only this rule with
from_uri and request_uri seems to bother me.
Tried this version on debian lenny and debian squeeze. On Lenny i am not
able to load lcr tables at all, get a segfault.
On squeeze, lcr tables loads up, but this rule gets marked as disabled.
Here is config part which i use to load a rule:
if (load_gws(90, $rU, $fu)) {
if (next_gw()) {
t_on_failure("FAIL_GW");
} else {
route(NO_ROUTE);
}
On squeeze, if i add following code to lcr_mod.c:1249 :
LM_INFO("LOADING lcr rule <%u> \n", rule_id);
right after:
rule_id = (unsigned int)VAL_INT(ROW_VALUES(row));
rule_id is still printed, but i get segfault like this:
Jul 24 10:17:43 sp1 kernel: [23482626.105865] kamailio[15136]: segfault
at a4 ip 00007fde15cb8802 sp 00007fff39d68320 error 4 in
lcr.so[7fde15ca8000+23000]
Not sure what i do terribly wrong. Setting from_uri and request_uri to
anythig but NULL makes the code to segfault with that print line added.
Without print line, kamailio starts, but never loads that rule.
Any help would be appreciated.
best regards,
Antanas Masevicius
NTT
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
I just installed a Siremis 3.2.1 on a server with an already working Kamailio 3.2.1. bellow is a typical error message I keep getting.
Can you point me to a solution
-Thanks
[http://192.168.105.196/siremis/themes/default/images/icon_forbidden.gif]
System Internal Error
The detailed error message are below:
[2012-07-26 19:14:11 (GMT)] An exception occurred while executing this script:
Error message: #0, Error in query:: SELECT T0.id, T0.method, T0.from_tag, T0.to_tag, T0.callid, T0.sip_code, T0.sip_reason, T0.time, T0.src_ip, T0.dst_user, T0.dst_domain, T0.dst_ouser, T0.src_user, T0.src_domain, T0.cdr_id FROM `acc` T0 WHERE method='INVITE' AND T0.src_user='admin' LIMIT 10. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'T0.src_ip' in 'field list'
Script name and line number of error: /var/www/siremis-3.2.1/openbiz/bin/data/BizDataObj_Lite.php:447
function: _run_search ( Array(2) ) @ /var/www/siremis-3.2.1/openbiz/bin/data/BizDataObj_Lite.php 243
function: fetch ( ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/EasyForm.php 690
function: fetchDataSet ( ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/FormRenderer.php 69
function: renderSmarty ( Object(EasyForm), "/var/www/siremis-3.2.1/siremis/modules/sipuser/template/grid.tpl" ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/FormRenderer.php 45
function: render ( Object(EasyForm) ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/EasyForm.php 1648
function: renderHTML ( ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/EasyForm.php 1538
function: render ( ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/ViewRenderer.php 83
function: renderSmarty ( Object(EasyView), "/var/www/siremis-3.2.1/siremis/modules/sipuser/template/view.tpl" ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/ViewRenderer.php 40
function: render ( Object(EasyView) ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/EasyView.php 274
function: _render ( ) @ /var/www/siremis-3.2.1/openbiz/bin/easy/EasyView.php 237
function: render ( ) @ /var/www/siremis-3.2.1/openbiz/bin/BizController.php 221
function: renderView ( "sipuser.view.AccListView", "", "", Null, "" ) @ /var/www/siremis-3.2.1/openbiz/bin/BizController.php 107
function: dispatchRequest ( ) @ /var/www/siremis-3.2.1/openbiz/bin/BizController.php 32
function: include_once ( "/var/www/siremis-3.2.1/openbiz/bin/BizController.php" ) @ /var/www/siremis-3.2.1/siremis/bin/controller.php 6
function: include ( "/var/www/siremis-3.2.1/siremis/bin/controller.php" ) @ /var/www/siremis-3.2.1/siremis/bin/_forward.php 102
function: include ( "/var/www/siremis-3.2.1/siremis/bin/_forward.php" ) @ /var/www/siremis-3.2.1/siremis/index.php 3
________________________________
Please ask system administrator for help...
Tony Ferrario
Manager SVT & Ops
OnMobile Global Limited
3950 Civic Center Drive , Suite 200
San Rafael, Ca 94903
Phone: 415-223-8206
Cell: 707-508-7285
tony.ferrario(a)onmobile.com
________________________________
DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto.
Thank you - OnMobile Global Limited.
Folks,
I'm trying to figure out if either Kamailio or OpenSIPs provides the various overload control algorithms recommended in the IETF or elsewhere. I haven't found documentation to this effect. Has anyone looked into this or used such techniques?
Thanks,
Mike
Hi Daniel,
I wanted to go back to this thread for a minute:
http://lists.sip-router.org/pipermail/sr-users/2012-June/073663.html
Sorry that I didn't reply to the thread; I no longer have the last message.
In your reply, you said:
> there is no timeout on the execution of that task. Of course, you
> can start many rtimer processes to do same task, up to you,
> via configuration parameters. A matter of how rtimer executed
> route is built, a rtimer process may not rest (e.g., sleep) and
> keep consuming mqueue items as long as the queue is not empty."
However, I am seeing some behaviour that is rather different.
Roughly, I have a single rtimer task that runs every 3 seconds and
consumes an mqueue full of accounting events. The rtimer request route
looks like something this:
route[ACCT_WRITER] {
while(mq_fetch("acct_write")) {
# Some stuff to write $mqv(...) values to PostgreSQL.
...
sql_query("ca", "SELECT * FROM acct_event_proc(...)");
...
mq_pv_free("account_write");
}
}
And the rtimer task is parameterised thusly:
modparam("rtimer", "timer", "name=acct_write;interval=3;mode=1")
modparam("rtimer", "exec", "timer=acct_write;route=ACCT_WRITER")
And the mqueue:
modparam("mqueue", "mqueue", "name=acct_write")
I have a stored procedure - let's call it acct_event_proc() - that is
invoked from within the rtimer task. When I looked at the live query
activity from Kamailio to Postgres by doing a packet capture on
loopback, like this:
tcpdump -i any -A -s 0 -tttt -n 'tcp port 5432' | grep acct_event_proc
What I saw was some events being written for about ~3 seconds and then
the process would stop. Then, after about half a second, it would burst
again for 3 seconds, then stop again. And so on and so forth.
When I lowered the interval to 1 second, it got faster and more
responsive, and would push more events through in one interval. But
still, it appeared to be a limited "burst" of SELECT calls punctuated by
1 second of silence.
When I checked out branch 3.3 and lowered the interval to 50000u, it got
even faster, almost real-time enough to keep up. Still, I did not
really know what was happening, so I added an MI command to HEAD to
check mqueue size live:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commit;h=41f771…
(I think it would be quite useful anyhow, as there is no runtime mqueue
info available right now.)
Using it, I confirmed my impression: the bigger the rtimer interval, the
larger the queue grows, and the slower the events seem to be written
overall. The shorter the rtimer interval, the faster they are dequeued,
and the smaller the mqueue is overall, in the course of normal call
processing.
Thus, my impression is that the execution time of the rtimer task is
bounded by the interval, and that the core kills the forked rtimer task
currently running prior to starting another one.
Can you shed some light?
Thanks!
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
Hello,
I am using kamailio 3.2.3.
I am using the nathelper module to "ping" users in the location table to
keep the NAT bindings alive.
In the event of 3 failed NAT pings, I would like to mark the entry as
"unavailable" or completely delete it from the location table to avoid
having stale data.
Is this a feature that exists ? Is not, are their plans for it in the
future ?
When the REGISTER expires after 3600, if the phone doesn't register, the
location entry gets cleaned up. So I have to wait up to one hour before
the bad entry is purged. I was hoping to have it purged sooner.
Thanks,
David
version: kamailio 3.2.3 (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 14:19:23 Apr 19 2012 with gcc 4.4.3