[SR-Users] comma as param.count delimiter produces parse error

2017-01-12 Thread Juha Heinanen
Parameter list transformation param.count produces parse error when
delimiter is comma (,) character.

From document:

  {param.value,name[, delimiter]}

  'delimiter' allows you to specify a single character to use as the
  parameter delimiter. For example, when parsing HTTP URL query strings
  use '&'.

When I have in config statement:

$var(count) = $(var(servers){param.count,,});

I get to syslog:

Jan 13 07:48:15 lohi sip-proxy[18000]: 0(18050) ERROR: pv [pv_trans.c:2645]: 
tr_parse_paramlist(): invalid separator in transformation: count,,}
Jan 13 07:48:15 lohi sip-proxy[18000]: 0(18050) ERROR:  
[core/pvapi.c:1629]: tr_lookup(): error parsing [{param.count,,}]
Jan 13 07:48:15 lohi sip-proxy[18000]: 0(18050) ERROR:  
[core/pvapi.c:1010]: pv_parse_spec2(): bad tr in pvar name "var"
Jan 13 07:48:15 lohi sip-proxy[18000]: 0(18050) ERROR:  
[core/pvapi.c:1036]: pv_parse_spec2(): invalid parsing in 
[$(var(servers){param.count,,})] at (4)
Jan 13 07:48:15 lohi sip-proxy[18000]: 0(18050) :  [core/cfg.y:3407]: 
yyerror_at(): parse error in config file /etc/sip-proxy/sip-proxy.cfg, line 
6426, column 19-48: Can't get from cache: $(var(servers){param.count,,})
Jan 13 07:48:15 lohi sip-proxy[18000]: ERROR: bad config file (1 errors)

-- Juha

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio not processing SIP TCP

2017-01-12 Thread Alex Balashov
I assume you have ruled out firewall? It's something that can nab even
experienced people:

# iptables -Ln

-- Alex

On Thu, Jan 12, 2017 at 03:25:27PM -0600, JR Richardson wrote:

> Hi All,
> 
> Just enabled SIP TCP on a homer capture server, I can see the SIP TCP
> Sessions on the server with ngrep, just like all the UDP traffic. I
> have Kamailio listening on TCP ports but its not capturing any TCP
> traffic.
> 
> kamailio.cfg:
> 
> #disable_tcp=yes
> listen=tcp:10.99.99.99:5060#monitor port
> listen=udp:10.99.99.99:5060   #monitor port
> 
> loadmodule "pv.so"
> loadmodule "db_mysql.so"
> loadmodule "sipcapture.so"
> loadmodule "textops.so"
> loadmodule "rtimer.so"
> loadmodule "xlog.so"
> loadmodule "sqlops.so"
> loadmodule "htable.so"
> loadmodule "sl.so"
> loadmodule "siputils.so"
> 
> 
> modparam("sipcapture", "capture_on", 1)
> modparam("sipcapture", "hep_capture_on", 0)
> modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
> modparam("sipcapture", "raw_interface", "eth1")
> modparam("sipcapture", "raw_ipip_capture_on", 0)
> modparam("sipcapture", "table_name", "sip_capture")
> modparam("sipcapture", "raw_sock_children", 4)
> modparam("sipcapture", "db_insert_mode", 0)
> modparam("sipcapture", "raw_moni_capture_on", 1)
> modparam("sipcapture", "promiscious_on", 1)
> modparam("sipcapture", "raw_moni_bpf_on", 1)
> modparam("sipcapture", "capture_node", "homer02")
> modparam("sipcapture", "authorization_column", "authorization")
> 
> 
> ## logging all INVITES top of the [route] block
> if (is_method("INVITE|REGISTER")) {
> xlog("L_INFO", "Received INVITE \"$fU\" to \"$rU\"
> from \"$si\"\n");
> 
> Logging reports all SIP UDP traffic to logs fine, but no TCP traffic.
> 
> root@homer02:~# netstat -al
> Active Internet connections (servers and established)
> Proto Recv-Q Send-Q Local Address   Foreign Address State
> tcp0  0 homer02.me.com:sip*:* LISTEN
> 
> 
> I don't think this is a homer issue because logging invites is prior
> to any homer processing. I'm thinking this is something simple I'm
> overlooking, any help is much appreciated.
> 
> Thanks.
> 
> JR
> -- 
> JR Richardson
> Engineering for the Masses
> Chasing the Azeotrope
> 
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 (direct) / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] usrloc module with dbmode=2 does not insert records to database

2017-01-12 Thread Vik Killa
Hello,
we've noticed that the usrloc module does not "sync" all the records from
memory into the database.
I use a bash script to generate in-memory AoRs (
http://paste.debian.net/plain/908521)
then i perform
kamcmd ul.flush
and no records are inserted.
We have tried various usrloc parameters but none seem to work
Here is our basic setup

# - usrloc params -
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "timer_interval", 120)
modparam("usrloc", "timer_procs", 4)

We are using postgresql.
are we missing something?

Thanks
/V
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Kamailio not processing SIP TCP

2017-01-12 Thread JR Richardson
Hi All,

Just enabled SIP TCP on a homer capture server, I can see the SIP TCP
Sessions on the server with ngrep, just like all the UDP traffic. I
have Kamailio listening on TCP ports but its not capturing any TCP
traffic.

kamailio.cfg:

#disable_tcp=yes
listen=tcp:10.99.99.99:5060#monitor port
listen=udp:10.99.99.99:5060   #monitor port

loadmodule "pv.so"
loadmodule "db_mysql.so"
loadmodule "sipcapture.so"
loadmodule "textops.so"
loadmodule "rtimer.so"
loadmodule "xlog.so"
loadmodule "sqlops.so"
loadmodule "htable.so"
loadmodule "sl.so"
loadmodule "siputils.so"


