[sr-dev] [kamailio] wrong determination of udp/tcp request (#11)

2014-12-20 Thread lazedo
Hi,

i noticed a weird behavior in 4.2 branch with this kamailio.cfg (snippet)

#!substdef !UDP_SIP!udp:MY_IP_ADDRESS:5060!g
#!substdef !TCP_SIP!tcp:MY_IP_ADDRESS:5060!g
listen=UDP_SIP
listen=TCP_SIP

### Routing Logic 
route
{
# log the basic info regarding this call
xlog(L_INFO, $ci|start|recieved $oP request $rm $ou);
 .
}

when clients using TCP send a SUBSCRIBE we get log info that it is a UDP 
operation.
when we send the first notify we get tcp errors.
for reference, i'm using Bria 4 in testing.


Dec 20 16:49:29 kamailio-05 kamailio[5085]: INFO: script: 
YzYwYWVlOTFiMGU0YmNjM2IyMDA1NmQ4NjdiMGEwZDY|start|recieved UDP request 
SUBSCRIBE sip:2...@sip.com
Dec 20 16:49:29 kamailio-05 kamailio[5072]: INFO: script: received dialog 
update for sip:2...@sip.com
Dec 20 16:49:29 kamailio-05 kamailio[5072]: INFO: presence [notify.c:1604]: 
send_notify_request(): NOTIFY sip:user_7z7...@sip.com via 
sip:user_7z7b6s@192.168.16.12:62285;transpop on behalf of sip:2...@sip.com for 
event dialog
Dec 20 16:49:29 kamailio-05 kamailio[5072]: CRITICAL: core [pass_fd.c:157]: 
send_all(): send on 0 failed: Socket operation on non-socket
Dec 20 16:49:29 kamailio-05 kamailio[5072]: ERROR: core [tcp_main.c:2303]: 
tcpconn_send_put(): failed to get fd(write):Socket operation on non-socket (88)
Dec 20 16:49:29 kamailio-05 kamailio[5072]: ERROR: tm [../../forward.h:227]: 
msg_send(): tcp_send failed
Dec 20 16:49:29 kamailio-05 kamailio[5072]: ERROR: tm [uac.c:598]: 
send_prepared_request_impl(): t_uac: Attempt to send to precreated request 
failed



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] wrong determination of udp/tcp request (#11)

2014-12-20 Thread lazedo
the same thing happens with TLS connections.

one side effect is that the subscription doesn't get updated to active and gets 
cleaned by timer proc.

Dec 20 18:20:32 kamailio-05 kamailio[6089]: INFO: script: received dialog 
update for sip:2...@sip.com
Dec 20 18:20:32 kamailio-05 kamailio[6089]: CRITICAL: core [pass_fd.c:157]: 
send_all(): send on 0 failed: Socket operation on non-socket
Dec 20 18:20:32 kamailio-05 kamailio[6089]: ERROR: core [tcp_main.c:2303]: 
tcpconn_send_put(): failed to get fd(write):Socket operation on non-socket (88)
Dec 20 18:20:32 kamailio-05 kamailio[6089]: ERROR: tm [../../forward.h:247]: 
msg_send(): tcp_send failed
Dec 20 18:20:32 kamailio-05 kamailio[6089]: ERROR: tm [uac.c:598]: 
send_prepared_request_impl(): t_uac: Attempt to send to precreated request 
failed
Dec 20 18:20:32 kamailio-05 kamailio[6089]: INFO: presence [notify.c:1604]: 
send_notify_request(): NOTIFY sip:user_7z7...@sip.com via 
sip:user_7z7b6s@192.168.16.12:15778;transport=tls on behalf of sip:2...@sip.com 
for event dialog



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#issuecomment-67744870___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] wrong determination of udp/tcp request (#11)

2014-12-22 Thread lazedo
thanks about the $pr.
the error is in the message (it doesn't show but if you try to edit you'll see 
it).

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#issuecomment-67898110___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] issue notifying subscribers with transport tcp/tls (#11)

2014-12-22 Thread lazedo
http://pastie.org/9795032


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#issuecomment-67902003___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:lazedo/4.2.1:57f58f90: kazoo : fork process with tcp option

2014-12-22 Thread lazedo
Module: kamailio
Branch: lazedo/4.2.1
Commit: 57f58f903fae47e30e6cb165db05710394cc9738
URL: 
https://github.com/kamailio/kamailio/commit/57f58f903fae47e30e6cb165db05710394cc9738

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2014-12-23T00:56:56Z

kazoo : fork process with tcp option

---

Modified: modules/kazoo/kazoo.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/57f58f903fae47e30e6cb165db05710394cc9738.diff
Patch: 
https://github.com/kamailio/kamailio/commit/57f58f903fae47e30e6cb165db05710394cc9738.patch

---

diff --git a/modules/kazoo/kazoo.c b/modules/kazoo/kazoo.c
index 42eafd8..e41a690 100644
--- a/modules/kazoo/kazoo.c
+++ b/modules/kazoo/kazoo.c
@@ -295,11 +295,11 @@ static int mod_child_init(int rank)
if (pid0)
return -1; /* error */
if(pid==0){
-   kz_amqp_manager_loop(0);
+   kz_amqp_manager_loop(1);
}
else {
for(i=0; i  dbk_consumer_processes; i++) {
-   pid=fork_process(i+2, AMQP Consumer, 0);
+   pid=fork_process(i+2, AMQP Consumer, 1);
if (pid0)
return -1; /* error */
if(pid==0){


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] issue notifying subscribers with transport tcp/tls (#11)

2014-12-23 Thread lazedo
Hi Daniel,

what about when there isn't a subscribe dialog ? or does the SUBSCRIBE keep
a reference to the dialog ? in this case the NOTIFY is sent when other
extension is ringing (BLF).

thanks

On Tue, Dec 23, 2014 at 9:07 AM, Daniel-Constantin Mierla 
notificati...@github.com wrote:

 Yes, you have to set last parameter to 1 for fork_process().

 t_request_within() sends a request within an existing dialog (subscribe
 dialog in this case).

 —
 Reply to this email directly or view it on GitHub
 https://github.com/kamailio/kamailio/issues/11#issuecomment-67932864.


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#issuecomment-67940050___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:lazedo/4.2.1:9b655b6c: correction

2014-12-23 Thread lazedo
Module: kamailio
Branch: lazedo/4.2.1
Commit: 9b655b6cbdc6cebadac806c56d214833466caf4f
URL: 
https://github.com/kamailio/kamailio/commit/9b655b6cbdc6cebadac806c56d214833466caf4f

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2014-12-23T11:44:24Z

correction

---

Modified: modules/kazoo/kazoo.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/9b655b6cbdc6cebadac806c56d214833466caf4f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9b655b6cbdc6cebadac806c56d214833466caf4f.patch

---

diff --git a/modules/kazoo/kazoo.c b/modules/kazoo/kazoo.c
index e41a690..3431c61 100644
--- a/modules/kazoo/kazoo.c
+++ b/modules/kazoo/kazoo.c
@@ -291,11 +291,11 @@ static int mod_child_init(int rank)
 
 
if (rank==PROC_MAIN) {
-   pid=fork_process(1, AMQP Manager, 0);
+   pid=fork_process(1, AMQP Manager, 1);
if (pid0)
return -1; /* error */
if(pid==0){
-   kz_amqp_manager_loop(1);
+   kz_amqp_manager_loop(0);
}
else {
for(i=0; i  dbk_consumer_processes; i++) {


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] issue notifying subscribers with transport tcp/tls (#11)

2014-12-23 Thread lazedo
thank you for helping debug this. the problem was on the background process 
forked without the tcp option. the strange thing is that it works with udp.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#issuecomment-67982283___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] issue notifying subscribers with transport tcp/tls (#11)

2014-12-23 Thread lazedo
Closed #11.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/11#event-211459711___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f9c248a6: kazoo : less agressive log

2015-02-05 Thread lazedo
Module: kamailio
Branch: master
Commit: f9c248a66fdca5317e8820e53f1a0f99cd58ef8a
URL: 
https://github.com/kamailio/kamailio/commit/f9c248a66fdca5317e8820e53f1a0f99cd58ef8a

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-05T22:34:32Z

kazoo : less agressive log

changed log from INFO to DEBUG when timeout is set

---

Modified: modules/kazoo/kz_amqp.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f9c248a66fdca5317e8820e53f1a0f99cd58ef8a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f9c248a66fdca5317e8820e53f1a0f99cd58ef8a.patch

---

diff --git a/modules/kazoo/kz_amqp.c b/modules/kazoo/kz_amqp.c
index 1c109bb..29028d4 100644
--- a/modules/kazoo/kz_amqp.c
+++ b/modules/kazoo/kz_amqp.c
@@ -851,7 +851,7 @@ int kz_amqp_query_ex(struct sip_msg* msg, char* exchange, 
char* routing_key, cha
if((pv_val.flags  PV_VAL_INT)  pv_val.ri != 
0 ) {
kz_timeout.tv_usec = 0;
kz_timeout.tv_sec = pv_val.ri;
-   LM_INFO(SET TIMEOUT TO %i\n, 
kz_timeout.tv_sec);
+   LM_DBG(SET TIMEOUT TO %i\n, (int) 
kz_timeout.tv_sec);
}
}
}


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence : add min_expires param (#78)

2015-02-12 Thread lazedo
Merged #78.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/78#event-235067352___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:90293580: Merge pull request #78 from kamailio/lazedo/presence

2015-02-12 Thread lazedo
Module: kamailio
Branch: master
Commit: 902935802bfbfaef94b3da6bad6d7669040c8f47
URL: 
https://github.com/kamailio/kamailio/commit/902935802bfbfaef94b3da6bad6d7669040c8f47

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-12T23:21:27Z

Merge pull request #78 from kamailio/lazedo/presence

presence : add min_expires param

---

Modified: modules/presence/doc/presence_admin.xml
Modified: modules/presence/presence.c
Modified: modules/presence/presence.h
Modified: modules/presence/subscribe.c
Modified: modules/presence/subscribe.h
Modified: modules/presence/utils_func.c
Modified: modules/presence/utils_func.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/902935802bfbfaef94b3da6bad6d7669040c8f47.diff
Patch: 
https://github.com/kamailio/kamailio/commit/902935802bfbfaef94b3da6bad6d7669040c8f47.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] registrar : add lookup_to_dset optional uri param as in lookup (#84)

2015-02-12 Thread lazedo
lookup function has an optional uri param for looking up based on that param.
lookup_to_dset is used if we don't want to overwritte the Request-URI but there 
is option to lookup based on a uri.

during tests i noticed that the append_branch was being called when i did a 
lookup_to_dset(location, $fu) and kamailio exited because of that.

i made the append_branch to depend on the _mode ( 0 = lookup ) which seemed to 
fixed.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/84

-- Commit Summary --

  * registrar : add lookup_to_dset optional uri param as in lookup

-- File Changes --

M modules/registrar/lookup.c (34)
M modules/registrar/reg_mod.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/84.patch
https://github.com/kamailio/kamailio/pull/84.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/84
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar : add lookup_to_dset optional uri param as in lookup (#84)

2015-02-17 Thread lazedo
closing this, will make implementation of requirement in lookup registered(uri) 
function

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/84#issuecomment-74698203___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar : add lookup_to_dset optional uri param as in lookup (#84)

2015-02-17 Thread lazedo
Closed #84.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/84#event-237046011___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
that depends on the engine, right ? the point is, the value is stored in mixed 
case. i'm trying to get a match of the value that is stored. 
nat_traversal also has a source_uri pv that matches what it internally 
calculates, nathelper should do the same.


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90#issuecomment-74708052___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
...or we can patch nathelper to lower case what it puts in received_avp ? and 
also make sure $su returns lowercase ?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90#issuecomment-74708457___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
i agree, but not when is part of a select statement.
select * from usrloc where received = $su would not work.


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90#issuecomment-74703650___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
fair enough. thank you.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90#issuecomment-74710144___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
allows comparison with persisted value in usrloc.

if($ulc(exp=received) == $received_uri) {
  
}
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/90

-- Commit Summary --

  * nathelper - add received_ui pvar

-- File Changes --

M modules/nathelper/nathelper.c (30)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/90.patch
https://github.com/kamailio/kamailio/pull/90.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] nathelper - add received_ui pvar (#90)

2015-02-17 Thread lazedo
yes it does, but there is a difference. receive_uri returns the value as is 
persisted in usrloc,the proto is uppercase.
$su, $received_uri - sip:192.168.27.2:8305;transport=tcp - 
sip:192.168.27.2:8305;transport=TCP


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/90#issuecomment-74700928___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] registrar - additional features (#91)

2015-02-17 Thread lazedo
- add xavp when registered returns success
- add reg_received_avp param for strict matching the contact
- add reg_contact_avp param for strict matching the contact
- add xavp to reg_fetch_contacts

modparam(usrloc, xavp_contact, ulattrs)
modparam(registrar, reg_received_avp, $avp(chk_origin))
modparam(registrar, reg_contact_avp, $avp(chk_contact))

using xavp with registered
   $avp(chk_origin) = $su;
   $avp(chk_contact) = $(ct{nameaddr.uri});
   if (registered(location,$fu)) {
   xlog(L_INFO, $ci|log| checking $fu - $xavp(ulattrs=account_id));
  }

using xavp with reg_fetch_contacts
  if(reg_fetch_contacts(location, $fu, caller)) {
 xlog(L_INFO, $ci|log| checking $fu - 
$(ulc(caller=ulattrs=account_id)));
   }

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/91

-- Commit Summary --

  * registrar - add user xavp on successful registered call
  * registrar - add optional avp params for usrloc comparison
  * registrar - add xavp to reg_fetch_contacts

-- File Changes --

M modules/registrar/lookup.c (35)
M modules/registrar/reg_mod.c (50)
M modules/registrar/reg_mod.h (4)
M modules/registrar/regpv.c (307)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/91.patch
https://github.com/kamailio/kamailio/pull/91.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:44db9cdb: Merge pull request #87 from kamailio/lazedo/dbtext

2015-02-17 Thread lazedo
Module: kamailio
Branch: master
Commit: 44db9cdb44e6d2e11b6f423015350625a6d75637
URL: 
https://github.com/kamailio/kamailio/commit/44db9cdb44e6d2e11b6f423015350625a6d75637

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-17T12:08:34Z

Merge pull request #87 from kamailio/lazedo/dbtext

db_text - add affected rows capability

---

Modified: modules/db_text/dbt_base.c
Modified: modules/db_text/dbt_res.h
Modified: modules/db_text/dbtext.c
Modified: modules/db_text/dbtext.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/44db9cdb44e6d2e11b6f423015350625a6d75637.diff
Patch: 
https://github.com/kamailio/kamailio/commit/44db9cdb44e6d2e11b6f423015350625a6d75637.patch

---

diff --git a/modules/db_text/dbt_base.c b/modules/db_text/dbt_base.c
index c29a5e0..1a7f10c 100644
--- a/modules/db_text/dbt_base.c
+++ b/modules/db_text/dbt_base.c
@@ -336,6 +336,20 @@ int dbt_raw_query(db1_con_t* _h, char* _s, db1_res_t** _r)
 }
 
 /*
+ * Affected Rows
+ */
+int dbt_affected_rows(db1_con_t* _h)
+{
+   if (!_h || !CON_TABLE(_h))
+   {
+   LM_ERR(invalid parameter\n);
+   return -1;
+   }
+
+   return ((dbt_con_p)_h-tail)-affected;
+}
+
+/*
  * Insert a row into table
  */
 int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, int _n)
@@ -350,6 +364,9 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, 
int _n)
LM_ERR(invalid parameter\n);
return -1;
}
+
+   ((dbt_con_p)_h-tail)-affected = 0;
+
if(!_k || !_v || _n=0)
{
LM_ERR(no key-value to insert\n);
@@ -407,6 +424,8 @@ int dbt_insert(db1_con_t* _h, db_key_t* _k, db_val_t* _v, 
int _n)
goto clean;
}
 
+   ((dbt_con_p)_h-tail)-affected = 1;
+
/* dbt_print_table(_tbc, NULL); */

/* unlock databse */
@@ -452,6 +471,8 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v, int _n)
return -1;
}
 
+   ((dbt_con_p)_h-tail)-affected = 0;
+
/* lock database */
_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
if(!_tbc)
@@ -464,6 +485,7 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v, int _n)
if(!_k || !_v || _n=0)
{
LM_DBG(deleting all records\n);
+   ((dbt_con_p)_h-tail)-affected = _tbc-nrrows;
dbt_table_free_rows(_tbc);
/* unlock databse */
dbt_release_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
@@ -490,6 +512,9 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v, int _n)
_tbc-nrrows--;
// free row
dbt_row_free(_tbc, _drp);
+
+   ((dbt_con_p)_h-tail)-affected++;
+
}
_drp = _drp0;
}
@@ -530,7 +555,9 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v,
LM_ERR(invalid parameters\n);
return -1;
}
-   
+
+   ((dbt_con_p)_h-tail)-affected = 0;
+
/* lock database */
_tbc = dbt_db_get_table(DBT_CON_CONNECTION(_h), CON_TABLE(_h));
if(!_tbc)
@@ -569,6 +596,9 @@ int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v,
goto error;
}
}
+
+   ((dbt_con_p)_h-tail)-affected++;
+
}
_drp = _drp-next;
}
diff --git a/modules/db_text/dbt_res.h b/modules/db_text/dbt_res.h
index a143097..0f908e7 100644
--- a/modules/db_text/dbt_res.h
+++ b/modules/db_text/dbt_res.h
@@ -47,6 +47,7 @@ typedef struct _dbt_result
 typedef struct _dbt_con
 {
dbt_cache_p con;
+   int affected;
 } dbt_con_t, *dbt_con_p;
 
 #define DBT_CON_CONNECTION(db_con) (((dbt_con_p)((db_con)-tail))-con)
