I know I'm revisiting a problem that has been discussed in multiple
threads from various angles, so I might be rightly accused of laziness
in neglecting to research them all. All the same:
I have proxy1 and proxy2 writing to database A and database B,
respectively. Database A and database B are active-active masters,
synchronised via some replication system attached to the underlying DB
technology.
The 'location' table is also replicated this way. We know that 'usrloc'
doesn't work so well with this: one instance of Kamailio will
periodically delete the other's contacts, even if they have a nonlocal
SIP domain.
Is there any db_mode that can be used (other than 0/purely in-memory) to
make this work right? Or is that the essential problem that p_usrloc is
written to solve?
Thanks,
-- Alex
--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
now that the send function issue got resolved, i tried core forward
function. core cookbook tells:
forward
Forward the SIP request to the given destination in stateless mode. This
has the format of [proto:]host[:port]. Host can be an IP or hostname;
supported protocols are UDP, TCP and TLS. (For TLS, you need to compile
the TLS support into core). If proto or port are not specified, NAPTR
and SRV lookups will be used to determine them (if possible).
If destination parameter is missing, the forward will be done based on RURI.
Example of usage:
forward("10.0.0.10:5060");
#or
forward();
i then went i tried
forward("tcp:192.98.102.20:5070");
but got errors from that line:
Apr 7 13:52:10 siika /usr/sbin/sip-proxy[22923]: : <core> [proxy.c:278]: ERROR: mk_proxy: could not resolve hostname: "tcp:192.98.102.20:5070"
Apr 7 13:52:10 siika /usr/sbin/sip-proxy[22923]: ERROR: <core> [route.c:1214]: fixing failed (code=-478) at cfg:/etc/sip-proxy/sip-proxy.cfg:1584
i also tried with
forward_tcp("192.98.102.20:5070");
but it didn't help either:
Apr 7 13:54:24 siika /usr/sbin/sip-proxy[23056]: : <core> [proxy.c:278]: ERROR: mk_proxy: could not resolve hostname: "192.98.102.20:5070"
Apr 7 13:54:24 siika /usr/sbin/sip-proxy[23056]: ERROR: <core> [route.c:1214]: fixing failed (code=-478) at cfg:/etc/sip-proxy/sip-proxy.cfg:1584
how should core cookbook be fixed this time?
-- juha
i have seen emails about expired records not removed from database,
but i could not find the thread.
i'm not sure if it is related, but today i noticed too that there is an
old record in my location table which has expired couple of hours ago.
the record does not show up with ul_dump command, so it has been removed
from memory. usrloc db_mode=1.
what could cause the record not be removed? is it a bug in cleaner
process? i have usrloc timer_procs=2.
-- juha
i don't remember seeing this before:
Apr 7 19:09:57 siika /usr/sbin/sip-proxy[8734]: WARNING: textops [textops.c:1816]: free function has not been defined for spve
what should i do about it?
-- juha
i removed corex from loaded modules and added string argument to send:
send("192.98.102.20:5070");
that gave error:
0(15695) ERROR: <core> [cfg.y:3415]: cfg. parser: failed to find command send
0(15695) : <core> [cfg.y:3554]: parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 1578, column 34: unknown command, missing loadmodule?
according to core cookbook:
send
Send the original SIP message to a specific destination in stateless
mode. No changes are applied to received message, no Via header is
added. Host can be an IP or hostname. Used protocol: UDP
Parameter is mandatory and has string format.
Example of usage:
send("10.10.10.10:5070");
does anyone know what is going on?
-- juha
Hi,
I have tried by setting flag only but still no luck,Here is the
configuration i am using.
# sip trace
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "db_url", "")
modparam("siptrace", "duplicate_uri", "sip:homer.com:9060")
modparam("siptrace", "duplicate_with_hep", 1)
modparam("siptrace", "trace_flag", 22)
modparam("siptrace", "trace_on", 1)
#HEPv2 == timestamp will be included to HEP header
modparam("siptrace", "hep_version", 2)
setflag(22);
if (!t_relay()) {
xlog("L_ERR", "CALL $ci - Relay error\n");
sl_reply_error();
exit;
}
Thanks
Ram
looks like forward core function does not accept pseudo var argument.
then i found this:
I just committed a patch that allow using send() without any parameter:
* http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8e4db80…
if that commit is still valid, it is not reflected by core cookbook:
send
Send the original SIP message to a specific destination in stateless
mode. No changes are applied to received message, no Via header is
added. Host can be an IP or hostname. Used protocol: UDP
Parameter is mandatory and has string format.
Example of usage:
send("10.10.10.10:5070");
so which way this is?
-- juha
Sorry if I repeat myself - I just subscribed properly to the list:
> if you don't need to change it back for replies and next requests, try:
>
> $td = "xyz.com";
>
> IIRC, that is available on 3.2.x. If not, either you upgrade or use
> replace functions from textops.
>
> Cheers,
> Daniel
Thank you for replying. We tried the direct assignment of
$td="xyz.com" but the variable doesn't change. We are doing an xlog
print right after and an ngrep and we confirmed that the domain part
of the URI doesn't change. I also tried a subst() and it's the same
problem. I read on the online documentation that the variable is
read-only and I figured it can't be changed through these methods.
That's why I tried uac_replace_to().
To sum it up, is that variable read-only or not ?
hi,
i have set the following flag it is still not capturing outbound SIP
messages.
{
setflag(22)
sip_trace();
}
Daniel-Constantin
Mierla<http://www.mail-archive.com/search?l=sr-users@lists.sip-router.org&q=from:%…>
Fri, 05 Apr 2013 00:45:16
-0700<http://www.mail-archive.com/search?l=sr-users@lists.sip-router.org&q=date:2…>
Hello,
On 3/31/13 4:27 PM, Ramaseshi reddy kolli wrote:
Hi,
I am using sip_trace function after next_branches(), it is not capturing
outbound SIP INVITE request can anyone please help me.
iirc, you have to set a flag to trace outgoing messages. the
sip_trace()function
just takes the snapshot of processed messages.
Cheers,
Daniel