Hi,
We are customising the kamailio for our use and hence we need to expose some our services API to kamailio (Core + Modules) ..
We have to get variables from Kamailio and also need to pass back some variable values as parameters ...
1- With basic research, it is found that APIs can be registered to be called using Timer built in Kamailio. ? .. (Is this the only way to call functions) ? ..
2- What about calling a function when a specific event occurs in Kamailio ? ..
Any starting point or detailed help in this regards will be appreciated ..
With many thanks.
Regards,
Nasir Bhutta
Hello,
a kind reminder for everyone to add to the wiki page hints for migration
from v3.1.x to v3.2.0. Especially to developers that know what kind of
major changes they did to existing modules in 3.1.x. The wiki is open
for anyone:
* http://sip-router.org/wiki/install/3.1.x-to-3.2.x
I just updated the section related to database structure changes. If you
spot errors/missing parts, go ahead and fix it.
Thanks,
Daniel
--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kathttp://linkedin.com/in/miconda -- http://twitter.com/miconda
Hi,
just short question:
Is there a particular reason, why the sipcapture-module (for the homer
project, not the siptrace module) is not included in the debian
packaging?
I just wondered, i was setting up a capturing node based on Kamailio
3.2 debs and the module is missing...
Thanks in advance,
Carsten
--
Carsten Bock
ng-voice GmbH i. Gr.
Schomburgstr. 80
D-22767 Hamburg / Germany
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Mobile +49 179 2021244
Office +49 40 34927219
Fax +49 40 34927220
Module: sip-router
Branch: master
Commit: 195ab47e1dd5a50d041315ea77eecea9cbeba249
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=195ab47…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat Sep 24 10:49:22 2011 +0200
kamailio.cfg: check if uri is still myself after aliases and speed dial
- new uri can point to other voip domains
- set tcp connection lifetime and max expires registrations to cope with
UA behind NAT using TCP
---
etc/kamailio.cfg | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/etc/kamailio.cfg b/etc/kamailio.cfg
index 342c99a..94a9bc0 100644
--- a/etc/kamailio.cfg
+++ b/etc/kamailio.cfg
@@ -163,6 +163,10 @@ port=5060
enable_tls=yes
#!endif
+# life time of TCP connection when there is no traffic
+# - a bit higher than registration expires to cope with UA behind NAT
+tcp_connection_lifetime=3605
+
####### Custom Parameters #########
# These parameters can be modified runtime via RPC interface
@@ -297,6 +301,8 @@ modparam("registrar", "method_filtering", 1)
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts per AOR */
#modparam("registrar", "max_contacts", 10)
+# max value for expires of registrations
+modparam("registrar", "max_expires", 3600)
# ----- acc params -----
@@ -613,12 +619,14 @@ route[LOCATION] {
#!ifdef WITH_SPEEDIAL
# search for short dialing - 2-digit extension
if($rU=~"^[0-9][0-9]$")
- sd_lookup("speed_dial");
+ if(sd_lookup("speed_dial"))
+ route(SIPOUT);
#!endif
#!ifdef WITH_ALIASDB
# search in DB-based aliases
- alias_db_lookup("dbaliases");
+ if(alias_db_lookup("dbaliases"))
+ route(SIPOUT);
#!endif
$avp(oexten) = $rU;
Module: sip-router
Branch: master
Commit: 5b76dc48d7c49a4f84b4e5a4515676ada2a2aeec
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5b76dc4…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Sep 23 22:08:23 2011 +0200
tmx: $T(reply_type) to solve ambiguity of received or local replies
- it returns 1 in failure route if the reply was local generated (e.g.,
timeout), otherwise is 0. If there is no transaction, it returns null.
- helps to avoid using $T_rpl(pv) in case of local replies, which returns
null for any pv, without it is no way to detect if some pv is null value
itself or the whole reply is not available
---
modules_k/tmx/t_var.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/modules_k/tmx/t_var.c b/modules_k/tmx/t_var.c
index 366afe3..da803f0 100644
--- a/modules_k/tmx/t_var.c
+++ b/modules_k/tmx/t_var.c
@@ -461,11 +461,13 @@ int pv_parse_t_name(pv_spec_p sp, str *in)
case 10:
if(strncmp(in->s, "reply_code", 10)==0)
sp->pvp.pvn.u.isname.name.n = 2;
+ else if(strncmp(in->s, "reply_type", 10)==0)
+ sp->pvp.pvn.u.isname.name.n = 3;
else goto error;
break;
case 12:
if(strncmp(in->s, "branch_index", 12)==0)
- sp->pvp.pvn.u.isname.name.n = 3;
+ sp->pvp.pvn.u.isname.name.n = 4;
else goto error;
break;
default:
@@ -495,7 +497,7 @@ int pv_get_t(struct sip_msg *msg, pv_param_t *param,
{
case 2:
return pv_get_tm_reply_code(msg, param, res);
- case 3:
+ case 4:
return pv_get_tm_branch_idx(msg, param, res);
}
@@ -508,6 +510,14 @@ int pv_get_t(struct sip_msg *msg, pv_param_t *param,
{
case 1:
return pv_get_uintval(msg, param, res, t->hash_index);
+ case 3:
+ if(get_route_type()==FAILURE_ROUTE) {
+ if(_tmx_tmb.t_get_picked_branch()<0 )
+ return pv_get_uintval(msg, param, res, 0);
+ if(t->uac[_tmx_tmb.t_get_picked_branch()].reply==FAKED_REPLY)
+ return pv_get_uintval(msg, param, res, 1);
+ }
+ return pv_get_uintval(msg, param, res, 0);
default:
return pv_get_uintval(msg, param, res, t->label);
}