Re: [sr-dev] [kamailio/kamailio] presence_xml db_url param can not set (#1809)

2019-01-12 Thread Cui Gang
I found a confusing thing. I simplified the configuration file
```
debug=3

/* set paths to location of modules */
mpath="/usr/local/kamailio/lib64/kamailio/modules/"

loadmodule "db_mysql.so"
loadmodule "tm.so"
loadmodule "sl.so"

loadmodule "presence.so"
loadmodule "presence_xml.so"

modparam("presence_xml", "db_url", 
"mysql://kamailio:kamailiorw@localhost/kamailio52")

request_route {
exit;
}
```
 Log Messages
About db_url
```
0(4147) DEBUG:  [core/modparam.c:83]: set_mod_param_regex(): 
'presence_xml' matches module 'presence_xml'
 0(4147) DEBUG:  [core/sr_module.c:711]: find_param_export(): found 
 in module presence_xml 
[/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so]
 0(4147) DEBUG:  [core/modparam.c:99]: set_mod_param_regex(): found 
 in module presence_xml 
[/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so]
...
0(4149) DEBUG:  [core/sr_module.c:896]: init_mod(): presence
 0(4149) DEBUG: presence [presence.c:282]: mod_init(): 
db_url=mysql://kamailio:kamailiorw@localhost/kamailio52/48/0x106853338
...
0(4149) DEBUG:  [core/sr_module.c:896]: init_mod(): presence_xml
 0(4149) DEBUG: presence_xml [presence_xml.c:159]: mod_init(): 
db_url=mysql://kamailio:kamailiorw@localhost/kamailio/46/0x1079a7d64
...
 0(4149) DEBUG: db_mysql [km_my_con.c:108]: db_mysql_new_connection(): opening 
connection: mysql://:@localhost/kamailio
 0(4149) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver 
error: Unknown database 'kamailio'
 0(4149) ERROR:  [db.c:319]: db_do_init2(): could not add connection to 
the pool 0(4149) ERROR: presence_xml [presence_xml.c:214]: mod_init(): while 
connecting to database
 0(4149) ERROR:  [core/sr_module.c:899]: init_mod(): Error while 
initializing module presence_xml 
(/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so)
ERROR: error while initializing modules
```
I set presence_xml db_url only. But why presence db_url be set? And 
presence_xml db_url still is the default value.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1809#issuecomment-453796536___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:c47c759e: cnxcc: updated the export signature of set_max_credit() to kemi

2019-01-12 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: c47c759e6f59ec674c9c83a9e38d2620c36323c8
URL: 
https://github.com/kamailio/kamailio/commit/c47c759e6f59ec674c9c83a9e38d2620c36323c8

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2019-01-12T18:15:28+01:00

cnxcc: updated the export signature of set_max_credit() to kemi

- affected by last addition with connection cost

---

Modified: src/modules/cnxcc/cnxcc_mod.c

---

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

---

diff --git a/src/modules/cnxcc/cnxcc_mod.c b/src/modules/cnxcc/cnxcc_mod.c
index d1a7c17076..55d9bf00a1 100644
--- a/src/modules/cnxcc/cnxcc_mod.c
+++ b/src/modules/cnxcc/cnxcc_mod.c
@@ -2127,7 +2127,7 @@ static sr_kemi_t sr_kemi_cnxcc_exports[] = {
{ str_init("cnxcc"), str_init("set_max_credit"),
SR_KEMIP_INT, ki_set_max_credit,
{ SR_KEMIP_STR, SR_KEMIP_STR, SR_KEMIP_STR,
-   SR_KEMIP_INT, SR_KEMIP_INT, SR_KEMIP_NONE }
+   SR_KEMIP_STR, SR_KEMIP_INT, SR_KEMIP_INT }
},
{ str_init("cnxcc"), str_init("set_max_time"),
SR_KEMIP_INT, ki_set_max_time,


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] presence_xml db_url param can not set (#1809)

2019-01-12 Thread Cui Gang
### Description
I'm testing the presence feature, on branch 5.2 last version 1e56e4d .
modparam("presence_xml", "db_url", DBURL)
Can not set db_url of the presence_xml correct value. presence_xml db_url 
always the default value(DEFAULT_DB_URL). The same way, presence db_url is 
right.

 Debugging Data
presence.cfg file:
```
debug=3
#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio52"

/* set paths to location of modules */
mpath="/usr/local/kamailio/lib64/kamailio/modules/"

loadmodule "db_mysql.so"
loadmodule "tm.so"
loadmodule "sl.so"

loadmodule "presence.so"
loadmodule "presence_xml.so"

modparam("presence", "db_url", DBURL)

modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "integrated_xcap_server", 1)

request_route {
exit;
}
```

 Log Messages

```
0(76822) DEBUG:  [core/sr_module.c:896]: init_mod(): presence
 0(76822) DEBUG: presence [presence.c:282]: mod_init(): 
db_url=mysql://kamailio:kamailiorw@localhost/kamailio52/48/0x102b9e860

0(76822) DEBUG:  [core/sr_module.c:896]: init_mod(): presence_xml
 0(76822) DEBUG: presence_xml [presence_xml.c:159]: mod_init(): 
db_url=mysql://kamailio:kamailiorw@localhost/kamailio/46/0x103cf2d64
...
 0(76822) DEBUG: presence_xml [add_events.c:139]: xml_add_events(): added 
'xcap-diff' event to presence module
 0(76822) DEBUG:  [core/sr_module.c:619]: find_mod_export_record(): found 
export of  in module db_mysql 
[/usr/local/kamailio/lib64/kamailio/modules/db_mysql.so]
 0(76822) DEBUG:  [db.c:210]: db_bind_mod(): using db bind api for 
db_mysql
 0(76822) DEBUG:  [db.c:315]: db_do_init2(): connection 0x102bac2e8 not 
found in pool
 0(76822) DEBUG: db_mysql [km_my_con.c:108]: db_mysql_new_connection(): opening 
connection: mysql://:@localhost/kamailio
 0(76822) ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver 
error: Unknown database 'kamailio'
 0(76822) ERROR:  [db.c:319]: db_do_init2(): could not add connection to 
the pool 0(76822) ERROR: presence_xml [presence_xml.c:214]: mod_init(): while 
connecting to database
 0(76822) ERROR:  [core/sr_module.c:899]: init_mod(): Error while 
initializing module presence_xml 
(/usr/local/kamailio/lib64/kamailio/modules/presence_xml.so)
ERROR: error while initializing modules

```

The correct db_url is #!define DBURL 
"mysql://kamailio:kamailiorw@localhost/kamailio52"
I don't know why presence_xml db_url always the default value in the source 
code DEFAULT_DB_URL.

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
version: kamailio 5.2.0 (x86_64/darwin) 1e56e4
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, 
TLSF_MALLOC, DBG_SR_MEMORY, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, 
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, select, kqueue.
id: 1e56e4
compiled on 23:15:49 Jan 12 2019 with gcc Configured with: 
--prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
 Apple LLVM version 10.0.0 (clang-1000.11.45.5) Target: 
x86_64-apple-darwin18.2.0 Thread model: posix InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
```

* **Operating System**:

```
MacOS
```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1809___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:77316f75: phonenum: fixing documentation typo (#1807)

2019-01-12 Thread Henning Westerholt
Module: kamailio
Branch: master
Commit: 77316f7567e0bbabcc7897969b68fdf64432d645
URL: 
https://github.com/kamailio/kamailio/commit/77316f7567e0bbabcc7897969b68fdf64432d645

Author: Rick 
Committer: Henning Westerholt 
Date: 2019-01-11T16:00:55+01:00

phonenum: fixing documentation typo (#1807)

---

Modified: src/modules/phonenum/doc/phonenum_admin.xml

---

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

---

diff --git a/src/modules/phonenum/doc/phonenum_admin.xml 
b/src/modules/phonenum/doc/phonenum_admin.xml
index ab62660ccf..402edfdb60 100644
--- a/src/modules/phonenum/doc/phonenum_admin.xml
+++ b/src/modules/phonenum/doc/phonenum_admin.xml
@@ -124,7 +124,7 @@ if(phonenum_match("1-484-555-", "src")) {



-   phonenum_match(num, cnc, 
pvc)
+   phonenum_match_cn(num, cnc, 
pvc)


Match num against the libphonenumber and set the 
attributes inside


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev