Hello,
I cannot create a configuration consistent with uac_reg_lookup. Does
someone have a configuration with a simple example of uac_reg_lookup
that works with db_text file uacreg?
I have kamailio 3.3 running on linux. Based on suggestions in
http://kamailio.org/docs/modules/3.3.x/modules_k/uac.html
and
http://by-miconda.blogspot.com/2010/10/best-of-new-in-kamailio-310-10.html
I created this record in db_text file uacreg:
2:12345678:daniel:mysipserver.com:daniel123:sipprovider.com:sipprovider.com:daniel123:xxxxx:"sip:sipprovider.com"
I assume that function uac_reg_lookup retrieves registration information
from this record after it is loaded into a memory table.
One version of the configuration file is attached. Here are three
examples of failures to create a configuration.
$rU = 12345678;
if(uac_reg_lookup("$rU", "$ru")){ #line 73
0(13856) DEBUG: <core> [rvalue.c:2857]: RV fixing type 1
0(13856) DEBUG: <core> [rvalue.c:2861]: RV is int: 12345678
0(13856) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13856) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13856) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:73
---------
$rU = "12345678";
if(uac_reg_lookup("$rU", "$ru")){ #line 73
0(13973) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13973) DEBUG: <core> [rvalue.c:2865]: RV is str: "12345678"
0(13973) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13973) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13973) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:73
--------
$rU = "12345678";
$ru = "sip:mysipserver.com";
if(uac_reg_lookup("$rU", "$ru")){ #line 74
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13976) DEBUG: <core> [rvalue.c:2865]: RV is str: "12345678"
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 2
0(13976) DEBUG: <core> [rvalue.c:2865]: RV is str: "sip:mysipserver.com"
0(13976) DEBUG: <core> [rvalue.c:2857]: RV fixing type 4
0(13976) DEBUG: <core> [route.c:929]: fixing uac_reg_lookup()
0(13976) ERROR: <core> [route.c:1216]: fixing failed (code=-1) at
cfg:/usr/local/etc/kamailio/kamailio.cfg:74
---------------------
regards,
Ron Hopson
That's a very useful feature for updating presence information on behalf
of some clients that do not support presence, or simply crashed.
I will be watching this space for TCP/TLS support :)
Is there any other existing way to achieve this for clients over TCP/TLS?
Cheers,
Yufei
On 20/08/12 09:13, sr-users-request(a)lists.sip-router.org wrote:
> ------------------------------ Message: 5 Date: Mon, 20 Aug 2012
> 10:13:12 +0200 From: "Olle E. Johansson" <oej(a)edvina.net> Subject: Re:
> [SR-Users] [sr-dev] new feature: option to remove contacts based on
> sip nat keepalives To: miconda(a)gmail.com, Development mailing list of
> the sip-router project <sr-dev(a)lists.sip-router.org> Cc: "SIP Router -
> Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing
> List" <sr-users(a)lists.sip-router.org> Message-ID:
> <1CD23BC5-1002-4A6E-B42B-09C73530DB11(a)edvina.net> Content-Type:
> text/plain; charset="us-ascii" 20 aug 2012 kl. 10:06 skrev
> Daniel-Constantin Mierla:
>> > Hello,
>> >
>> > over the weekend I committed the code that allows to remove contacts from location table if the device does not respond to several attempts of SIP nat keepalives (usually OPTIONS requests).
>> >
>> > The feature works only for SIP over UDP, being the only transport for which nathelper module sends keepalives (or sip ping requests as written in some docs).
>> >
>> > Also, the lack of keepalive reply is tracked only for location records stored in memory (so it does not work with db only mode for usrloc). This is because the keepalives are sent stateless, not using tm module, to avoid overloading of timers and shared memory when dealing with large subscriber base -- therefore the implementation is very lightweight in using resources, targeting of course scalability. Detection of replies for keepalives is done based on from tag which carries the internal unique id of the location contact (which is available from v3.3).
>> >
>> > In order to enable this feature you have to set the keepalive_timeout parameter of nathelper module -- that's the only addition you have to add to a config that sends SIP nat keepalives. Internally, the modules store the timestamp of the last SIP keepalive reply (nathelper detects the right reply and calls usrloc API for storing the timestamp in contact structure in memory).
>> >
>> > http://kamailio.org/docs/modules/devel/modules_k/nathelper.html#id2535244
>> >
>> > Before sending a new keepalive to a contact, it is checking if the last keepalive reply is older than keepalive_timeout value and if yes, will lower the expires to 10 seconds (if the expires is higher). There is no special handling of keepalive reply codes, all of them will update the last keepalive timestamp.
>> >
>> > This feature should be useful in mobile networks, to avoid stacking lot of invalid contacts which could result in lot of branches causing many retransmissions.
>> >
>> > There is plant to go for tcp/tls as well and detect when the connection is down, but looks like no spare time in the near future. However, right now using set_forward_no_connect() will avoid trying to create new connections for natted uses whose registration connection is down.
>> >
> On my personal wish list is to have an event route when a registered device becomes unreachable - like a closed TCP connection for a device behind NAT or failure to response to NAT pings.
>
> /O
--
Yufei Tao
Red Embedded
This E-mail and any attachments hereto are strictly confidential and intended solely for the addressee. If you are not the intended addressee please notify the sender by return and delete the message.
You must not disclose, forward or copy this E-mail or attachments to any third party without the prior consent of the sender.
Red Embedded Design, Company Number 06688253 Registered in England: The Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
Hi All
I have installed Kamailio with Siremis, Kamailio is working fine and starts and I have been through the initial setup for Siremis however when i go to login to the web management page it gives an error:
"Error in query:: SELECT T0.id, T0.username, T0.password, T0.enctype,
T0.email, T0.status, T0.lastlogin, T0.lastlogout, T0.create_by,
T0.create_time, T0.update_by, T0.update_time FROM `user` T0 WHERE
T0.username='openser' and status='1' LIMIT 1. SQLSTATE[42S02]: Base
table or view not found: 1146 Table 'siremis.user' doesn't exist"
I have tried the default "admin/admin" login as mentioned in the install guide and have also tried the default passwords for Kamailio "openser - (with default password 'openserrw') and openserro - (with default password 'openserro'). I have also tried root/*password* and also siremis/siremis which is contained in the /var/www/siremis-3.2.1/siremis/config.xml however none were successful and the same error appeared. I read that it was a permissions error however have set directory /var/www/siremis-3.2.1 to chmod 777 including all sub dirs and files.
Can anyone please help as this is that last bit that I need to overcome :)
Many thanks and best regards.
Dave
Hello,
over the weekend I committed the code that allows to remove contacts
from location table if the device does not respond to several attempts
of SIP nat keepalives (usually OPTIONS requests).
The feature works only for SIP over UDP, being the only transport for
which nathelper module sends keepalives (or sip ping requests as written
in some docs).
Also, the lack of keepalive reply is tracked only for location records
stored in memory (so it does not work with db only mode for usrloc).
This is because the keepalives are sent stateless, not using tm module,
to avoid overloading of timers and shared memory when dealing with large
subscriber base -- therefore the implementation is very lightweight in
using resources, targeting of course scalability. Detection of replies
for keepalives is done based on from tag which carries the internal
unique id of the location contact (which is available from v3.3).
In order to enable this feature you have to set the keepalive_timeout
parameter of nathelper module -- that's the only addition you have to
add to a config that sends SIP nat keepalives. Internally, the modules
store the timestamp of the last SIP keepalive reply (nathelper detects
the right reply and calls usrloc API for storing the timestamp in
contact structure in memory).
http://kamailio.org/docs/modules/devel/modules_k/nathelper.html#id2535244
Before sending a new keepalive to a contact, it is checking if the last
keepalive reply is older than keepalive_timeout value and if yes, will
lower the expires to 10 seconds (if the expires is higher). There is no
special handling of keepalive reply codes, all of them will update the
last keepalive timestamp.
This feature should be useful in mobile networks, to avoid stacking lot
of invalid contacts which could result in lot of branches causing many
retransmissions.
There is plant to go for tcp/tls as well and detect when the connection
is down, but looks like no spare time in the near future. However, right
now using set_forward_no_connect() will avoid trying to create new
connections for natted uses whose registration connection is down.
Testing and feedback will be welcome.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - http://asipto.com/u/kpw
OK,
I understan the AVP's are per transaction.
How can I save info from the invite and use it on the bye? $sht(...)?
$dlg(flag), $dlg(set) ?
Thanks,
Uri
> juha writes
>it is not strange reason, since avps are transaction specific and bye
>does not belong to the same transaction as invite.
> juha
>>Uri Shacked writes:
>* >I am trying to use an AVP the I set on the INVITE when I recieve the
BYE.*
*> *>* for some strange reason, the AVP is NULL when I test it. *
Hi All,
I'm considering running Kamailio as a virtual machine, with such low
utilization, it doesn't seem to make sense to keep running it on a physical
host server.
I've been virtualizing Asterisk PBX's for years and run a host of other
virtualized servers with OpenVZ, VMware and MS V-Server without issues.
I'd like any opinions or thoughts about pitfalls or caveats I should be
aware of specific to virtualized SIP-Router/Kamailio.
Thanks in advanced.
JR
Hello guys,
Why I can only append_branch() a SIP URI as a literal constant string? Why
not from a pseudovariable? It's the same for most of the core functions.
My intention is to do something like this:
append_branch("$cnx3a(route1)");
t_relay();
where cnx3a is a variable containing the SIP URIs.
The only "fix" I have found for this is by doing it as follows:
$ru = $cnx3a(route1);
append_branch();
t_relay();
Is there any other (and more elegant) way?
Regards.
Carlos.
Hi all,
I am sort of a new comer to kamailio and I have a config in which Kamailio
listens on different IPs that correspond to SSH VPN tunnels. The config
handles a MULTIDOMAIN scenario with FreeSWITCH as multi tenant media server.
The situation I am facing is that when a REGISTERED user calls in through
one of the SSH tunnels to the corresponding listening IP, Kamailio does not
seem to source the INVITE that goes to FreeSWITCH from that IP since on FS
I use "destination_field=network_addr" to try to apply different dialplan
rules per domain and I see the call on FS matching a non corresponding dial
plan entry sourced with an IP of a different SSH tunnel.
Do I have any other option to send the call to FS using some other field to
match to my convenience?
I hope the description is clear enough, otherwise I could elaborate if
required.
Your input is highly appreciated.
Regards,
Luis
--
O: 4000-1020
C: 6040-3624