Module: sip-router
Branch: master
Commit: 5e77a1a7216c2ca1697ed8f392b4d4b29aba024d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5e77a1a…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Wed Jan 18 10:23:49 2012 +0000
modules_k/pua: Fix for PUA crash when the DB clean runs if there are lots of records (more than the fetch_rows amount) in the DB
- Fix by Paul Pankhurst @ Crocodile RCS
---
modules_k/pua/pua_db.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules_k/pua/pua_db.c b/modules_k/pua/pua_db.c
index 44c5fbc..d9df1eb 100644
--- a/modules_k/pua/pua_db.c
+++ b/modules_k/pua/pua_db.c
@@ -193,9 +193,7 @@ int clean_puadb( int update_period, int min_expires )
return(-1);
}
- nr_rows = RES_ROW_N(res);
-
- if (nr_rows == 0)
+ if (RES_ROW_N(res) == 0)
{
/* no match */
LM_INFO( "No records matched for clean\n");
@@ -204,6 +202,8 @@ int clean_puadb( int update_period, int min_expires )
}
do {
+ nr_rows = RES_ROW_N(res);
+
/* get the results and update matching entries */
rows = RES_ROWS(res);
Hello,
a new module is now on development branch, named msrp, offering an
embedded MSRP relay. Message Session Relay Protocol is specified by IETF
( core and relay part in RFC4975 and RFC4976), one of typical use cases
is Instant Messaging sessions negotiated via INVITE-200ok-ACK, a
different approach than SIP MESSAGE request.
There is no external dependency, the transport layer from core is reused
to manage TCP/TLS connections used for MSRP. A MSRP relay is pretty much
an independent node, thus you can run Kamailio just to deal with MSRP
traffic. But there is no problem to run Kamailio to handle SIP and MSRP
traffic in the same instance, same or different sockets (it is working
even when SIP/MSRP are sent over the same connection or different
connections to same port).
I couldn't find a reliable and trustable open source SIP phone to test
with it so far (hints are welcome), the module was tested with network
tools and chaining Kamailio instances. Help with testing and feedback is
very appreciated -- I can provide guidelines to adjust the config file
to fit tester's needs, just contact me off list or via IRC channel.
For the moment, the relation (user,session) management is done in the
config, using htable module for example (see the README), it may be
added inside the module for the future to make it easier overall,
although is less than 10 lines of config -- this is mainly for extra
security reasons, to check if the session id matches the connection that
was opened when the session was created, otherwise the user
authentication functionality is done reusing existing functions from
auth module. Another benefit is performances, storing local socket and
connection IP/port saves some time to lookup the connection.
Building MSRP relay on top of SIP server was done first for the benefit
of reusing the transport layer from the core for IPv4/IPv6 and TCP/TLS,
which is mature, scalable and offers asynchronous communication. Besides
that, you have most of the config tools to route SIP requests available
for routing MSRP (authentication, authorization, IP checking,
accounting, a.s.o.).
I made a news post with more details:
* http://www.kamailio.org/w/2012/01/new-module-embedded-msrp-relay/
The readme of the new module is available at:
* http://kamailio.org/docs/modules/devel/modules/msrp.html
Cheers,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.comhttp://linkedin.com/in/miconda -- http://twitter.com/miconda