diff --git a/modules/db_text/dbtext.c b/modules/db_text/dbtext.c
index 47cf295..ab84562 100644
--- a/modules/db_text/dbtext.c
+++ b/modules/db_text/dbtext.c
@@ -134,6 +134,8 @@ int dbt_bind_api(db_func_t *dbb)
dbb-insert  = (db_insert_f)dbt_insert;
dbb-delete  = (db_delete_f)dbt_delete; 
dbb-update  = (db_update_f)dbt_update;
+   dbb-affected_rows = (db_affected_rows_f) dbt_affected_rows;
+   dbb-cap = DB_CAP_AFFECTED_ROWS;
 
return 0;
 }
diff --git a/modules/db_text/dbtext.h b/modules/db_text/dbtext.h
index 936bb3d..48f62cd 100644
--- a/modules/db_text/dbtext.h
+++ b/modules/db_text/dbtext.h
@@ -87,5 +87,10 @@ int dbt_delete(db1_con_t* _h, db_key_t* _k, db_op_t* _o, 
db_val_t* _v, int _n);
 int dbt_update(db1_con_t* _h, db_key_t* _k, db_op_t* _o, db_val_t* _v,
  db_key_t* _uk, db_val_t* _uv, int _n, int _un);
 
+/*
+ * Affected rows
+ */
+int dbt_affected_rows(db1_con_t* _h);
+
 #endif

Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-19 Thread lazedo
there are two params
match_flags as you proposed
1 - callid
2 - received
3 - contact

