Module: sip-router
Branch: master
Commit: 6e729562274f7b5ec5230a7df2764f36ddb0f39f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6e72956…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Jun 11 21:02:47 2009 +0300
presence_xml: implementation of pv $xml(...)
- handling of xml docs using xpath
- $xml(name=>doc) - get/set an xml doc under 'name'
- $xml(name=>xpath:xpath-expression) - evaluate/update xpath extension
- example:
$xml(x=>doc) = '<?xml version="1.0" encoding="UTF-8"?><a><b>test</b></a>';
xlog("content of node b: $xml(a=>xpath:/a/b/text())\n");
$xml(a=>xpath:/a/b) = "1234";
- TODO list:
- extend presence modules to work also with xml documents from $xml() PV
- support to set node content to an xml tree
- usage:
- do routing decisions based on content of xml documents comming
with SIP messages (such as PUBLISH)
- update xml document content
- evaluate XPath-allowed expressions and functions, see:
http://www.w3.org/TR/xpath
---
modules_k/presence_xml/pv_xml.c | 463 +++++++++++++++++++++++++++++++++++++++
modules_k/presence_xml/pv_xml.h | 35 +++
2 files changed, 498 insertions(+), 0 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=6e7…
Module: sip-router
Branch: master
Commit: 09b7b0b356153335bcbb17220397f2a20801d4a2
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=09b7b0b…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Miklos Tirpak <miklos(a)iptel.org>
Date: Thu Jun 11 16:53:59 2009 +0200
tm: callbacks: obsolate description is removed.
The description about the callback insertion was
confusing because no locking is necessary to insert
new callbacks.
---
modules/tm/t_hooks.h | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/modules/tm/t_hooks.h b/modules/tm/t_hooks.h
index 48b0d59..998ace1 100644
--- a/modules/tm/t_hooks.h
+++ b/modules/tm/t_hooks.h
@@ -146,21 +146,13 @@ struct cell;
* incomplete -- this callback is called in very early stage
* before the message is shmem-ized (so that you can work
* with it).
- * It's safe to install other TMCB callbacks from here.
* Note: this callback MUST be installed before forking
* (the req_in_tmcb_hl callback list does not live in shmem and has no access
* protection), i.e., at best from mod_init functions.
*
- * Note: all the other callbacks MUST be installed before or immediately after
- * the transaction is created (they must not be installed from any place
- * where the transaction callbacks can be run or added simultaneously with
- * the add operation). Another safe way of installing them is to hold the
- * REPLY lock prior to adding a callback.
- * In general it's not safe to register callbacks from other TMCB callbacks,
- * unless the contrary is explicitly stated in the TMCB callback description.
- * For example a good place for installing them is from a TMCB_REQUEST_IN
- * callback.
- *
+ * Note: All the other callbacks can be safely installed when the
+ * transaction already exists, it does not need to be locked.
+ *
* TMCB_RESPONSE_IN -- a brand-new reply was received which matches
* an existing non-local transaction. It may or may not be a retransmission.
* No lock is held here (yet).
what was the status regarding kamctl equivalent for sr? should i add a
task about it or is it already done?
at minimum i would need a script that i can use to give fifo commands to
sr.
actually, i do have a script that does that and only that. should i add
it to scripts dir until someone comes up with something better?
-- juha
in kamailio there was mi command debug that i could use to alter debug
level dynamically.
how can i now achieve the same in sr via mi fifo interface?
-- juha
now that db issues have been solved, i tried make a call. twinkle user
test called twinkle user jh, but before jh answered, test canceled the
call. i got to syslog:
Jun 11 13:03:31 localhost /usr/sbin/sip-router[1727]: INFO: INVITE <sip:jh@test.fi> by <test(a)test.fi> as <sip:test@test.fi> from <192.98.101.10> is authorized
Jun 11 13:03:31 localhost /usr/sbin/sip-router[1727]: INFO: Routing first INVITE to <sip:jh_test_fi@192.98.101.10:5074;transport=udp> and <<null>>
Jun 11 13:03:33 localhost /usr/sbin/sip-router[1726]: INFO: Relaying CANCEL to <sip:jh@test.fi>
Jun 11 13:03:33 localhost /usr/sbin/sip-router[1727]: INFO: Routing in-dialog ACK from <sip:test@test.fi> to <sip:jh@test.fi>
Jun 11 13:03:33 localhost /usr/sbin/sip-router[1727]: WARNING: tm [t_lookup.c:1499]: WARNING: script writer didn't release transaction
Jun 11 13:03:33 localhost /usr/sbin/sip-router[1727]: NOTICE: Discarding unmatched ACK <sip:jh@test.fi>
with same config file, kamailio doesn't give the warning about not
releasing transaction nor notice about unmatched cancel.
notice comes from this:
# Relay CANCEL without further processing
if (is_method("CANCEL")) {
if (!t_check_trans()) {
xlog("L_NOTICE", "Discarding unmatched CANCEL to <$ru>\n");
exit;
};
why is cancel not matched? in case mailing list accepts attachments,
wireshark dump (which looks good to me), is enclosed.
-- juha
I compile and install with:
# make prefix=/ mandir=/usr/local/man cfg_dir=/etc/sip-router install
then I run:
# ser
and got:
ERROR: loading config file(/usr/local/etc/ser/ser.cfg): No such file or
directory
The ERROR message is expected (there is no /usr/local/etc/ser directory
at all), but why is sip-router (ser) trying to find configuration file
on the default directory if I explicitly compile it pointing to another
one? From what I looked on Makefile.defs the config directory is gived
by the "cfg_dir" variable... "prefix" is honor, since "ser" binary is
installed correctly:
# which ser
/sbin/ser
Edson.