added param sip_uri_match
0 - case sensitive (default)
1 - case insensitive
can be extended to a more compliant version, (sensitive user, insensitive domain).
the parameter sets the function to call to match uris.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/94
-- Commit Summary --
* presence - match sip uris using alternative function
-- File Changes --
M modules/presence/hash.c (4)
M modules/presence/notify.c (10)
M modules/presence/presence.c (45)
M modules/presence/presence.h (3)
M modules/presence/presentity.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/94.patchhttps://github.com/kamailio/kamailio/pull/94.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94
Module: kamailio
Branch: master
Commit: 7ba770ca43485531eef4ad4ccbefe046d8fb2223
URL: https://github.com/kamailio/kamailio/commit/7ba770ca43485531eef4ad4ccbefe04…
Author: Luis Azedo <luis(a)2600hz.com>
Committer: Luis Azedo <luis(a)2600hz.com>
Date: 2015-03-25T11:21:21Z
registrar : add optional params to registered function
3rd parameter as flag is used to optionally restrict contacts when searching.
values are
1 - match_callid
2 - match_received
3 - match_contact
4th parameter as flag to optionally perform action on positive match
values are
1 - set xavp_rcd with value from matched contact
---
Modified: modules/registrar/doc/registrar_admin.xml
Modified: modules/registrar/lookup.c
Modified: modules/registrar/lookup.h
Modified: modules/registrar/reg_mod.c
Modified: modules/registrar/reg_mod.h
---
Diff: https://github.com/kamailio/kamailio/commit/7ba770ca43485531eef4ad4ccbefe04…
Patch: https://github.com/kamailio/kamailio/commit/7ba770ca43485531eef4ad4ccbefe04…
3rd parameter as flag is used to optionally restrict contacts when searching.
values are
1 - match_callid
2 - match_received
3 - match_contact
4th parameter as flag to optionally perform action on positive match
values are
1 - set xavp_rcd with value from matched contact
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/115
-- Commit Summary --
* registrar : add optional params to registered function
-- File Changes --
M modules/registrar/doc/registrar_admin.xml (43)
M modules/registrar/lookup.c (74)
M modules/registrar/lookup.h (3)
M modules/registrar/reg_mod.c (85)
M modules/registrar/reg_mod.h (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/115.patchhttps://github.com/kamailio/kamailio/pull/115.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/115
Hello. I try to do my own dispatcher with redis db. I have problem with disconnecting module wrom redis. Redis server is remote microsoft public server. This good solution for many companies and it works stable
THe FIrst Isuue I saw when used
modparam("ndb_redis", "server", "name=srv1;addr=non_local_serv;port=6379;db=4;pass=mypass")
[TOASTERISK]
redis_cmd("srv1", "EXISTS $si", "s");
xlog("L_INFO","ASTERISK with ip $si is {$redis(s=>value)}");
$var(setid)=0;
if ($redis(s=>value) == 0) {
xlog("L_INFO","Request {$rm} from $si != {$var(dest)} It means call NOT from ASTRISK");
}
And when this call begins I get <null> s value. But If I EXISTS it from redis comsole there is successfull reply.
Sometimes I see this at kamailio log
redisc_exec(): Redis error: Server closed the connection
I tried MONITOR redis from cli, but nothing happends when disconnect. (nothing means -nothing at the cli)
So I tried one more thing:
I have some pools of requests
1. When options recieved to kam from asterisk
if (is_method("OPTIONS"))
{
if ($sp == 50600) {
redis_cmd("srv1", "AUTH mylonglongpass"","r")
redis_cmd("srv1", "SET $si $TS", "r");
redis_cmd("srv1", "EXPIRE $si 20", "r");
}
}
It works fine (Intresting that this works fine with the PASS through modparam key too)
Second pool when KAmailio choose ASTERISK to send INVITE from redis
#DISPATCHER_NEW
#$setid - is another var that gets from sql db.
$var(priority)=1;
redis_cmd("srv1", "AUTH mylonglongpass", "p");
while ($redis(b=>value) == 0)
{
xlog("L_INFO","{$rm} priority now is $var(priority) and setid $var(setid)\n");
redis_cmd("srv1", "EXISTS $var(setid):$var(priority)", "e");
xlog("L_INFO","ASTERISK with customer $var(setid) and priority $var(priority) id {$redis(e=>value)} (if 1 - exists, 0 - not exisits)");
## Regis correctly get reply always
if ($redis(e=>value) == 1)
{
redis_cmd("srv1", "GET $var(setid):$var(priority)", "a");
#get IP of asterisk. Always get right value too
xlog("L_INFO","ASTERISK with customer $var(setid) and priority $var(priority) is {$redis(a=>value)} (if 0 - not exisits)");
redis_cmd("srv1", "GET $redis(a=>value)", "b"); #check timestamp that set at redis OPTION request
## There are I have truble when use AUTH command because redis return <null> after GET. If i do GET from cli - all ok.
xlog("L_INFO","ASTERISK with customer $var(setid) and priority $var(priority) have timestamp {$redis(b=>value)} (if null - no timestamp. This means it down. Get new asterisk)");
if ($redis(b=>value) == 1){
$du="sip:"+$redis(a=>value)+":50600";
}
else{
$var(priority)=$var(priority)+1;
}
}
Offcource I checked all parameteres - database name and another connection attrs of modparam
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/108
Hi Team,
Recently we upgraded our kamailo server to 4.2.1 and it was running successfuly with out any issue. We are seeing some issue with the TCP calls which are relayed from the kamilio.
We have set of physical servers and the calls are distributed by checking the dispacther module. Sometimes we are seeing the TCP packets are malformed from kamilio to one server. We can see the UDP calls are working fine with the same server at the same time TCP packets are malformed. That means there is no issue with the network connectivity between the kamailio server and our media server. Once we restart the kamilio we are not seeing this issue and the TCP calls will start working with kamilio and media server.
Can you help us to answer these questions.
1. Any idea about this TCP packet malformed error ?. We were not able to reproduce this TCP packet issue and we are seeing this error in our production environment.
2. Sometimes we have some errors for TCP max conn (ERROR) : 2048 (the default). We are plannig to increase the TCP connection to 4096 (tcp_max_connections=4096). Whether it will create any issue if we are increasing to 4096 or it will affect kamailio performance ?.
Thanks for looking in to this.
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/51
Module: kamailio
Branch: master
Commit: 07fee9b2a24236aca9fd134a1e0c3748e643b8a8
URL: https://github.com/kamailio/kamailio/commit/07fee9b2a24236aca9fd134a1e0c374…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-03-26T21:19:49+01:00
presence: documente new parameters xavp_cfg and retrieve_order
---
Modified: modules/presence/doc/presence_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/07fee9b2a24236aca9fd134a1e0c374…
Patch: https://github.com/kamailio/kamailio/commit/07fee9b2a24236aca9fd134a1e0c374…
---
diff --git a/modules/presence/doc/presence_admin.xml b/modules/presence/doc/presence_admin.xml
index f2d249f..f3f9ea4 100644
--- a/modules/presence/doc/presence_admin.xml
+++ b/modules/presence/doc/presence_admin.xml
@@ -698,6 +698,63 @@ modparam("presence", "subs_remove_match", 1)
</programlisting>
</example>
</section>
+ <section id="presence.p.xavp_cfg">
+ <title><varname>xavp_cfg</varname> (str)</title>
+ <para>
+ The name of the xavp to be used to specify attributes for internal
+ processing of presence module.
+ </para>
+ <para>
+ Inner attributes inside xavp can be:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para><emphasis>priority</emphasis> - integer value to set the
+ priority of the presence document (higher value, higher priority).
+ It can set the order of the aggregated presence documents sent by
+ NOTIFY (first the document with higher priority). If xavp_cfg
+ parameter is set but this attribute is not in the avp,
+ the priority of the presence document is based on timestamp,
+ so newer documents have higher priority.</para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Default value is <emphasis>empty</emphasis> (not set).
+ </para>
+ <example>
+ <title>Set <varname>xavp_cfg</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("presence", "xavp_cfg", "pres")
+...
+if(is_method("PUBLISH")) {
+ $xavp(pres=>priority) = 100;
+}
+...
+</programlisting>
+ </example>
+ </section>
+
+ <section id="presence.p.retrieve_order">
+ <title><varname>retrieve_order</varname> (int)</title>
+ <para>
+ If set to 0, presentity records are retrieve by received_time order.
+ if set to 1, presentity records are retrieve by priority order.
+ </para>
+ <para>
+ <emphasis>
+ Default value is 0.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>retrieve_order</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("presence", "retrieve_order", 1)
+...
+</programlisting>
+ </example>
+ </section>
</section>