While writing the previous mail I realized I could use the back door and sneak into good old deprecated mi from the rpc interface.
Now I'm getting a list with basically a bunch of parseable strings embedded in XML. Which works for me.
Not the best way as seen from an XML standpoint, but still something that works (TM)!
Have a great Kamailio weekend!
/O
HTTP/1.0 200 OK
Content-Length: 714
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><array><data>
<value><string>SET_NO:: 2</string></value>
<value><string>SET:: 1</string></value>
<value><string>URI:: sip:pstn1.astritech.org;transport=udp2 flags=AX priority=0 attrs=</string></value>
<value><string>URI:: sip:pstn2.astritech.org;transport=udp flags=AX priority=0 attrs=</string></value>
<value><string>SET:: 2</string></value>
<value><string>URI:: sip:127.0.0.1:5080 flags=AX priority=200 attrs=</string></value>
<value><string>URI:: sip:127.0.0.1:5084 flags=AX priority=50 attrs=</string></value>
<value><string>URI:: sip:127.0.0.1:5082 flags=IX priority=10 attrs=</string></value>
</data></array></value>
</param>
</params>
</methodResponse>
Hello,
we would like to use functions like: set_deny_filter, set_accept_filter
in uac_redirect module but using a pseudo variable as input parameter.
I think on several approaches:
a) editing setf_fixup function, and use a trick like: if first character
is '$' and second is different from '$', we know it is a variable.
If first character is not '$' then it is a regular expression still not
compiled.
If first two characters are '$$' then it means a regular expression and
escapes '$' character.
b) create two new functions which accept variables. e.g:
set_accept_filter_v and set_deny_filter_v
The goal is to accept or deny depending on incoming provider.
If speed performance penalty would be too high, may be using a hash
table of precompiled regular expressions would be a good idea?
Which approach do you recommend me from the community point of view?
Regards,
Vicente.
Module: sip-router
Branch: master
Commit: c1fd259a2c77cc95d4f48ca72ca3c91485f65ede
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c1fd259…
Author: Jon Bonilla <manwe(a)aholab.ehu.es>
Committer: Jon Bonilla <manwe(a)aholab.ehu.es>
Date: Fri Jun 8 11:10:23 2012 +0200
pkg/deb Add lua to wheezy builds
Lua is back to wheezy thanks to Juha and Daniel
---
pkg/kamailio/deb/wheezy/control | 22 +++++++++++-----------
pkg/kamailio/deb/wheezy/rules | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/pkg/kamailio/deb/wheezy/control b/pkg/kamailio/deb/wheezy/control
index fe58d04..a5a3c73 100644
--- a/pkg/kamailio/deb/wheezy/control
+++ b/pkg/kamailio/deb/wheezy/control
@@ -2,7 +2,7 @@ Source: kamailio
Section: net
Priority: optional
Maintainer: Jon Bonilla <manwe(a)aholab.ehu.es>
-Build-Depends: debhelper (>= 5), dpatch, libmysqlclient-dev, libexpat1-dev, libxml2-dev, libpq-dev, libradiusclient-ng-dev, flex, bison, zlib1g-dev, unixodbc-dev, libxmlrpc-c3-dev, libperl-dev, libsnmp-dev, dpkg-dev (>= 1.13.19), libdb-dev (>= 4.6.19), xsltproc, libconfuse-dev, libldap2-dev, libssl-dev, libcurl3-openssl-dev, python, libpcre3-dev, docbook-xml, libmemcache-dev, libreadline-dev, python-dev, libsasl2-dev, libgeoip-dev (>= 1.4.5), libsqlite3-dev, libjson0-dev, libevent-dev, libncurses5-dev, libhiredis-dev (>= 0.10.0), libmono-2.0-dev
+Build-Depends: debhelper (>= 5), dpatch, libmysqlclient-dev, libexpat1-dev, libxml2-dev, libpq-dev, libradiusclient-ng-dev, flex, bison, zlib1g-dev, unixodbc-dev, libxmlrpc-c3-dev, libperl-dev, libsnmp-dev, dpkg-dev (>= 1.13.19), libdb-dev (>= 4.6.19), xsltproc, libconfuse-dev, libldap2-dev, libssl-dev, libcurl3-openssl-dev, python, libpcre3-dev, docbook-xml, libmemcache-dev, libreadline-dev, python-dev, libsasl2-dev, libgeoip-dev (>= 1.4.5), libsqlite3-dev, libjson0-dev, libevent-dev, libncurses5-dev, libhiredis-dev (>= 0.10.0), libmono-2.0-dev, liblua5.1-0-dev
Standards-Version: 3.8.0
Homepage: http://www.kamailio.org/
@@ -235,16 +235,16 @@ Description: contains the TLS kamailio transport module
This has been split out of the main kamailio package, so that kamailio will not
depend on openssl. This module will enable you to use the TLS transport.
-#Package: kamailio-lua-modules
-#Architecture: any
-#Depends: ${shlibs:Depends}, kamailio (= ${Source-Version})
-#Description: contains the app_lua module
-# Kamailio is a very fast and flexible SIP (RFC3261)
-# proxy server. Written entirely in C, Kamailio can handle thousands calls
-# per second even on low-budget hardware.
-# .
-# This package provides the app_lua module, an extension allowing to
-# execute embedded Lua applications within configuration file.
+Package: kamailio-lua-modules
+Architecture: any
+Depends: ${shlibs:Depends}, kamailio (= ${Source-Version})
+Description: contains the app_lua module
+ Kamailio is a very fast and flexible SIP (RFC3261)
+ proxy server. Written entirely in C, Kamailio can handle thousands calls
+ per second even on low-budget hardware.
+ .
+ This package provides the app_lua module, an extension allowing to
+ execute embedded Lua applications within configuration file.
Package: kamailio-mono-modules
Architecture: any
diff --git a/pkg/kamailio/deb/wheezy/rules b/pkg/kamailio/deb/wheezy/rules
index e1da5be..39d7802 100755
--- a/pkg/kamailio/deb/wheezy/rules
+++ b/pkg/kamailio/deb/wheezy/rules
@@ -41,7 +41,7 @@ MODULES_SP=
# Note: the order is important (should be in dependency order, the one
# on which other depend first)
PACKAGE_GROUPS=mysql postgres berkeley unixodbc radius presence \
- ldap xml perl utils memcached tls \
+ ldap xml perl utils lua memcached tls \
snmpstats carrierroute xmpp cpl redis python geoip\
sqlite json mono
further comments from mailtainers of debian lua packages:
The simplest workaround is to call it (pkg-config) this way:
pkg-config --cflags lua5.1 | sed -e "s/\\\\/'/" -e "s/\\\\\"/\"'/"
But the best would be to make the authors of these makefiles aware that
something like -DFOO=\"bar\" is a valid flag for gcc and their makefiles
should be able to deal with it. I've already pointed out the place that
needs fixing.
which was this:
quote:= "
escall= $(subst $$,\$$,$(subst $(quote),\$(quote),$1))
exec_cmd= $(if $($(quiet)_cmd_$(1)),\
@echo "$(call escall,$($(quiet)_cmd_$(1)))" ;)
$(cmd_$(1))
-- juha
i have this piece of config code:
if (is_gruu()) {
xlog("L_INFO", "Request-URI <$ru> IS gruu\n");
} else {
xlog("L_INFO", "Request-URI <$ru> is NOT gruu\n");
}
and i get this to syslog:
May 28 17:53:07 siika /usr/sbin/sip-proxy[8926]: INFO: Request-URI <sip:jh@test.fi;gr=urn:uuid:f462ab09-88fe-43c6-9c9c-cb570ce6bb99> is NOT gruu
is this a bug or have i misunderstood something?
-- juha
4.24. is_gruu([uri])
The function returns true if the uri is GRUU ('gr' parameter is
present): 1 - pub-gruu; 2 - temp-gruu.
Meaning of the parameters is as follows:
uri - the SIP URI to check for GRUU parameter. It is optional, when
missing, the value of R-URI is used.
maintainers of debian lua package told that loop occurs because Makefile
cannot parse
-DDEB_HOST_MULTIARCH=\"x86_64-linux-gnu\" -I/usr/include/lua5.1
returned by pkg-config --cflags lua5.1.
they say that this part of Makefile gets puzzled by the above:
quote:= "
escall= $(subst $$,\$$,$(subst $(quote),\$(quote),$1))
exec_cmd= $(if $($(quiet)_cmd_$(1)),\
@echo "$(call escall,$($(quiet)_cmd_$(1)))" ;)
$(cmd_$(1))
-- juha