Module: sip-router
Branch: master
Commit: ae232eca582e48f93b5a7145b52b12ce484b47ad
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ae232ec…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Sun Mar 15 21:17:30 2009 +0100
Kamailio compatibility: Parse and store integer message id in cseq.
This patch modifies the CSeq header field parser. The new version of
the parser will also parse the method string and store an integer id
of the method string in the data structure representing cseq header
fields.
---
parser/parse_cseq.c | 7 +++++++
parser/parse_cseq.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/parser/parse_cseq.c b/parser/parse_cseq.c
index e3c1656..23dbf42 100644
--- a/parser/parse_cseq.c
+++ b/parser/parse_cseq.c
@@ -36,6 +36,7 @@
#include "parser_f.h" /* eat_space_end and so on */
#include "../dprint.h"
#include "parse_def.h"
+#include "parse_methods.h"
#include "../mem/mem.h"
/*
@@ -72,6 +73,12 @@ char* parse_cseq(char *buf, char* end, struct cseq_body* cb)
t=m_end;
cb->method.len=t-cb->method.s;
+ /* Cache method id */
+ if (parse_method(&cb->method, &cb->method_id) == 0) {
+ LOG(L_ERR, "ERROR: parse_cseq: Cannot parse method string\n");
+ goto error;
+ }
+
/* there may be trailing LWS
* (it was not my idea to put it in SIP; -jiri )
*/
diff --git a/parser/parse_cseq.h b/parser/parse_cseq.h
index 2b1794e..4779e11 100644
--- a/parser/parse_cseq.h
+++ b/parser/parse_cseq.h
@@ -36,6 +36,7 @@ struct cseq_body{
int error; /* Error code */
str number; /* CSeq number */
str method; /* Associated method */
+ unsigned int method_id; /* Associated method ID */
};
In sr core, sip_resolvehost is pointing to dns_sip_resolvehost:
resolve.h:#define sip_resolvehost dns_sip_resolvehost
but in k core, sip_resolvehost is a standalone method.
This is creating issues due to different signatures for the two methods:
k core:
struct hostent* sip_resolvehost(str* name, unsigned short* port,
unsigned short *proto, int is_sips, struct dns_node **dn);
sr core:
struct hostent* dns_sip_resolvehost(str* name, unsigned short* port,
char* proto);
Modules affected by this:
- enum
- nat_traversal
- nathelper
Regards,
Ovidiu Sas
search_next_avp() has a different signature in sr core compared to k core.
k variant:
struct usr_avp *search_next_avp( struct usr_avp *avp, int_str *val );
sr variant:
avp_t *search_next_avp(struct search_state* state, avp_value_t *val);
This will most likely cause problem for the following modules:
- acc
- avpops
- osp
- siptrace
Regards,
Ovidiu Sas
Hi all,
i just added a new module to the repository - 'memcached'. Its allows to
connect to a memcached server, and supports add, get, delete and atomic
operations via pseudo-variables.
Further details can be found in the module documentation:
http://kamailio.org/docs/modules/devel/memcached.html
If the pv module is imported into the sip-router it should be also work there,
i'll migrate the module then to this tree.
Best regards,
Henning Westerholt
Hello,
just wondering if it is time to create a sr-users mailing list where to
attract the testers in the first phase and continue with the community
when we release first version.
sr-dev is too technical for non-programmers and has lot of commits
traffic in this phase.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com