modparam("sipcapture", "capture_on", 1)
modparam("sipcapture", "hep_capture_on", 0)
modparam("sipcapture", "raw_socket_listen", "10.99.99.99:5060-5070")
modparam("sipcapture", "raw_interface", "eth1")
modparam("sipcapture", "raw_ipip_capture_on", 0)
modparam("sipcapture", "table_name", "sip_capture")
modparam("sipcapture", "raw_sock_children", 4)
modparam("sipcapture", "db_insert_mode", 0)
modparam("sipcapture", "raw_moni_capture_on", 1)
modparam("sipcapture", "promiscious_on", 1)
modparam("sipcapture", "raw_moni_bpf_on", 1)
modparam("sipcapture", "capture_node", "homer02")
modparam("sipcapture", "authorization_column", "authorization")


## logging all INVITES top of the [route] block
if (is_method("INVITE|REGISTER")) {
xlog("L_INFO", "Received INVITE \"$fU\" to \"$rU\"
from \"$si\"\n");

Logging reports all SIP UDP traffic to logs fine, but no TCP traffic.

root@homer02:~# netstat -al
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 homer02.me.com:sip*:* LISTEN


I don't think this is a homer issue because logging invites is prior
to any homer processing. I'm thinking this is something simple I'm
overlooking, any help is much appreciated.

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses
Chasing the Azeotrope

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] dbtext module issue

2017-01-12 Thread Satish Patel
I am trying use dbtext module instead of mysql and following is my
configuration. We are using old SER version because of custom written
module. Do you think following config looks good.

# -- permissions params --
modparam("permissions", "db_url", "dbtext:///etc/ser/dbtext")
modparam("permissions", "db_mode", 0)
modparam("permissions", "trusted_table", "trusted")


In function

if ( !allow_trusted() &&
!search ("^User-Agent:.*Some Perl client.*") ) {
xlog("L_WARN", "Drop if User-Agent isn't Perl client");
drop;
break;
 };


My dbtest contents

$ cat /etc/ser/dbtext/trusted
src_ip(str) proto(str) from_pattern(str)
10.0.2.20:any:.*


When i run ser in fork=no mode i am seeing following

ser -f ser.cfg

Content of result
table_version(int)
2

 Content of [trusted]
src_ip(str) proto(str) from_pattern(str)
10.0.2.20:any:.*

Content of result
proto(str) from_pattern(str)
"any" ".* "

Content of result
proto(str) from_pattern(str)
"any" ".* "


it look like it read dbtext file and load data but when i use sipp to
generate some call then i am seeing following result only, that means
its not loading IP address from table, why its extracting two field
but not src_ip ?

Content of result
proto(str) from_pattern(str)
"any" ".* "

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Remove/Append headers in 200 canceling and 200 ok to BYE

2017-01-12 Thread Diego Nadares
Hi Daniel!

Thanks for your answer.  The idea is to show only a few headers. In BYE
works great. I'm removing and adding the following hdrs:

*User-Agent: Kamailio. <---I will try what you said*
*Supported:.*
*Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.*
*Accept: application/sdp, application/gtd.*

For example in following messages ( Kamailio is 172.16.213.38)

#
U 2017/01/12 14:51:10.593782 172.16.200.159:57270 -> 172.16.213.38:5060
BYE sip:127.0.0.8:5060;line=sr-9879879879798** SIP/2.0.
Via: SIP/2.0/UDP  172.16.200.159:5060;branch=z9hG4bK12B9605ED.
From: xx ;tag=95E7E4A4-23F2.
To: xxx ;tag=SDmmb7201-as0518eb07.
Date: Thu, 12 Jan 2017 17:51:05 GMT.
Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1.
User-Agent: Cisco-SIPGateway/IOS-12.x.
Max-Forwards: 15.
Route: .
Timestamp: 1484243470.
CSeq: 101 BYE.
Reason: Q.850;cause=16.
Content-Disposition: signal;handling=optional.
Content-Type: application/gtd.
Content-Length: 26.
.
.
.

#
U 2017/01/12 14:51:10.647164 172.16.213.38:5060 -> 172.16.50.41:5060
BYE sip:xxx@172.16.50.41:5060;transport=udp SIP/2.0.
Via: SIP/2.0/UDP
172.16.213.38;branch=z9hG4bKdcf6.f898feef02d601e36a22d26bf3ae5e4a.0.
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-asdfasdfF.
From: xx ;tag=95E7E4A4-23F2.
To: xxx ;tag=SDmmb7201-as0518eb07.
Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1.
Max-Forwards: 14.
CSeq: 101 BYE.
Content-Type: application/gtd.
Content-Length: 26.
*User-Agent: Kamailio.*
*Supported:.*
*Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, NOTIFY, INFO.*
*Accept: application/sdp, application/gtd.*
.
..

But in ok I can't

#
U 2017/01/12 14:51:10.653701 172.16.50.41:5060 -> 172.16.213.38:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP
172.16.213.38;branch=z9hG4bKdcf6.f898feef02d601e36a22d26bf3ae5e4a.0.
Via: SIP/2.0/UDP 127.0.0.8;branch=z9hG4bKsr-sadfasdf.
From: xx ;tag=95E7E4A4-23F2.
To: xxx ;tag=SDmmb7201-as0518eb07.
Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1.
CSeq: 101 BYE.
Server: Asterisk PBX 11.17.0.
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE.
Supported: replaces, timer.
Content-Length: 0.
.
FY, INFO.
Accept
#
U 2017/01/12 14:51:10.669460 172.16.213.38:5060 -> 172.16.200.159:5060
SIP/2.0 200 OK.
Via: SIP/2.0/UDP  172.16.200.159:5060;branch=z9hG4bK12B9605ED.
From: xx ;tag=95E7E4A4-23F2.
To: xxx ;tag=SDmmb7201-as0518eb07.
Call-ID: SDmmb7201-f5ded6cf4cd5d84736b088e39277e8db-c540dl1.
CSeq: 101 BYE.
*Server: Asterisk PBX 11.17.0.*
*Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH, MESSAGE.*
*Supported: replaces, timer.*
Content-Length: 0.
.