the registered() function check that flag, checks the values in xavp_cfg
and assigns the value to a temp vars, that are then compared against the
value in the record.

match_return_flags controls if the record xavp is added to the transaction.





On Thu, Feb 19, 2015 at 8:11 PM, Daniel-Constantin Mierla 
notificati...@github.com wrote:

 I don't see any new parameter to registered(...) function. Do I miss
 something?

 Perhaps I can change (sometime during next days) the current call-id
 matching to using a new flags param to registered() function and xavp. Then
 you can add from there what you need extra.

 —
 Reply to this email directly or view it on GitHub
 https://github.com/kamailio/kamailio/pull/91#issuecomment-75126660.



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75127402___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-19 Thread lazedo
i added a 3rd param to control if we search for override values for flags.
default is 0, don't search


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75129897___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-19 Thread lazedo
i don't think i did, the flags are in params.

i added the extra search for override to give more flexibility.
i can put that flexibility param dependent.

On Thu, Feb 19, 2015 at 8:03 PM, Daniel-Constantin Mierla 
notificati...@github.com wrote:

 You misunderstood my proposal. I wanted a new parameter to the function:
 registered(talble, uri, flags), because I want to avoid searching through
 xavps if not needed. The parameter is read only if provided.

 If I got right the patches, you search for the flags in xavp list.

 —
 Reply to this email directly or view it on GitHub
 https://github.com/kamailio/kamailio/pull/91#issuecomment-75125239.



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75125878___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-02-19 Thread lazedo
Olle,

