Hi!
IIRC we recently had a discussion about SIP outbound [1] and the
benefits of an implementation in Kamailio. Just playing around with a
SIP client on an iphone I discovered a usecase. Whenever the iphone gets
a new IP address (quite often as it often changes between WiFi and 3G)
the client reREGISTERs with the new IP address (establishing a new TCP
connection). This leads to lots of "broken" registrations and TCP
connections [2].
By use of SIP outbound and re-registration using the same "reg-id" the
proxy would be able to replace the old registration with the new
registration. Further, if Kamailio would have a mapping from
registrations to TCP connections it could also close the dead TCP
connections.
regards
Klaus
[1] http://tools.ietf.org/html/rfc5626
[2] I do not know if TCP keepalives (socket option) could detect broken
TCP connections without making too much noise on the receiver side
(activating the background application and draining battery)
Hello,
I've found that scripts/my_create.sql doesn't create the version table anymore
(new 3.1 installation). It may be removed since many versions ago, sorry i
don't know.
Loading the modules/db_mysql and modules_k/uri_db, with a SER flavour
compilation (and also a ser config file), it raises:
0(15262) DEBUG: db_mysql [km_my_con.c:94]: opening connection:
mysql://xxxx:xxxx@localhost/srtest
0(15262) DEBUG: db_mysql [km_my_con.c:121]: connection type is Localhost via
UNIX socket
0(15262) DEBUG: db_mysql [km_my_con.c:122]: protocol version is 10
0(15262) DEBUG: db_mysql [km_my_con.c:123]: server version is 5.1.51-log
0(15262) ERROR: db_mysql [km_dbase.c:120]: driver error on query: Table
'ser_new.version' doesn't exist
0(15262) ERROR: <core> [db_query.c:101]: error while submitting query
0(15262) ERROR: <core> [db.c:366]: error in db_query
Should I create the version table manually or using an old script?
Thank you.
Regards,
Claudio
Thanks. This fixed error.
Is $rc the same as $retcode ?
Gary
-----Original Message-----
From: Daniel-Constantin Mierla [mailto:miconda@gmail.com]
Sent: Friday, April 29, 2011 1:01 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List
Cc: Gary Chen
Subject: Re: [SR-Users] How to get rid of this error message.
Hello,
On 4/29/11 4:32 PM, Gary Chen wrote:
> I am using prefix2domain("2") in PDT module like this:
> $var(found) = prefix2domain("2");
> and I got this error:
> ERROR: <core> [lvalue.c:411]: assignment failed at pos:
> (701,56-701,56) Apparently when prefix2domain("2) returns an value to
> $var(found), it does not like it. But it still work.
> The $var(found) still contains the return value (-1) if no prefix
> found. And all my configuration is working. It just generate a lot of
> this kind of error in my log file. Am I doing something wrong? How can
> I fix it?
I will look at it, it might be that the -1 return code is usually
associated with an error case. Meanwhile try to replace that line with
the following:
prefix2domain("2");
$var(found) = $rc;
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com
I am using prefix2domain("2") in PDT module like this:
$var(found) = prefix2domain("2");
and I got this error:
ERROR: <core> [lvalue.c:411]: assignment failed at pos: (701,56-701,56)
Apparently when prefix2domain("2) returns an value to $var(found), it does not like it. But it still work.
The $var(found) still contains the return value (-1) if no prefix found. And all my configuration is working. It just generate a lot of this kind of error in my log file. Am I doing something wrong? How can I fix it?
Gary
Dear all,
I have a Kamailio with RTPoxy configured. The purpose is to pass the RTP
from this server.
When I make calls behind NAT the RTProxy seems to be engaged but in traces I
don't see any RTP.
Is there anything wrong with the idea or I'm missing something in the
configuration ?
Thank you
Alex
domain module sets $td.did at lookup_domain call. $td.did seems to be a
normal avp, because i can print its value with xlog by referring to it
as $avp(td.did). however, its value is gone at failure route, which
makes me suspect that $td.did is not really a normal avp.
in route block i have
$avp(did) = $td.did;
xlog("L_INFO", "at t_relay: <td/td.did> = <$avp(did)/$avp(td.did)>\n");
if (t_relay()) exit;
branch route, onreply route, and failure route are set when the above
t_relay() takes place.
at the end of branch route block, i have
xlog("L_INFO", "at end of contact branches: <did/td.did> = <$avp(did)/$avp(td.did)>\n");
and at the beginning of onreply route block:
xlog("L_INFO", "at beginning of onreply: <did/td.did> = <$avp(did)/$avp(td.did)>\n");
and at the beginning of failure route block:
xlog("L_INFO", "at beginning of contact failure: <did/td.did = <$avp(did)/$avp(td.did)>\n");
when i make a call, i get to syslog:
Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13706]: INFO: at t_relay: <td/td.did> = <test.fi/test.fi>
Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13706]: INFO: at end of contact branches: <did/td.did> = <test.fi/test.fi>
Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13708]: INFO: at beginning of onreply: <did/td.did> = <test.fi/<null>>
Apr 22 15:53:27 sip /usr/sbin/sip-proxy[13705]: INFO: at beginning of contact failure: <did/td.did = <test.fi/<null>>
why is it that $avp(did) value has been preserved from route/branch
route block to onreply/failure blocks, but value of $avp(td.did) is not?
i'll cc to jan in case he is not on this list.
-- juha
Hello,
in about five weeks the kamailio project will (again) be present on the
LinuxTag fair, "the most important place for Linux and open source software in
Europe" - http://www.linuxtag.org/2011/en.html .
If you are in Berlin during this time, plan to visit the LinuxTag or just like
to help your favourite SIP server project - please consider supporting us in
running our fair booth! Even showing up for one or two hours helps a lot.
We need also support to properly present our project, like flyers, a banner,
maybe some live demonstrations.. So even if you can't participate in person,
there are other ways to help us!
Please contact me per mail if you could help at the booth or have some ideas
about our project presentation. The actual state of preparations can be found
in our wiki: http://sip-router.org/wiki/meetings/berlin_2011
Cheers,
Henning
Hello,
We are using kamailio 1.5 and we have the following problem with ldap_search:
A call comes in. If it is to a VOIP user, it will be routed to kamailio, and eventually go to the ldap lookup route: route[10] to look up the user.
This is always successful (LDAP can connect).
It will then look up user preferences (call forwarding etc.) from SQL in route[12] and route based on this result in route[13].
If the result is "CFU (call forward unconditional) = on", the URI is changed and route[10] (LDAP lookup) is called again.
This is always successful (LDAP can connect).
If the result is "CFB (call forward busy) = on" and the user is busy, the URI is changed and route[10] (LDAP lookup) is called again.
This is also always successful (LDAP can connect).
If the result is "CFNR (call forward no reply) = on", the timeout is changed and the call is delivered to the phone through route[14] (location) and route[15] (relay).
If the user does not answer, the URI is changed in failure_route[1] and route[10] is called.
For some unknown reason, ldap_search always fails in this scenario with the messages: "ldap_session not found", "couldn't get ldap session" and then "no LDAP entry found".
Why?
And why does this result in the -1 return code and not the -2 return code for ldap_search?
The only differences I can think of is that the unsuccessful scenario comes from FAILURE_ROUTE instead of REQUEST_ROUTE, and that longer time has passed since the original invite.
Here's a sample log:
NOTE the three ERROR lines, the INFO line and the ROUTE 10 line.
Dec 27 13:31:55 [3373]: INVITE received from sip:<CALLER>@<SBC_IP> <source IP: <SBC_IP>> to sip:<CALLEE>@<KAM_IP>:
Dec 27 13:31:55 [3373]: ERROR:ldap:ldap_reconnect: [ldapprod]: LDAP reconnect successful
Dec 27 13:31:55 [3373]: ROUTE 10: LDAP returned: UID = <UID>, voipSipPrimaryUri = <PRIMARY_URI>, voipExtensionUri = sip:<CALLEE>@<DOMAIN>
Dec 27 13:31:55 [3373]: ROUTE 12: Effective user properties for UID <UID>: CFU: off <FORWARDTO>, CFB: off <FORWARDTO>, CFNR: on:25 <FORWARDTO>, CFNC: off <FORWARDTO>, VM: <CALLEE>, busy_level: 1, DBrows: 1
Dec 27 13:31:55 [3373]: -------------------- Calling sip:<CALLEE>@<DOMAIN> for 25 seconds. --------------------
Dec 27 13:31:55 [3373]: ROUTE 15: Sending 105 INVITE from sip:<CALLER>@<SBC_IP> to sip:<CALLEE>@<CALLEE_IP> (via <<null>>)
Dec 27 13:31:55 [3383]: Response 100 Trying to Cseq 102 INVITE received from <PROTO>:<CALLEE_IP>:<PORT>
Dec 27 13:31:55 [3385]: Response 180 Ringing to Cseq 102 INVITE received from <PROTO>:<CALLEE_IP>:<PORT>
Dec 27 13:32:20 [3388]: FAILURE_ROUTE 1: Timeout for: 104 INVITE from <CALLER> -> <CALLEE>
Dec 27 13:32:20 [3388]: -------------------- Forwarding on no reply to <FORWARDTO> --------------------
Dec 27 13:32:20 [3388]: ERROR:ldap:get_connected_ldap_session: [ldapprod]: ldap_session not found
Dec 27 13:32:20 [3388]: ERROR:ldap:lds_search: [ldapprod]: couldn't get ldap session
Dec 27 13:32:20 [3388]: INFO:ldap:ldap_search_impl: no LDAP entry found
Dec 27 13:32:20 [3388]: ROUTE 11: Number lookup results for <FORWARDTO>: Node: VOIP.
Dec 27 13:32:20 [3388]: CONFIG ERROR: VOIP number not found in LDAP. Hanging up.
Dec 27 13:32:20 [3373]: Response 487 Request Cancelled to Cseq 102 INVITE received from <PROTO>:<CALLEE_IP>:<PORT>
Here's the ldap config file:
[ldapprod]
ldap_server_url = "ldap://ldap.<DOMAIN>"
ldap_network_timeout = 500
ldap_client_bind_timeout = 500
kamailio config snippets (in case you need them):
# LDAP lookup for UID and primary URI
route[10] {
...
ldap_search("ldap://ldapprod/<DN>?uid,voipSipPrimaryUri,voipExtensionUri?one?(&(objectClass=voipAddress)(|(voipSipUri=sip:$rU@uio.no)(|(voipSipUri=$var(uri))(voipSipUri=$var(e164uri)))))");
if ($retcode < 1) {
switch ($retcode) {
case -1:
# no LDAP entry found
route(11);
return(1);
case -2:
# internal error
sl_send_reply("500", "Internal server error");
exit;
}
}
ldap_result("uid/$avp(s:uid)");
$avp(s:exten) = null;
if (!ldap_result("voipExtensionUri/$avp(s:exten)")) {
xlog("L_INFO", "voipExtensionUri not found.\n");
}
if (!ldap_result("voipSipPrimaryUri/$avp(s:p-uri)")) {
xlog("L_WARN", "voipSipPrimaryUri not found.\n");
#exit here?
}
if (isflagset(1)) {
xlog("L_INFO", "ROUTE 10: LDAP returned: UID = $avp(s:uid), voipSipPrimaryUri = $avp(s:p-uri), voipExtensionUri = $avp(s:exten)\n");
}
if $avp(s:exten) != null {
$ru=$avp(s:exten);
} else {
$ru=$avp(s:p-uri);
}
route(12);
}
}
# Number lookup. Non-VoIP URI's go here.
route[11] {
...
}
# Database lookup for call forwarding.
route[12] {
...
}
# Call forwarding logic
route[13] {
if (is_method("INVITE")) {
$avp(s:uio_timer_avp) = "300";
if ($avp(s:cfu_status) == "on") {
# Forward immediately
xlog("L_INFO", "-------------------- $rU forwarded unconditionally to $avp(s:cfu_number). --------------------\n");
$rU = $avp(s:cfu_number);
route(10);
}
...
if ( $var(dlg_busy) >= $avp(s:busy_level) ) {
if ($avp(s:cfb_status) == "on") {
xlog("L_INFO", "-------------------- $rU has $var(dlg_busy) active calls. Treshold $avp(s:busy_level). Forwarding on busy to $avp(s:cfb_number) --------------------\n");
$rU = $avp(s:cfb_number);
route(10);
}
...
else if ($avp(s:cfnr_status) == "on") {
# Forward to phone with timeout then to $avp(s:cfnr_number).
# t_set_fr($avp(s:cfnr_timeout) + "000"); # Recommended method in 3.1. Function does not exist in 1.5. Using old method (avp).
$avp(s:uio_timer_avp) = $avp(s:cfnr_timeout);
xlog("L_INFO", "-------------------- Calling $ru for $avp(s:uio_timer_avp) seconds. --------------------\n");
route(14);
}
...
}
failure_route[1] {
...
if $avp(s:cfnr_status) == "on" {
if (isflagset(1)) {
xlog("L_INFO", "FAILURE_ROUTE 1: Timeout for: $mi $rm from $fU -> $rU\n");
}
revert_uri();
$rU = $avp(s:cfnr_number);
xlog("L_INFO", "-------------------- Forwarding on no reply to $rU --------------------\n");
route(10);
}
...
}
With kind regards,
Pan
Hi!
Kamailio 3.0.3.
I have a strange problem with one of our Kamailio servers. This one is
used for routing (with carrierroute) and to send presence information
(with pua module)
Once every 10 day or so I get this error and then Kamailio stops
responding to any SIP packets.
Apr 6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: WARNING:
<script>: Failure route - M=INVITE RURI=sip:8615XXXX@178.XX.XX.XX
F=sip:861XXXXX@188.120.93.114:1025 T=sip:86155XXXX@sip1.uni-tel.dk
IP=178.XX.XX.XX ID=6de881ec07f9c6494ee589cf208da358(a)10.11.87.206
Apr 6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
carrierroute [cr_func.c:95]: cannot find AVP 'carrier'
Apr 6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
carrierroute [cr_func.c:805]: invalid carrier id -1
Apr 6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
<script>: cr_next_domain failed
Shared memory size is 128M and over halv is free just before the
error. The server is in production and does handle debug>1 well, so I
do not have much information in the log files. Private memory is the
default size.
Any ideas what it could be, or how to investegate further?
I think my next steps would be to increase the private memory og to
increase children=4 to children=8
--
Morten Isaksen