2017-01-12 13:23 GMT-03:00 Daniel-Constantin Mierla :

> Hello,
>
> if you are looking to remove the server header (server signature), that
> can be controlled via global parameters:
>
>   - https://www.kamailio.org/wiki/cookbooks/4.4.x/core#server_header
>
> Note that there is another header, User-Agent, that may be added by
> Kamailio in local generate request. There is a global parameter to control
> it as well.
> If you want more than that, can you add a bit more details, because CANCEL
> and BYE are processed differently. With which one you get issues?
>
> Cheers,
> Daniel
>
>
> On 12/01/2017 17:00, Diego Nadares wrote:
>
> Hi List,
>
> I'm trying to add and remove some headers in 200 canceling and 200 ok to
> BYEs with no success.
>
> I don't know in which route to add my remove_hf and append_hf. It seems
> that I can't catch it on reply either on request route.
>
> I tried adding it in
>
> event_route[tm:local-response] {
> xlog("L_ERR", "TM LOCAL REPONSE!");
> route(MANAGE_HEADERS);
> }
>
> This is my route to manage hdrs:
>
> route[MANAGE_HEADERS]{
>
> xlog("L_ERR", "MANAGE HDRS !");
>
> keep_hf("TH"); # for topoh
>
> append("AHDR1:asdf\r\n");
>
> return;
> }
>
> I suppose SERVER HDR should be removed but:
>
> U 2017/01/12 12:45:41.566733 172.16.213.38:5060 -> 172.16.50.41:5060
> SIP/2.0 200 canceling.
> Via: SIP/2.0/UDP 172.16.50.41:5060;branch=z9hG4bKgg8ekd3080braugkm700.1.
> CSeq: 102 CANCEL.
> From: ;tag=SD7b10b01-as5ba5e269.
> To: ;tag=4a86e96addfb27a943bc86e1872032b6-0a8b.
> Call-ID: SD7b10b01-6a7d1089793bda79481f25cf88c023ed-c540dl1.
> Server: kamailio (4.4.4 (x86_64/linux)).
> Content-Length: 0.
>
>
> Any help will be very appreciated.
>
> Thanks in advance!
>
> Diego
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-u

Re: [SR-Users] Remove/Append headers in 200 canceling and 200 ok to BYE

2017-01-12 Thread Daniel-Constantin Mierla
Hello,

if you are looking to remove the server header (server signature), that
can be controlled via global parameters:

  - https://www.kamailio.org/wiki/cookbooks/4.4.x/core#server_header

Note that there is another header, User-Agent, that may be added by
Kamailio in local generate request. There is a global parameter to
control it as well.

If you want more than that, can you add a bit more details, because
CANCEL and BYE are processed differently. With which one you get issues?

Cheers,
Daniel

On 12/01/2017 17:00, Diego Nadares wrote:
> Hi List,
>
> I'm trying to add and remove some headers in 200 canceling and 200 ok
> to BYEs with no success.
>
> I don't know in which route to add my remove_hf and append_hf. It
> seems that I can't catch it on reply either on request route.
>
> I tried adding it in 
>
> event_route[tm:local-response] {
> xlog("L_ERR", "TM LOCAL REPONSE!");
> route(MANAGE_HEADERS);
> }
>
> This is my route to manage hdrs:
>
> route[MANAGE_HEADERS]{
>
> xlog("L_ERR", "MANAGE HDRS !");
>
> keep_hf("TH"); # for topoh
>
> append("AHDR1:asdf\r\n");
>
> return;
> }
>
> I suppose SERVER HDR should be removed but:
>
> U 2017/01/12 12:45:41.566733 172.16.213.38:5060
>  -> 172.16.50.41:5060
> 
> SIP/2.0 200 canceling.
> Via: SIP/2.0/UDP 172.16.50.41:5060;branch=z9hG4bKgg8ekd3080braugkm700.1.
> CSeq: 102 CANCEL.
> From:  >;tag=SD7b10b01-as5ba5e269.
> To:  >;tag=4a86e96addfb27a943bc86e1872032b6-0a8b.
> Call-ID: SD7b10b01-6a7d1089793bda79481f25cf88c023ed-c540dl1.
> Server: kamailio (4.4.4 (x86_64/linux)).
> Content-Length: 0.
>
>
> Any help will be very appreciated.
>
> Thanks in advance!
>
> Diego
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Remove/Append headers in 200 canceling and 200 ok to BYE

2017-01-12 Thread Diego Nadares
Hi List,

I'm trying to add and remove some headers in 200 canceling and 200 ok to
BYEs with no success.

I don't know in which route to add my remove_hf and append_hf. It seems
that I can't catch it on reply either on request route.

I tried adding it in

event_route[tm:local-response] {
xlog("L_ERR", "TM LOCAL REPONSE!");
route(MANAGE_HEADERS);
}

This is my route to manage hdrs:

route[MANAGE_HEADERS]{

xlog("L_ERR", "MANAGE HDRS !");

keep_hf("TH"); # for topoh

append("AHDR1:asdf\r\n");

return;
}

I suppose SERVER HDR should be removed but:

U 2017/01/12 12:45:41.566733 172.16.213.38:5060 -> 172.16.50.41:5060
SIP/2.0 200 canceling.
Via: SIP/2.0/UDP 172.16.50.41:5060;branch=z9hG4bKgg8ekd3080braugkm700.1.
CSeq: 102 CANCEL.
From: ;tag=SD7b10b01-as5ba5e269.
To: ;tag=4a86e96addfb27a943bc86e1872032b6-0a8b.
Call-ID: SD7b10b01-6a7d1089793bda79481f25cf88c023ed-c540dl1.
Server: kamailio (4.4.4 (x86_64/linux)).
Content-Length: 0.


Any help will be very appreciated.

Thanks in advance!

Diego
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] C++ module

2017-01-12 Thread Daniel-Constantin Mierla
Welcome!

Daniel