it acts on the sip uri not the user part of the sip uri.


On Thu, Feb 19, 2015 at 8:27 PM, juha-h notificati...@github.com wrote:

 lazedo writes:

  added param sip_uri_match
  0 - case sensitive (default)
  1 - case insensitive

 should it rather be called sip_uri_user_match?

 i still don't feel comfortable in starting to bloat kamailio with
 non-standard behavior. why don't you canonize uri user in config
 script?

 -- juha

 —
 Reply to this email directly or view it on GitHub
 https://github.com/kamailio/kamailio/pull/94#issuecomment-75129328.



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94#issuecomment-75130074___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar : add lookup_to_dset optional uri param as in lookup (#84)

2015-02-16 Thread lazedo
i do agree about the append branch part, i didn't find a way (lack of 
knowledge) to make it work without it.
when using the uri param, $fu in this case,, kamailio exited. 
i think that there must be a better option instead of _mode.
help appreciated.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/84#issuecomment-74511400___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:2f4b6375: Merge pull request #86 from kamailio/lazedo/usrloc-patch

2015-02-16 Thread lazedo
Module: kamailio
Branch: master
Commit: 2f4b6375429eeb7fa73d85909150bfd9377582d1
URL: 
https://github.com/kamailio/kamailio/commit/2f4b6375429eeb7fa73d85909150bfd9377582d1

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-16T13:26:28Z

Merge pull request #86 from kamailio/lazedo/usrloc-patch

usrloc - fix column types not initialized on update

---

Modified: modules/usrloc/ucontact.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/2f4b6375429eeb7fa73d85909150bfd9377582d1.diff
Patch: 
https://github.com/kamailio/kamailio/commit/2f4b6375429eeb7fa73d85909150bfd9377582d1.patch

---

diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index 26bf567..737da03 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -824,9 +824,9 @@ int db_update_ucontact_addr(ucontact_t* _c)
nr_cols2++;
 
keys2[nr_cols2] = ruid_col;
+   vals2[nr_cols2].type = DB1_STR;
if(_c-ruid.len0)
{
-   vals2[nr_cols2].type = DB1_STR;
vals2[nr_cols2].nul = 0;
vals2[nr_cols2].val.str_val = _c-ruid;
} else {
@@ -835,9 +835,9 @@ int db_update_ucontact_addr(ucontact_t* _c)
nr_cols2++;
 
keys2[nr_cols2] = instance_col;
+   vals2[nr_cols2].type = DB1_STR;
if(_c-instance.len0)
{
-   vals2[nr_cols2].type = DB1_STR;
vals2[nr_cols2].nul = 0;
vals2[nr_cols2].val.str_val = _c-instance;
} else {
@@ -1036,9 +1036,9 @@ int db_update_ucontact_ruid(ucontact_t* _c)
n2++;
 
keys2[n2] = instance_col;
+   vals2[n2].type = DB1_STR;
if(_c-instance.len0)
{
-   vals2[n2].type = DB1_STR;
vals2[n2].nul = 0;
vals2[n2].val.str_val = _c-instance;
} else {


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] usrloc - fix column types not initialized on update (#86)

2015-02-16 Thread lazedo
Merged #86.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/86#event-236311219___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:cf521e66: usrloc - fix column types not initialized on update

2015-02-16 Thread lazedo
Module: kamailio
Branch: master
Commit: cf521e66825fea4b7498d615d435739628fe4c09
URL: 
https://github.com/kamailio/kamailio/commit/cf521e66825fea4b7498d615d435739628fe4c09

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-16T13:14:06Z

usrloc - fix column types not initialized on update

some columns were not initialized on update leading to errors in update

ERROR: db_text [dbt_lib.c:464]: dbt_is_neq_type(): invalid datatype -1001432832
ERROR: db_text [dbt_base.c:560]: dbt_update(): incompatible types!
ERROR: db_text [dbt_base.c:599]: dbt_update(): failed to update the table!

---

Modified: modules/usrloc/ucontact.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/cf521e66825fea4b7498d615d435739628fe4c09.diff
Patch: 
https://github.com/kamailio/kamailio/commit/cf521e66825fea4b7498d615d435739628fe4c09.patch

---

diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c
index 26bf567..737da03 100644
--- a/modules/usrloc/ucontact.c
+++ b/modules/usrloc/ucontact.c
@@ -824,9 +824,9 @@ int db_update_ucontact_addr(ucontact_t* _c)
nr_cols2++;
 
keys2[nr_cols2] = ruid_col;
+   vals2[nr_cols2].type = DB1_STR;
if(_c-ruid.len0)
{
-   vals2[nr_cols2].type = DB1_STR;
vals2[nr_cols2].nul = 0;
vals2[nr_cols2].val.str_val = _c-ruid;
} else {
@@ -835,9 +835,9 @@ int db_update_ucontact_addr(ucontact_t* _c)
nr_cols2++;
 
keys2[nr_cols2] = instance_col;
+   vals2[nr_cols2].type = DB1_STR;
if(_c-instance.len0)
{
-   vals2[nr_cols2].type = DB1_STR;
vals2[nr_cols2].nul = 0;
vals2[nr_cols2].val.str_val = _c-instance;
} else {
@@ -1036,9 +1036,9 @@ int db_update_ucontact_ruid(ucontact_t* _c)
n2++;
 
keys2[n2] = instance_col;
+   vals2[n2].type = DB1_STR;
if(_c-instance.len0)
{
-   vals2[n2].type = DB1_STR;
vals2[n2].nul = 0;
vals2[n2].val.str_val = _c-instance;
} else {


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text - add affected rows capability (#87)

2015-02-16 Thread lazedo
this will allow better interaction with usrloc module param db_check_update

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/87

-- Commit Summary --

  * db_text - add affected rows capability

-- File Changes --

M modules/db_text/dbt_base.c (32)
M modules/db_text/dbt_res.h (1)
M modules/db_text/dbtext.c (2)
M modules/db_text/dbtext.h (5)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/87.patch
https://github.com/kamailio/kamailio/pull/87.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/87
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] usrloc - fix column types not initialized on update (#86)

2015-02-16 Thread lazedo
some columns were not initialized on update leading to errors in update

ERROR: db_text [dbt_lib.c:464]: dbt_is_neq_type(): invalid datatype -1001432832
ERROR: db_text [dbt_base.c:560]: dbt_update(): incompatible types!
ERROR: db_text [dbt_base.c:599]: dbt_update(): failed to update the table!
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/86

-- Commit Summary --

  * usrloc - fix column types not initialized on update

-- File Changes --

M modules/usrloc/ucontact.c (6)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/86.patch
https://github.com/kamailio/kamailio/pull/86.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/86
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] db_text - add affected rows capability (#87)

2015-02-16 Thread lazedo
can you check indentation now ? thanks

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/87#issuecomment-74519388___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : missing OP_NEQ (#92)

2015-02-18 Thread lazedo
this affects the presence package when it queries for active_watchers
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/92

-- Commit Summary --

  * db_text : missing OP_NEQ

-- File Changes --

M modules/db_text/dbt_res.c (7)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/92.patch
https://github.com/kamailio/kamailio/pull/92.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/92
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-02-19 Thread lazedo
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.patch
https://github.com/kamailio/kamailio/pull/94.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] db_text : missing OP_NEQ (#92)

2015-02-19 Thread lazedo
Merged #92.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/92#event-238554677___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence_dialoginfo : optionally send dummy dialog (#55)

2015-01-28 Thread lazedo

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/55

-- Commit Summary --

  * presence_dialoginfo : optionally send dummy dialog

-- File Changes --

M modules/presence_dialoginfo/doc/presence_dialoginfo_admin.xml (25)
M modules/presence_dialoginfo/notify_body.c (47)
M modules/presence_dialoginfo/presence_dialoginfo.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/55.patch
https://github.com/kamailio/kamailio/pull/55.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/55
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence_dialoginfo : optionally send dummy dialog (#55)

2015-01-28 Thread lazedo
this seems to also affect astra phones besides Bria

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/55#issuecomment-71890581___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence : fix send_notify_request (#54)

2015-01-28 Thread lazedo
aux_body_processing after get get_p_notify_body
can we backport this commit to 4.2 ?

also, please delete branch after merge.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/54

-- Commit Summary --

  * presence : fix send_notify_request

-- File Changes --

M modules/presence/notify.c (31)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/54.patch
https://github.com/kamailio/kamailio/pull/54.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/54
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f734154f: Merge pull request #55 from lazedo/presence_dialoginfo

2015-01-28 Thread lazedo
Module: kamailio
Branch: master
Commit: f734154ff35fa95e8a70d9ee13f4f63a36794ea7
URL: 
https://github.com/kamailio/kamailio/commit/f734154ff35fa95e8a70d9ee13f4f63a36794ea7

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-01-28T20:12:21Z

Merge pull request #55 from lazedo/presence_dialoginfo

presence_dialoginfo : optionally send dummy dialog

---

Modified: modules/presence_dialoginfo/doc/presence_dialoginfo_admin.xml
Modified: modules/presence_dialoginfo/notify_body.c
Modified: modules/presence_dialoginfo/presence_dialoginfo.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f734154ff35fa95e8a70d9ee13f4f63a36794ea7.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f734154ff35fa95e8a70d9ee13f4f63a36794ea7.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:5c9b3afc: presence_dialoginfo : optionally send dummy dialog

2015-01-28 Thread lazedo
Module: kamailio
Branch: master
Commit: 5c9b3afca092dfda33c96dbf5195b8f7bbc2d4cf
URL: 
https://github.com/kamailio/kamailio/commit/5c9b3afca092dfda33c96dbf5195b8f7bbc2d4cf

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-01-28T17:31:06Z

presence_dialoginfo : optionally send dummy dialog

---

Modified: modules/presence_dialoginfo/doc/presence_dialoginfo_admin.xml
Modified: modules/presence_dialoginfo/notify_body.c
Modified: modules/presence_dialoginfo/presence_dialoginfo.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/5c9b3afca092dfda33c96dbf5195b8f7bbc2d4cf.diff
Patch: 
https://github.com/kamailio/kamailio/commit/5c9b3afca092dfda33c96dbf5195b8f7bbc2d4cf.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence_dialoginfo : optionally send dummy dialog (#55)

2015-01-28 Thread lazedo
Merged #55.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/55#event-226348880___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence_dialoginfo : optionally send dummy dialog (#55)

2015-01-28 Thread lazedo
Hi Daniel,

can i backport to 4.2 ?
would like to fix astra / bria - blf issues



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/55#issuecomment-71907028___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence : min_expires (#77)

2015-02-10 Thread lazedo
some UAs send very low expires values for subscriptions flooding the server 
with subscribe/notify messages

this pr allows a minimum expire value for subscriptions.

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/77

-- Commit Summary --

  * Update presence.c
  * Update presence.h
  * Update subscribe.h
  * Update subscribe.c

-- File Changes --

M modules/presence/presence.c (8)
M modules/presence/presence.h (1)
M modules/presence/subscribe.c (11)
M modules/presence/subscribe.h (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/77.patch
https://github.com/kamailio/kamailio/pull/77.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/77
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence : add min_expires param (#78)

2015-02-10 Thread lazedo
some UAs send very low values for subscriptions causing unwanted flooding of 
the server with subscribe/notify messages
this new parameter allows to set a minimum value for the subscription.
default value is 0 to preserve existing behaviour
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/78

-- Commit Summary --

  * presence : add min_expires param

-- File Changes --

M modules/presence/presence.c (8)
M modules/presence/presence.h (1)
M modules/presence/subscribe.c (11)
M modules/presence/subscribe.h (4)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/78.patch
https://github.com/kamailio/kamailio/pull/78.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/78
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence : min_expires (#77)

2015-02-10 Thread lazedo
Closed #77.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/77#event-233731104___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence : add min_expires param (#78)

2015-02-10 Thread lazedo
Hi juha,

i don't think that its part of any standard.
what we observed is that UAs do respect the expires we send with
subscription=active
this acts like the max_expires params, if its out of bounds it corrects the
value and subscribes with that value in expires.
when it send the subscription=active, it will send the expires accepted and
saved in the server.

does that help ?



On Wed, Feb 11, 2015 at 5:58 AM, juha-h notificati...@github.com wrote:

 lazedo writes:

  some UAs send very low values for subscriptions causing unwanted
  flooding of the server with subscribe/notify messages
  this new parameter allows to set a minimum value for the subscription.

 is that supported by the standards, i.e., can presence server tell the
 ua the minimum allowed subscription expires time so that the ua can
 adapt to that?

 -- juha

 —
 Reply to this email directly or view it on GitHub
 https://github.com/kamailio/kamailio/pull/78#issuecomment-73837556.



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/78#issuecomment-73840471___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence : add min_expires param (#78)

2015-02-11 Thread lazedo
thanks for pointing that Daniel.

i think we could add another parameter to set the action 
min_expires_action = 1 = force min_expires
min_expires_action = 2 = send 423 with Min-Expires header

is this acceptable ?

it is already optional, it acts only when min_expires  0 and the default is 
zero.







---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/78#issuecomment-73863447___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence : add min_expires param (#78)

2015-02-11 Thread lazedo
well, the experience we had so far is that UAs do accept the Expires sent 
independently of the requested value.

 but to keep kamailio defaults rfc compliant, we can set the default action to 
2 send 423.





---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/78#issuecomment-73864386___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-19 Thread lazedo
@miconda i believe this is it ?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75176709___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-03-09 Thread lazedo
ok, i wasn't thinking in adding a new param and use the previous one ( 
sip_uri_match ) to either call core_hash or core_case_hash.
are you proposing to change the core_hash with core_case_hash independently 
from sip_uri_match param?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94#issuecomment-77841723___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-03-09 Thread lazedo
yes, working the same as the uri comparison, using function pointer.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94#issuecomment-77822727___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence: add $subs pv for subscription access (#118)

2015-03-30 Thread lazedo
after handle_subscribe there is no safe way in script to obtain the presently
because re-subscription RURI is ip of kamailio and To-Uri may not contain
the presently.

$subs(uri) will allow access to this value

added as a pv to allow extension to get more properties from subscription
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/118

-- Commit Summary --

  * presence: add $subs pv for subscription access

-- File Changes --

M modules/presence/doc/presence_admin.xml (34)
M modules/presence/presence.c (7)
M modules/presence/presence.h (3)
M modules/presence/subscribe.c (51)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/118.patch
https://github.com/kamailio/kamailio/pull/118.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/118
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence: add $subs pv for subscription access (#118)

2015-03-30 Thread lazedo
@miconda thank you. for future reference, what is the proper flow to issue a 
pull request for documenting pseudo-variables ?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/118#issuecomment-87708379___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence: add $subs pv for subscription access (#118)

2015-03-30 Thread lazedo
Merged #118.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/118#event-268562074___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:08acf091: Merge pull request #118 from kamailio/lazedo/presence-subs

2015-03-30 Thread lazedo
Module: kamailio
Branch: master
Commit: 08acf091a4500d2eec3987a0d07fd87cf5df63e1
URL: 
https://github.com/kamailio/kamailio/commit/08acf091a4500d2eec3987a0d07fd87cf5df63e1

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-03-30T15:46:42+01:00

Merge pull request #118 from kamailio/lazedo/presence-subs

presence: add $subs pv for subscription access

---

Modified: modules/presence/doc/presence_admin.xml
Modified: modules/presence/presence.c
Modified: modules/presence/presence.h
Modified: modules/presence/subscribe.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/08acf091a4500d2eec3987a0d07fd87cf5df63e1.diff
Patch: 
https://github.com/kamailio/kamailio/commit/08acf091a4500d2eec3987a0d07fd87cf5df63e1.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] usrloc - fix contacts attrs not deleted (#102)

2015-02-27 Thread lazedo
Closed #102.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/102#event-243203885___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] usrloc - fix contacts attrs not deleted (#102)

2015-02-27 Thread lazedo
merged manually

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/102#issuecomment-76380126___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-23 Thread lazedo
@miconda can you check if this is acceptable ? thanks.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75547064___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-23 Thread lazedo
@miconda the $ulc structure doesn't have the contact xavp (it copies all 
elements but the xavp), the purpose of the flag is to add it to the $ulc 
structure. 

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75647789___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-23 Thread lazedo
@miconda hi, the remaining flag in the module is to control the setting of the 
contact xavp on return from a match. i left it here because we also want the 
behavior to apply to reg_fetch_contacts, is that ok ?
i can make a simple patch against master.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75640886___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] usrloc - fix contacts attrs not deleted (#102)

2015-02-25 Thread lazedo
when the contact is deleted using db_delete_ucontact_ruid (default)
the uldb_attrs_delete is not called leaving the location_attrs with unwanted 
records

created uldb_attrs_delete_ruid to be called by db_delete_ucontact_ruid
redirected uldb_attrs_delete to uldb_attrs_delete_ruid
also changed the places inside contact where uldb_attrs_delete was called to 
call new uldb_attrs_delete_ruid function
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/102

-- Commit Summary --

  * usrloc - fix contacts attrs not deleted

-- File Changes --

M modules/usrloc/ucontact.c (80)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/102.patch
https://github.com/kamailio/kamailio/pull/102.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/102
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] usrloc - fix contacts attrs not deleted (#102)

2015-02-25 Thread lazedo
isn't ruid unique per contact ?

not sure what i missed in the commit description, was it [EMPTY LINE] ?

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/102#issuecomment-76018168___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] usrloc - fix contacts attrs not deleted (#102)

2015-02-25 Thread lazedo
@miconda please check

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/102#issuecomment-76024339___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] fix - dummy dialog rfc4235 (#96)

2015-02-24 Thread lazedo
grandstream validates the dialog and according to rfc4235 the id element is 
mandatory
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/96

-- Commit Summary --

  * fix - dummy dialog rfc4235

-- File Changes --

M modules/presence_dialoginfo/notify_body.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/96.patch
https://github.com/kamailio/kamailio/pull/96.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/96
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] fix - dummy dialog rfc4235 (#96)

2015-02-24 Thread lazedo
Closed #96.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/96#event-241010059___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence_dialoginfo: rfc4235 in dummy dialog (#97)

2015-02-24 Thread lazedo
according to rfc4235 the id element is mandatory.
granstream phones are affected by this.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/97

-- Commit Summary --

  * presence_dialoginfo: rfc4235 in dummy dialog

-- File Changes --

M modules/presence_dialoginfo/notify_body.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/97.patch
https://github.com/kamailio/kamailio/pull/97.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/97
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence_dialoginfo: rfc4235 in dummy dialog (#97)

2015-02-24 Thread lazedo
Closed #97.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/97#event-241073264___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence_dialoginfo: rfc4235 in dummy dialog (#99)

2015-02-24 Thread lazedo
according to rfc4235 the id element is mandatory.
granstream phones are affected by this.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/99

-- Commit Summary --

  * presence_dialoginfo: rfc4235 in dummy dialog

-- File Changes --

M modules/presence_dialoginfo/notify_body.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/99.patch
https://github.com/kamailio/kamailio/pull/99.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/99
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:f12f243e: presence_dialoginfo: rfc4235 in dummy dialog

2015-02-25 Thread lazedo
Module: kamailio
Branch: master
Commit: f12f243e39c840b1306bf376c49ef4dab9e7564f
URL: 
https://github.com/kamailio/kamailio/commit/f12f243e39c840b1306bf376c49ef4dab9e7564f

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-24T17:19:15Z

presence_dialoginfo: rfc4235 in dummy dialog

according to rfc4235 the id element is mandatory.
granstream phones are affected by this.

---

Modified: modules/presence_dialoginfo/notify_body.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f12f243e39c840b1306bf376c49ef4dab9e7564f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f12f243e39c840b1306bf376c49ef4dab9e7564f.patch

---

diff --git a/modules/presence_dialoginfo/notify_body.c 
b/modules/presence_dialoginfo/notify_body.c
index bd2097b..508b9f8 100644
--- a/modules/presence_dialoginfo/notify_body.c
+++ b/modules/presence_dialoginfo/notify_body.c
@@ -68,7 +68,7 @@ void free_xml_body(char* body)
 }
 
 #define DIALOGINFO_EMPTY_BODY dialog-info\
-dialog direction=\recipient\\
+dialog id=\615293b33c62dec073e05d9421e9f48b\ direction=\recipient\\
 stateterminated/state\
 /dialog\
 /dialog-info


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:8bbed6e3: Merge pull request #99 from kamailio/lazedo-presence_dialoginfo-patch1

2015-02-25 Thread lazedo
Module: kamailio
Branch: master
Commit: 8bbed6e31296cfb88b7ce7c928aa9242b5df170f
URL: 
https://github.com/kamailio/kamailio/commit/8bbed6e31296cfb88b7ce7c928aa9242b5df170f

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-02-25T09:48:24Z

Merge pull request #99 from kamailio/lazedo-presence_dialoginfo-patch1

presence_dialoginfo: rfc4235 in dummy dialog

---

Modified: modules/presence_dialoginfo/notify_body.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/8bbed6e31296cfb88b7ce7c928aa9242b5df170f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/8bbed6e31296cfb88b7ce7c928aa9242b5df170f.patch

---

diff --git a/modules/presence_dialoginfo/notify_body.c 
b/modules/presence_dialoginfo/notify_body.c
index bd2097b..508b9f8 100644
--- a/modules/presence_dialoginfo/notify_body.c
+++ b/modules/presence_dialoginfo/notify_body.c
@@ -68,7 +68,7 @@ void free_xml_body(char* body)
 }
 
 #define DIALOGINFO_EMPTY_BODY dialog-info\
-dialog direction=\recipient\\
+dialog id=\615293b33c62dec073e05d9421e9f48b\ direction=\recipient\\
 stateterminated/state\
 /dialog\
 /dialog-info


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence_dialoginfo: rfc4235 in dummy dialog (#99)

2015-02-25 Thread lazedo
Merged #99.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/99#event-241578674___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-25 Thread lazedo
https://github.com/kamailio/kamailio/pull/101


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#issuecomment-75935336___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - additional features (#91)

2015-02-25 Thread lazedo
Closed #91.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/91#event-241590098___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] registrar - add registered extra parameter (#101)

2015-02-25 Thread lazedo
adds 3rd parameter to registered to optionally restrict the contacts

adds module parameter to optionally
 add contact xavp on successful match when calling registered
 add contact xavp to the $ulc structure
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/101

-- Commit Summary --

  * registrar - add registered extra parameter

-- File Changes --

M modules/registrar/api.c (2)
M modules/registrar/lookup.c (66)
M modules/registrar/lookup.h (2)
M modules/registrar/reg_mod.c (88)
M modules/registrar/reg_mod.h (8)
M modules/registrar/regpv.c (313)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/101.patch
https://github.com/kamailio/kamailio/pull/101.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/101
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] presence: add sip_uri_match module parameter (#116)

2015-03-26 Thread lazedo
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/116

-- Commit Summary --

  * presence: add sip_uri_match module parameter

-- File Changes --

M modules/presence/doc/presence_admin.xml (29)
M modules/presence/hash.c (10)
M modules/presence/notify.c (22)
M modules/presence/presence.c (49)
M modules/presence/presence.h (3)
M modules/presence/presentity.c (4)
M modules/presence/subscribe.c (12)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/116.patch
https://github.com/kamailio/kamailio/pull/116.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/116
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-03-26 Thread lazedo
closing here because of rebase that didn't go well.

https://github.com/kamailio/kamailio/pull/116


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94#issuecomment-86783698___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] presence - match sip uris using alternative function (#94)

2015-03-26 Thread lazedo
Closed #94.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/94#event-266503710___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - add registered extra parameter (#101)

2015-03-25 Thread lazedo
https://github.com/kamailio/kamailio/pull/115


---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/101#issuecomment-85988940___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] registrar - add registered extra parameter (#101)

2015-03-25 Thread lazedo
Closed #101.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/101#event-264601541___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] registrar : add optional params to registered function (#115)

2015-03-25 Thread lazedo
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.patch
https://github.com/kamailio/kamailio/pull/115.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/115
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] db_text : simple raw support for select (#136)

2015-04-22 Thread lazedo
yes

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/136#issuecomment-95273202___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : simple raw support for select (#136)

2015-04-22 Thread lazedo

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/136

-- Commit Summary --

  * db_text : simple raw support for select

-- File Changes --

M modules/db_text/dbt_base.c (45)
M modules/db_text/dbtext.c (3)
M modules/db_text/dbtext.h (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/136.patch
https://github.com/kamailio/kamailio/pull/136.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/136
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] db_text : simple raw support for select (#136)

2015-04-22 Thread lazedo
not a custom, just a minimal sql by parsing the const str* _s parameter

SELECT FIELDS FROM TABLE WHERE CONDITIONS
UPDATE TABLE SET FIELDS=VALUES WHERE CONDITIONS
DELETE FROM TABLE WHERE CONDITIONS

1) FIELDS  = [FIELD, ...]
2) CONDITIONS [FIELD=VALUE, ...]
3) SET reuse (2)



---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/136#issuecomment-95277309___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] db_text : simple raw support for select (#136)

2015-04-22 Thread lazedo
sure, will do in the days to come just wanted to make sure this is useful for 
4.3

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/136#issuecomment-95279439___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : add db_raw_query support (#146)

2015-05-04 Thread lazedo
lazedo wants to merge 1 commit into kamailio:master from 
lazedo:lazedo/db_text_raw_query:

example
. `select watcher_username, called from active_watchers where expires  -1`

current limitations

. only select statements
. where clause always uses and
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/146

-- Commit Summary --

  * db_text : add db_raw_query support

-- File Changes --

M modules/db_text/dbt_base.c (50)
A modules/db_text/dbt_raw_query.c (201)
A modules/db_text/dbt_raw_query.h (37)
A modules/db_text/dbt_raw_util.c (247)
A modules/db_text/dbt_raw_util.h (40)
M modules/db_text/dbtext.h (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/146.patch
https://github.com/kamailio/kamailio/pull/146.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/146
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a0b02584: db_text : missing conversion in raw query

2015-06-10 Thread lazedo
Module: kamailio
Branch: master
Commit: a0b02584b76fced6d98f76ec02ae60d75bbccfa2
URL: 
https://github.com/kamailio/kamailio/commit/a0b02584b76fced6d98f76ec02ae60d75bbccfa2

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-06-10T11:52:20+01:00

db_text : missing conversion in raw query

---

Modified: modules/db_text/dbt_raw_util.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/a0b02584b76fced6d98f76ec02ae60d75bbccfa2.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a0b02584b76fced6d98f76ec02ae60d75bbccfa2.patch

---

diff --git a/modules/db_text/dbt_raw_util.c b/modules/db_text/dbt_raw_util.c
index a35bacb..1efe9bd 100644
--- a/modules/db_text/dbt_raw_util.c
+++ b/modules/db_text/dbt_raw_util.c
@@ -171,6 +171,7 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** 
_o, db_val_t** _v)
regex_t preg;
int offset = 0;
int idx = -1;
+   char int_buf[50];
 
*_k = NULL;
*_o = NULL;
@@ -225,8 +226,10 @@ int dbt_build_where(char* where, db_key_t** _k, db_op_t** 
_o, db_val_t** _v)
 
l = matches[5].rm_eo - matches[5].rm_so;
if(matches[4].rm_so == -1) {
+   strncpy(int_buf, buffer+matches[5].rm_so, l);
+   int_buf[l] = '\0';
_v1[idx].type = DB1_INT;
-   _v1[idx].val.int_val = 0;
+   _v1[idx].val.int_val = atoi(int_buf);
} else {
_v1[idx].type = DB1_STR;
_v1[idx].val.str_val.len = l;


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] kazoo : add json keys function and escape character (#200)

2015-06-10 Thread lazedo
Merged #200.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/200#event-327315495___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:e9e02982: Merge pull request #200 from kamailio/kazoo_json

2015-06-10 Thread lazedo
Module: kamailio
Branch: master
Commit: e9e02982019921713fa6022b076bd4ceae899c6d
URL: 
https://github.com/kamailio/kamailio/commit/e9e02982019921713fa6022b076bd4ceae899c6d

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-06-10T12:33:10+01:00

Merge pull request #200 from kamailio/kazoo_json

kazoo : add json keys function and escape character

---

Modified: modules/kazoo/kazoo.c
Modified: modules/kazoo/kz_json.c
Modified: modules/kazoo/kz_json.h

---

Diff:  
https://github.com/kamailio/kamailio/commit/e9e02982019921713fa6022b076bd4ceae899c6d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/e9e02982019921713fa6022b076bd4ceae899c6d.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : missing conversion in raw query (#199)

2015-06-10 Thread lazedo
where clause was missing the conversion to int when appropriate
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/199

-- Commit Summary --

  * db_text : missing conversion in raw query

-- File Changes --

M modules/db_text/dbt_raw_util.c (5)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/199.patch
https://github.com/kamailio/kamailio/pull/199.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/199
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] kazoo : add json keys function and escape character (#200)

2015-06-10 Thread lazedo
json in the form of

{ Nodes :  {
   myn...@my.tld.com : { ... },
   myothern...@my.tld.com : { ...}
   }
}

doesn't have an easy to fetch the keys (it works already if it is an array)
kazoo_json_keys retrieves the keys to an avp

when querying inner fields in the form xx.yy.zzz
if one of xx / yy / zzz contains a dot (.) we cannot determine the field 
correctly.
use json_escape_char param value to encode the value before querying json and 
kazoo_json will decode using the same character
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/200

-- Commit Summary --

  * kazoo : add json keys function and escape character

-- File Changes --

M modules/kazoo/kazoo.c (6)
M modules/kazoo/kz_json.c (95)
M modules/kazoo/kz_json.h (1)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/200.patch
https://github.com/kamailio/kamailio/pull/200.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/200
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:324d64e9: kazoo : more federation tweaks

2015-06-23 Thread lazedo
Module: kamailio
Branch: master
Commit: 324d64e9ed301dab2204bda5e7cd143516edf64d
URL: 
https://github.com/kamailio/kamailio/commit/324d64e9ed301dab2204bda5e7cd143516edf64d

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-06-23T16:23:42+01:00

kazoo : more federation tweaks

when using federation, only use federation exchanges for zones != primary

---

Modified: modules/kazoo/kz_amqp.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/324d64e9ed301dab2204bda5e7cd143516edf64d.diff
Patch: 
https://github.com/kamailio/kamailio/commit/324d64e9ed301dab2204bda5e7cd143516edf64d.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : support 'order by' in raw query (#216)

2015-06-18 Thread lazedo

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/216

-- Commit Summary --

  * db_text : support 'order by' in raw query

-- File Changes --

M modules/db_text/dbt_raw_query.c (21)
M modules/db_text/dbt_raw_util.c (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/216.patch
https://github.com/kamailio/kamailio/pull/216.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/216
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio] kazoo : missing fixes (#204)

2015-06-11 Thread lazedo
Merged #204.

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/204#event-328662077___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:a2ed3945: Merge pull request #204 from kamailio/kazoo_patch

2015-06-11 Thread lazedo
Module: kamailio
Branch: master
Commit: a2ed394522c5ad5dfe9822352d41c38692418098
URL: 
https://github.com/kamailio/kamailio/commit/a2ed394522c5ad5dfe9822352d41c38692418098

Author: lazedo luis.az...@factorlusitano.com
Committer: lazedo luis.az...@factorlusitano.com
Date: 2015-06-11T17:09:47+01:00

Merge pull request #204 from kamailio/kazoo_patch

kazoo : missing fixes

---

Modified: modules/kazoo/const.c
Modified: modules/kazoo/const.h
Modified: modules/kazoo/kz_amqp.c
Modified: modules/kazoo/kz_amqp.h
Modified: modules/kazoo/kz_json.c
Modified: modules/kazoo/kz_pua.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/a2ed394522c5ad5dfe9822352d41c38692418098.diff
Patch: 
https://github.com/kamailio/kamailio/commit/a2ed394522c5ad5dfe9822352d41c38692418098.patch


___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] kazoo : missing fixes (#204)

2015-06-11 Thread lazedo

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/204

-- Commit Summary --

  * kazoo : missing fixes

-- File Changes --

M modules/kazoo/const.c (1)
M modules/kazoo/const.h (2)
M modules/kazoo/kz_amqp.c (10)
M modules/kazoo/kz_amqp.h (6)
M modules/kazoo/kz_json.c (26)
M modules/kazoo/kz_pua.c (19)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/204.patch
https://github.com/kamailio/kamailio/pull/204.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/204
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] db_text : memory allocation/release issues in raw query (#205)

2015-06-11 Thread lazedo
memory allocation/release issues in raw query and mark changed only if there 
was a real change
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/205

-- Commit Summary --

  * db_text : only mark changed if there was a real change
  * db_text : memory allocation / release in raw query

-- File Changes --

M modules/db_text/dbt_base.c (6)
M modules/db_text/dbt_raw_query.c (5)
M modules/db_text/dbt_raw_util.c (17)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/205.patch
https://github.com/kamailio/kamailio/pull/205.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/205
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] pv : add auth digest pseudo variables (#233)

2015-07-06 Thread lazedo
adn -  auth nonce
adc - auth cnonce
adr - auth response
ado - auth opaque
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/233

-- Commit Summary --

  * pv : add auth digest pseudo variables

-- File Changes --

M modules/pv/pv.c (12)
M modules/pv/pv_core.c (12)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/233.patch
https://github.com/kamailio/kamailio/pull/233.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/233
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio] htable : fix $shtrecord(value) returned value (#272)

2015-07-31 Thread lazedo
 $shtrecord(value) does not return correct value when it is an integer
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/272

-- Commit Summary --

  * htable : fix  $shtrecord(value) returned value

-- File Changes --

M modules/htable/ht_var.c (7)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/272.patch
https://github.com/kamailio/kamailio/pull/272.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/272
___
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev


  1   2   3   >