On 12/01/2017 12:26, Patrick wrote:
> Ahhh... looks like it was the 'LIBS+=' in the internal LIB Makefile
> Thanks for the help!
>
> Pat
>
> include ../../Makefile.defs
>
> CC=/opt/rh/devtoolset-4/root/usr/bin/g++
> CXX=/opt/rh/devtoolset-4/root/usr/bin/g++
> LD=/opt/rh/devtoolset-4/root/usr/bin/g++
> auto_gen=
> NAME:=rtctrace
> MAJOR_VER=1
> MINOR_VER=0
> BUGFIX_VER=0
>
> BOOST_DIR = ${COL_LOCAL_BUILDS_ROOT}/ExternalLibs/boost/V1.60.0_22
> RTC_COMMON_DIR = ${COL_LOCAL_BUILDS_ROOT}/RTC/Common/2.0.0_247/
>
> C_INCLUDES+=-I${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/include 
> DEFS+=-std=c++0x
> -I${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/include
> LIBS*+=*-L${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/lib
> -lrtccommon -L${BOOST_DIR}/Server_Linux26_x64_dts4_pic/lib
> -lboost_system -lboost_thread -lpthread
>
> include ../../Makefile.libs
>
> On Thu, Jan 12, 2017 at 5:56 AM, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Oh, incomplete typing: it was supposed to be: (to add your module)
>
> Can you paste here the content of the Makefile in your internal
> library?
>
> Cheers,
> Daniel
>
>
> On 12/01/2017 11:52, Patrick wrote:
>> I use a slightly modified version of
>> pkg/kamailio/rpm/kamailio.spec
>>
>> By "mode" if you mean in the compile flag -DRTC_COMMON_TRACE, I
>> update DEFS in each module that uses it the internal library
>> DEFS+=-DKAMAILIO_MOD_INTERFACE *-DRTC_COMMON_TRACE*
>>
>> ​If you were instead asking about including the module,m then yes
>> - I added that to the rpm spec:
>> %{_libdir}/kamailio/modules/db_arl.so​
>>
>>
>> On Thu, Jan 12, 2017 at 5:32 AM, Daniel-Constantin Mierla
>> mailto:mico...@gmail.com>> wrote:
>>
>> Hello,
>>
>> do you have your own rpm specs, or do you use an updated
>> version (to add your mode) of some spec in kamailio repository?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 11/01/2017 16:24, Patrick wrote:
>>> Hi Daniel, Thanks for the help
>>>
>>> Sort of. 
>>> The internal library seems to be compiled and linked each my
>>> module is compiled - this happens 2x, for %build and for
>>> %install of the RPM
>>> This doesn't seem to be a problem when the %build stage is
>>> executed:
>>>
>>>
>>> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOkbPI
>>> ...
>>> + make all quiet=verbose 'skip_modules=mysql jabber cpl-c
>>> avp_radius auth_radius group_radius uri_radius pa postgres
>>> osp tlsops unixodbc dbtext' cfg-target=//etc/kamailio/ 
>>> ...
>>> gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>>> -minline-all-stringops -falign-loops -ftree-vectorize
>>> -fno-strict-overflow -mtune=opteron -Wall  
>>>  -DNAME='"kamailio"' -DVERSION='"4.2.4"' -DARCH='"x86_64"'
>>> -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"'
>>> -D__CPU_x86_64 -D__OS_linux -DSER_VER=4002004
>>> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC
>>> -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP
>>> -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE
>>> -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR
>>> -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC -DMEM_JOIN_FREE
>>> -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS
>>> -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT
>>> -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
>>> -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
>>> -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
>>> -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
>>> -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
>>> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
>>>  -DKAMAILIO_MOD_INTERFACE -DRTC_COMMON_TRACE
>>> -DMOD_NAME='"db_arl"' -c db_arl_mod.c -o db_arl_mod.o -MMD -MP
>>> Makefile.defs defs skipped
>>> make[2]: `libsrdb2.so.1.0' is up to date.
>>> Makefile.defs defs skipped
>>> make[2]: `libsrdb1.so.1.0' is up to date.
>>> Makefile.defs defs skipped
>>> make[2]: `librtctrace.so.1.0' is up to date.
>>> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
>>> Compiling db_arl_base.cpp
>>> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>>> -minline-all-stringops -falign-loops -ftree-vectorize
>>> -fno-strict-overflow -mtune=opteron -Wall -Wno-write-strings
>>> -Wno-deprecated -Wno-unused-function -Wno-sign-compare
>>> -Wno-strict-aliasing  -I
>>> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/ -I
>>> ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align
>>> -m64 -minline-all-stringops -falign-loops -ftree-vectorize
>>> -fno-strict-overflow -mtune=opteron -

Re: [SR-Users] C++ module

2017-01-12 Thread Patrick
Ahhh... looks like it was the 'LIBS+=' in the internal LIB Makefile
Thanks for the help!

Pat

include ../../Makefile.defs

CC=/opt/rh/devtoolset-4/root/usr/bin/g++
CXX=/opt/rh/devtoolset-4/root/usr/bin/g++
LD=/opt/rh/devtoolset-4/root/usr/bin/g++
auto_gen=
NAME:=rtctrace
MAJOR_VER=1
MINOR_VER=0
BUGFIX_VER=0

BOOST_DIR = ${COL_LOCAL_BUILDS_ROOT}/ExternalLibs/boost/V1.60.0_22
RTC_COMMON_DIR = ${COL_LOCAL_BUILDS_ROOT}/RTC/Common/2.0.0_247/

C_INCLUDES+=-I${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/include
DEFS+=-std=c++0x -I${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/include
LIBS*+=*-L${RTC_COMMON_DIR}/Applications_rhel6_x64_dts4_pic/lib -lrtccommon
-L${BOOST_DIR}/Server_Linux26_x64_dts4_pic/lib -lboost_system
-lboost_thread -lpthread

include ../../Makefile.libs

On Thu, Jan 12, 2017 at 5:56 AM, Daniel-Constantin Mierla  wrote:

> Oh, incomplete typing: it was supposed to be: (to add your module)
> Can you paste here the content of the Makefile in your internal library?
>
> Cheers,
> Daniel
>
>
> On 12/01/2017 11:52, Patrick wrote:
>
> I use a slightly modified version of pkg/kamailio/rpm/kamailio.spec
>
> By "mode" if you mean in the compile flag -DRTC_COMMON_TRACE, I update
> DEFS in each module that uses it the internal library
> DEFS+=-DKAMAILIO_MOD_INTERFACE *-DRTC_COMMON_TRACE*
>
> ​If you were instead asking about including the module,m then yes - I
> added that to the rpm spec:
> %{_libdir}/kamailio/modules/db_arl.so​
>
>
> On Thu, Jan 12, 2017 at 5:32 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> do you have your own rpm specs, or do you use an updated version (to add
>> your mode) of some spec in kamailio repository?
>>
>> Cheers,
>> Daniel
>>
>> On 11/01/2017 16:24, Patrick wrote:
>>
>> Hi Daniel, Thanks for the help
>>
>> Sort of.
>> The internal library seems to be compiled and linked each my module is
>> compiled - this happens 2x, for %build and for %install of the RPM
>> This doesn't seem to be a problem when the %build stage is executed:
>>
>>
>> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOkbPI
>> ...
>> + make all quiet=verbose 'skip_modules=mysql jabber cpl-c avp_radius
>> auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc dbtext'
>> cfg-target=//etc/kamailio/
>> ...
>> gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow
>> -mtune=opteron -Wall-DNAME='"kamailio"' -DVERSION='"4.2.4"'
>> -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc
>> 4.4.7"' -D__CPU_x86_64 -D__OS_linux -DSER_VER=4002004
>> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
>> -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
>> -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR
>> -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS
>> -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK
>> -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
>> -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
>> -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
>> -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
>> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT  -DKAMAILIO_MOD_INTERFACE
>> -DRTC_COMMON_TRACE -DMOD_NAME='"db_arl"' -c db_arl_mod.c -o db_arl_mod.o
>> -MMD -MP
>> Makefile.defs defs skipped
>> make[2]: `libsrdb2.so.1.0' is up to date.
>> Makefile.defs defs skipped
>> make[2]: `libsrdb1.so.1.0' is up to date.
>> Makefile.defs defs skipped
>> make[2]: `librtctrace.so.1.0' is up to date.
>> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
>> Compiling db_arl_base.cpp
>> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow
>> -mtune=opteron -Wall -Wno-write-strings -Wno-deprecated
>> -Wno-unused-function -Wno-sign-compare -Wno-strict-aliasing  -I
>> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/ -I
>> ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow
>> -mtune=opteron -Wall  -DNAME='"kamailio"' -DVERSION='"4.2.4"'
>> -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc
>> 4.4.7"' -D__CPU_x86_64 -D__OS_linux -DSER_VER=4002004
>> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
>> -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
>> -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR
>> -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS
>> -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK
>> -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
>> -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
>> -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM

Re: [SR-Users] C++ module

2017-01-12 Thread Daniel-Constantin Mierla
Oh, incomplete typing: it was supposed to be: (to add your module)

Can you paste here the content of the Makefile in your internal library?

Cheers,
Daniel

On 12/01/2017 11:52, Patrick wrote:
> I use a slightly modified version of pkg/kamailio/rpm/kamailio.spec
>
> By "mode" if you mean in the compile flag -DRTC_COMMON_TRACE, I update
> DEFS in each module that uses it the internal library
> DEFS+=-DKAMAILIO_MOD_INTERFACE *-DRTC_COMMON_TRACE*
>
> ​If you were instead asking about including the module,m then yes - I
> added that to the rpm spec:
> %{_libdir}/kamailio/modules/db_arl.so​
>
>
> On Thu, Jan 12, 2017 at 5:32 AM, Daniel-Constantin Mierla
> mailto:mico...@gmail.com>> wrote:
>
> Hello,
>
> do you have your own rpm specs, or do you use an updated version
> (to add your mode) of some spec in kamailio repository?
>
> Cheers,
> Daniel
>
>
> On 11/01/2017 16:24, Patrick wrote:
>> Hi Daniel, Thanks for the help
>>
>> Sort of. 
>> The internal library seems to be compiled and linked each my
>> module is compiled - this happens 2x, for %build and for %install
>> of the RPM
>> This doesn't seem to be a problem when the %build stage is executed:
>>
>>
>> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOkbPI
>> ...
>> + make all quiet=verbose 'skip_modules=mysql jabber cpl-c
>> avp_radius auth_radius group_radius uri_radius pa postgres osp
>> tlsops unixodbc dbtext' cfg-target=//etc/kamailio/ 
>> ...
>> gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize
>> -fno-strict-overflow -mtune=opteron -Wall-DNAME='"kamailio"'
>> -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
>> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64
>> -D__OS_linux -DSER_VER=4002004
>> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM
>> -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
>> -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
>> -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC
>> -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS
>> -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT
>> -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
>> -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN
>> -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
>> -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
>> -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
>> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
>>  -DKAMAILIO_MOD_INTERFACE -DRTC_COMMON_TRACE
>> -DMOD_NAME='"db_arl"' -c db_arl_mod.c -o db_arl_mod.o -MMD -MP
>> Makefile.defs defs skipped
>> make[2]: `libsrdb2.so.1.0' is up to date.
>> Makefile.defs defs skipped
>> make[2]: `libsrdb1.so.1.0' is up to date.
>> Makefile.defs defs skipped
>> make[2]: `librtctrace.so.1.0' is up to date.
>> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
>> Compiling db_arl_base.cpp
>> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize
>> -fno-strict-overflow -mtune=opteron -Wall -Wno-write-strings
>> -Wno-deprecated -Wno-unused-function -Wno-sign-compare
>> -Wno-strict-aliasing  -I
>> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/ -I
>> ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
>> -minline-all-stringops -falign-loops -ftree-vectorize
>> -fno-strict-overflow -mtune=opteron -Wall  -DNAME='"kamailio"'
>> -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
>> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64
>> -D__OS_linux -DSER_VER=4002004
>> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM
>> -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
>> -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
>> -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC
>> -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS
>> -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT
>> -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
>> -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN
>> -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL
>> -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER
>> -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
>> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
>>  -DKAMAILIO_MOD_INTERFACE -DRTC_COMMON_TRACE
>> -DMOD_NAME='"db_arl"' -c db_arl_base.cpp -o db_arl_base.o
>> db_arl_base.cpp: In function 'std::string convert_value(int,
>> const db_val_t*)':
>> db_arl_base.cpp:789: warning: enumeration value 'DB1_UNKNOWN' not
>> handled in switch
>> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
>> Compiling jsoncpp-dist/jsoncpp.cpp
>> g++ -fPIC -DPIC -g -funr

Re: [SR-Users] C++ module

2017-01-12 Thread Patrick
I use a slightly modified version of pkg/kamailio/rpm/kamailio.spec

By "mode" if you mean in the compile flag -DRTC_COMMON_TRACE, I update DEFS
in each module that uses it the internal library
DEFS+=-DKAMAILIO_MOD_INTERFACE *-DRTC_COMMON_TRACE*

​If you were instead asking about including the module,m then yes - I added
that to the rpm spec:
%{_libdir}/kamailio/modules/db_arl.so​


On Thu, Jan 12, 2017 at 5:32 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> do you have your own rpm specs, or do you use an updated version (to add
> your mode) of some spec in kamailio repository?
>
> Cheers,
> Daniel
>
> On 11/01/2017 16:24, Patrick wrote:
>
> Hi Daniel, Thanks for the help
>
> Sort of.
> The internal library seems to be compiled and linked each my module is
> compiled - this happens 2x, for %build and for %install of the RPM
> This doesn't seem to be a problem when the %build stage is executed:
>
>
> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOkbPI
> ...
> + make all quiet=verbose 'skip_modules=mysql jabber cpl-c avp_radius
> auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc dbtext'
> cfg-target=//etc/kamailio/
> ...
> gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops
> -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=opteron -Wall
>  -DNAME='"kamailio"' -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64 -D__OS_linux
> -DSER_VER=4002004 -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC
> -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE
> -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST
> -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS
> -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT
> -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
> -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
> -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
> -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT  -DKAMAILIO_MOD_INTERFACE
> -DRTC_COMMON_TRACE -DMOD_NAME='"db_arl"' -c db_arl_mod.c -o db_arl_mod.o
> -MMD -MP
> Makefile.defs defs skipped
> make[2]: `libsrdb2.so.1.0' is up to date.
> Makefile.defs defs skipped
> make[2]: `libsrdb1.so.1.0' is up to date.
> Makefile.defs defs skipped
> make[2]: `librtctrace.so.1.0' is up to date.
> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
> Compiling db_arl_base.cpp
> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops
> -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=opteron -Wall
> -Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare
> -Wno-strict-aliasing  -I 
> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/
> -I ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow
> -mtune=opteron -Wall  -DNAME='"kamailio"' -DVERSION='"4.2.4"'
> -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc
> 4.4.7"' -D__CPU_x86_64 -D__OS_linux -DSER_VER=4002004
> -DCFG_DIR='"/usr/local/etc/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP
> -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES
> -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR
> -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS
> -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK
> -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM
> -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD
> -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
> -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT  -DKAMAILIO_MOD_INTERFACE
> -DRTC_COMMON_TRACE -DMOD_NAME='"db_arl"' -c db_arl_base.cpp -o db_arl_base.o
> db_arl_base.cpp: In function 'std::string convert_value(int, const
> db_val_t*)':
> db_arl_base.cpp:789: warning: enumeration value 'DB1_UNKNOWN' not handled
> in switch
> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
> Compiling jsoncpp-dist/jsoncpp.cpp
> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops
> -falign-loops -ftree-vectorize -fno-strict-overflow -mtune=opteron -Wall
> -Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare
> -Wno-strict-aliasing  -I 
> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/
> -I ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow
> -mtune=opteron -Wall  -DNAME='"kamailio"' -DVERSION='"4.2.4"'
> -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc
> 4.4.7"' -D__CPU_x86_64 -D__OS_linux -DSER_VER=4002004
> -DCFG_DIR='"/usr/local/etc/k

Re: [SR-Users] Difference between HTTP clients (utils.so vs http_client.so)

2017-01-12 Thread Daniel-Constantin Mierla
Just to add for general knowledge: in very complex situation when the
http modules in kamailio are not flexible enough, don't forget about
embedded interpreters. I used Lua in some cases during the past when I
need to do some http query not possible with native kamailio modules. I
guess python, perl, etc. have also very good http libs.

Cheers,
Daniel


On 10/01/2017 22:28, Joel Serrano | VOZELIA wrote:
> Thank you Daniel and Sergio for your replies.
>
> We will stick to http_client then :)
>
> Best, 
> Joel.
>
> - Original Message -
>> From: "Daniel-Constantin Mierla" 
>> To: "Kamailio (SER) - Users Mailing List" 
>> Sent: Tuesday, January 10, 2017 2:53:11 AM
>> Subject: Re: [SR-Users] Difference between HTTP clients (utils.so vs 
>> http_client.so)
>> Hello,
>>
>> utils' http query function is the old option (first implemented) that
>> could be used for http queries in kamaili.cfg. The http_client module
>> was added to replace the utils version, which should be removed over the
>> time. Also, http_client module offers more options for doing the http
>> queries, so it should be the recommended way to be used in configs nowadays.
>>
>> There is another http related module, respectively http_async_client
>> that targets async processing needs of http queries.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 06/01/2017 20:26, Joel Serrano | VOZELIA wrote:
>>> Hi all,
>>>
>>> Currently I see there are 2 http clients:
>>>
>>> utils.so --> http_query()
>>> http_client.so --> http_client_query()
>>>
>>> Any advice on which to use? Any pros/cons of using one over the other?
>>>
>>> Thanks,
>>> Joel.
>>> Este mensaje y, en su caso, los ficheros anexos son confidenciales,
>>> especialmente en lo que respecta a los datos personales, y se dirigen
>>> exclusivamente al destinatario referenciado.Les informamos que los datos
>>> contenidos en el presente mail, han sido facilitados por usted o recogidos 
>>> de
>>> Fuentes Accesibles al Público. Dicha información personal, será incluida en 
>>> un
>>> fichero bajo la responsabilidad de VOZELIA TELECOM S.L.Todos los ficheros 
>>> que
>>> trata nuestra empresa se encuentran debidamente inscritos ante la Agencia
>>> Española de Protección de Datos.Vd. Como propio interesado podrá ejercitar 
>>> sus
>>> derechos de Acceso, Cancelación, Rectificación u Oposición, en el mail:
>>> administrac...@vozelia.com o en la dirección Avenida de Manoteras 8 
>>> escalera 3
>>> 2ºB, 28050 Madrid.Tal y como establece la Ley Orgánica de Protección de 
>>> Datos
>>> 15/1999 de 13 de Diciembre.Para ejercer sus derechos desde Panama podrá 
>>> hacerlo
>>> en la dirección Vía Argentina, Edificio Mediteranean Loft. Panama.En caso
>>>  de no ser el destinatario y haya recibido este mensaje por error, 
>>> agradeceremos
>>>  que nos lo comunique inmediatamente al remitente sin difundir, almacenar o
>>>  copiar su contenido.La divulgación o el suministro, en todo o en parte, a
>>>  cualquier tercero, no podrá ser realizada sin el previo, expreso y escrito
>>>  consentimiento de VOZELIA TELECOM S.L. .
>>>
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>> --
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
> Este mensaje y, en su caso, los ficheros anexos son confidenciales, 
> especialmente en lo que respecta a los datos personales, y se dirigen 
> exclusivamente al destinatario referenciado.Les informamos que los datos 
> contenidos en el presente mail, han sido facilitados por usted o recogidos de 
> Fuentes Accesibles al Público. Dicha información personal, será incluida en 
> un fichero bajo la responsabilidad de VOZELIA TELECOM S.L.Todos los ficheros 
> que trata nuestra empresa se encuentran debidamente inscritos ante la Agencia 
> Española de Protección de Datos.Vd. Como propio interesado podrá ejercitar 
> sus derechos de Acceso, Cancelación, Rectificación u Oposición, en el mail: 
> administrac...@vozelia.com o en la dirección Avenida de Manoteras 8 escalera 
> 3 2ºB, 28050 Madrid.Tal y como establece la Ley Orgánica de Protección de 
> Datos 15/1999 de 13 de Diciembre.Para ejercer sus derechos desde Panama podrá 
> hacerlo en la dirección Vía Argentina, Edificio Mediteranean Loft. Panama.En 
> caso 
>  de no ser el destinatario y haya recibido este mensaje por error, 
> agradeceremos que nos lo comunique inmediatamente al remitente sin difundir, 
> almacenar o copiar su contenido.La divulgación o el suministro, en todo o en 
> parte, a cualquier tercero, no podrá ser realizada s

Re: [SR-Users] RPC exact command to change voicemail IP or Port

2017-01-12 Thread Daniel-Constantin Mierla
OK, no problem -- good that nothing needs to be fixed!

Cheers,
Daniel


On 11/01/2017 15:12, Annus Fictus wrote:
>
> Sorry, my mistake; I had not enabled #!define WITH_VOICEMAIL
>
> now:
>
> *kamcmd cfg.sets voicemail srv_ip "1.2.3.4"*
>
> No error, and:
>
> *kamcmd cfg.get voicemail srv_ip "1.2.3.4"*
> /1.2.3.4/
>
> Thank you very much.
>
> Regards
>
> El 11/01/2017 a las 08:50, Daniel-Constantin Mierla escribió:
>>
>> I tested and it works fine for me. Have you enabled that part of
>> config by defining WITH_VOICEMAIL?
>>
>> Here is the debug output:
>>
>> $ ./utils/kamctl/kamctl rpc cfg.sets voicemail srv_ip "1.2.3.4"
>>
>> 20(78364) DEBUG: jsonrpcs [jsonrpcs_fifo.c:445]:
>> jsonrpc_fifo_server(): preparing to execute fifo jsonrpc [{"jsonrpc":
>> "2.0", "method": "cfg.sets", "params": ["voicemail", "srv_ip",
>> "1.2.3.4"], "reply_name": "kamailio_receiver_78376", "id": 78376}]
>> 20(78364) INFO:  [core/cfg/cfg_ctx.c:615]: cfg_set_now(): INFO:
>> cfg_set_now(): voicemail.srv_ip has been changed to "1.2.3.4"
>> 20(78364) DEBUG: jsonrpcs [jsonrpcs_fifo.c:457]:
>> jsonrpc_fifo_server(): command executed - result:
>> [kamailio_receiver_78376] [200] [0x7fa543501660] [{
>> "jsonrpc":"2.0",
>> "result":{
>> },
>> "id":78376
>> }]
>> {
>>   "jsonrpc":  "2.0",
>>   "result": {
>>   },
>>   "id": 78376
>> }
>>
>> Cheers,
>> Daniel
>>
>>
>> On 10/01/2017 17:24, Daniel-Constantin Mierla wrote:
>>>
>>> Not much info there, I will have to reproduce it myself ...
>>>
>>> Cheers, Daniel
>>>
>>>
>>> On 10/01/2017 14:44, Annus Fictus wrote:

 Jan 10 08:41:31 sip10 /sbin/kamailio[5424]: DEBUG: ctl
 [../../io_wait.h:380]: io_watch_add(): DBG:
 io_watch_add(0x7fd2e37d4300, 10, 3, 0x2353100), fd_no=1
 Jan 10 08:41:31 sip10 /sbin/kamailio[5424]: DEBUG: ctl
 [io_listener.c:442]: handle_new_connect(): handle_stream read: new
 connection (1) on /var/run/kamailio//kamailio_ctl

 Thank you

 Raegards

 El 10/01/2017 a las 08:35, Daniel-Constantin Mierla escribió:
>
> Hello,
>
> can you provide the log messages when executing the command with
> debug=3 in kamailio.cfg?
>
> Cheers,
> Daniel
>
>
> On 10/01/2017 13:55, Annus Fictus wrote:
>>
>> Hi,
>>
>> kamcmd cfg.sets voicemail srv_ip "1.2.3.4"
>>
>> return
>>
>> *error: 400 - Failed to set the variable*
>>
>> Thank you
>>
>> Regards
>>
>> El 10/01/2017 a las 06:01, Daniel-Constantin Mierla escribió:
>>> kamcmd cfg.sets voicemail srv_ip "1.2.3.4"
>>
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> -- 
> Daniel-Constantin Mierla
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



 ___
 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
 sr-users@lists.sip-router.org
 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> -- 
>>> Daniel-Constantin Mierla
>>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>> -- 
>> Daniel-Constantin Mierla
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] C++ module

2017-01-12 Thread Daniel-Constantin Mierla
Hello,

do you have your own rpm specs, or do you use an updated version (to add
your mode) of some spec in kamailio repository?

Cheers,
Daniel


On 11/01/2017 16:24, Patrick wrote:
> Hi Daniel, Thanks for the help
>
> Sort of. 
> The internal library seems to be compiled and linked each my module is
> compiled - this happens 2x, for %build and for %install of the RPM
> This doesn't seem to be a problem when the %build stage is executed:
>
>
> Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EOkbPI
> ...
> + make all quiet=verbose 'skip_modules=mysql jabber cpl-c avp_radius
> auth_radius group_radius uri_radius pa postgres osp tlsops unixodbc
> dbtext' cfg-target=//etc/kamailio/ 
> ...
> gcc -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize
> -fno-strict-overflow -mtune=opteron -Wall-DNAME='"kamailio"'
> -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64
> -D__OS_linux -DSER_VER=4002004 -DCFG_DIR='"/usr/local/etc/kamailio/"'
> -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP
> -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
> -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC
> -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS
> -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2
> -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
> -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
> -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
>  -DKAMAILIO_MOD_INTERFACE -DRTC_COMMON_TRACE -DMOD_NAME='"db_arl"' -c
> db_arl_mod.c -o db_arl_mod.o -MMD -MP
> Makefile.defs defs skipped
> make[2]: `libsrdb2.so.1.0' is up to date.
> Makefile.defs defs skipped
> make[2]: `libsrdb1.so.1.0' is up to date.
> Makefile.defs defs skipped
> make[2]: `librtctrace.so.1.0' is up to date.
> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
> Compiling db_arl_base.cpp
> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize
> -fno-strict-overflow -mtune=opteron -Wall -Wno-write-strings
> -Wno-deprecated -Wno-unused-function -Wno-sign-compare
> -Wno-strict-aliasing  -I
> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/ -I
> ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize
> -fno-strict-overflow -mtune=opteron -Wall  -DNAME='"kamailio"'
> -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64
> -D__OS_linux -DSER_VER=4002004 -DCFG_DIR='"/usr/local/etc/kamailio/"'
> -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP
> -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
> -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC
> -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS
> -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2
> -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL
> -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM
> -DHAVE_SCHED_SETSCHEDULER -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT
> -DSIGINFO64_WORKARROUND -DUSE_FUTEX -DHAVE_SELECT
>  -DKAMAILIO_MOD_INTERFACE -DRTC_COMMON_TRACE -DMOD_NAME='"db_arl"' -c
> db_arl_base.cpp -o db_arl_base.o
> db_arl_base.cpp: In function 'std::string convert_value(int, const
> db_val_t*)':
> db_arl_base.cpp:789: warning: enumeration value 'DB1_UNKNOWN' not
> handled in switch
> COL_LOCAL_BUILDS_ROOT=/home/pshea/_localbuilds/
> Compiling jsoncpp-dist/jsoncpp.cpp
> g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize
> -fno-strict-overflow -mtune=opteron -Wall -Wno-write-strings
> -Wno-deprecated -Wno-unused-function -Wno-sign-compare
> -Wno-strict-aliasing  -I
> /home/pshea/_localbuilds//ExternalLibs/boost/V1.60.0_27/ -I
> ./jsoncpp-dist/ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64
> -minline-all-stringops -falign-loops -ftree-vectorize
> -fno-strict-overflow -mtune=opteron -Wall  -DNAME='"kamailio"'
> -DVERSION='"4.2.4"' -DARCH='"x86_64"' -DOS='linux_'
> -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 4.4.7"' -D__CPU_x86_64
> -D__OS_linux -DSER_VER=4002004 -DCFG_DIR='"/usr/local/etc/kamailio/"'
> -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP
> -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
> -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DF_MALLOC -DDBG_F_MALLOC
> -DMEM_JOIN_FREE -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS
> -DMALLOC_STATS -DWITH_AS_SUPPORT -DFAST_LOCK -DADAPTIVE_WAIT
> -DADAPTIVE_WAIT_LOOPS=1024 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2
> -DHAVE_UNION_SEMUN -DHAVE_SCH

Re: [SR-Users] how to immediately close a tls connection

2017-01-12 Thread Daniel-Constantin Mierla
Hello,

you can look at some functions that close the tcp connection, among them:

  - set_reply_close() from core

  - ws_close() from websocket module

Cheers,
Daniel


On 12/01/2017 01:16, Andy wrote:
> from c code
>
>
>
> --
> View this message in context: 
> http://sip-router.1086192.n5.nabble.com/how-to-immediately-close-a-tls-connection-tp154630p154909.html
> Sent from the Users mailing list archive at Nabble.com.
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com


___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users