Re: [SR-Users] prefix_route and db_cluster not working

2016-10-12 Thread Martin Nyström
Hi Daniel,

So the solution is basically to wait for the DB APIv1 implementation in 
prefix_route?




Martin Nyström | Connectel
Direct:   +46 10 180 00 07
Support:+46 771 12 12 10
Web:  www.connectel.se

From: Daniel-Constantin Mierla 
Reply-To: "mico...@gmail.com" 
Date: Monday 10 October 2016 at 13:26
To: "Kamailio (SER) - Users Mailing List" , 
Martin Nyström 
Subject: Re: [SR-Users] prefix_route and db_cluster not working


Hello,

the prefix_route module was written by SER guys, when Kamailio and SER were 
split projects, and it uses what we refer as DB APIv2 (specific for ser 
project), while db_cluster implements DB APIv1 (specific for kamailio project).

From my point of view, it will be easier to add support for DB APIv1 in 
prefix_route module than implementing DB APIv2 in db_cluster. I think there 
very few modules implementing DB APIv2 at this moment (maybe around 5) and 
perhaps they should get support for DB APIv1.

Cheers,
Daniel

On 10/10/16 10:05, Martin Nyström wrote:
Hi,

I have an issue when I am unable to get prefix_route to work together with 
db_cluster. If I set the db_url manually it works great, pointing it to a 
specific database. However we need the redundancy for this module.

Dispatcher uses the same cluster without any issues.

The following are my configuration sets:

# DB CLUSTER (db_cluster.inc)
loadmodule "db_cluster.so"

modparam("db_cluster", "connection", 
"KAMDB01=>mysql://kamailio:password123@192.168.55.10/kamailio")
modparam("db_cluster", "connection", 
"KAMDB02=>mysql://kamailio:password123@192.168.55.11/kamailio")

modparam("db_cluster", "cluster", "AccCluster=>KAMDB02=9s9s;KAMDB01=4s4s")
modparam("db_cluster", "cluster", "Settings=>KAMDB02=9s9s;KAMDB01=4s4s")

# KAMAILIO.CFG (kamailio.cfg)
# PREFIX ROUTE MODPARAM

loadmodule "prefix_route.so"
include_file "db_cluster.inc"
modparam("prefix_route", "db_url", "cluster://Settings")
modparam("prefix_route", "db_table", "prefix_route")
modparam("prefix_route", "exit", 1)


Syslog output:


Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:  
[db_cmd.c:122]: db_cmd(): DB driver cluster does not implement mandatory db_cmd 
function

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:  
[db_cmd.c:168]: db_cmd(): db_cmd: Cannot create db_cmd structure

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR: prefix_route 
[prefix_route.c:126]: pr_db_load(): prefix_route: db_load(): db_cmd() failed

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: : prefix_route 
[prefix_route.c:214]: mod_init(): prefix_route: db_load() failed

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:  
[sr_module.c:974]: init_mod(): Error while initializing module prefix_route 
(usr/local/lib64/kamailio/modules/prefix_route.so)

Oct 10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: INFO:  
[sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized


Ubuntu 14.04LTS
version: kamailio 4.3.6 (x86_64/linux) 105a17
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 
DBG_QM_MALLOC, USE_FUTEX, 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_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 105a17
compiled on 10:06:12 Oct  4 2016 with gcc 4.8.4


Thank you.




___

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

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Reload PIPILIMIT table from DB

2016-10-12 Thread Grant Bagdasarian
Hi Daniel,

I’m trying to get new pipes from the DB and their associated limits.
We’re using the SIP digest username as the pipe to limit the CPS.

I think I do have a workaround for this which is as following:

-  Use a htable to load the ‘pipes’ (usernames) and their config (limit 
+ algorithm) from the db

-  Use the plcheck function to pass in the username, algorithm and 
limit.

This would allow us to reload the htable from db when new users are created and 
the plcheck will make sure a new pipe is created when it does not exist by 
passing the three params.

Do you see any issues with this workaround?

Regards,

Grant

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of 
Daniel-Constantin Mierla
Sent: woensdag 12 oktober 2016 10:39
To: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] Reload PIPILIMIT table from DB


Hello,

On 11/10/16 15:07, Grant Bagdasarian wrote:
Hello,

Is it possible to live reload the pipelimit module so it gets new values from 
the DB without a restart of Kamailio?

I couldn’t find a command to do this.

no reload command at this moment. What do you want to update from db? Getting 
new pipes or setting new limits?

Cheers,
Daniel


--

Daniel-Constantin Mierla

http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] prefix_route and db_cluster not working

2016-10-12 Thread Daniel-Constantin Mierla
Hello,


On 11/10/16 15:56, Martin Nyström wrote:
>
> Hi Daniel,
>
>  
>
> So the solution is basically to wait for the DB APIv1 implementation
> in prefix_route?
>
yes. But I am not using the module and I am not aware of anyone working
on it, so not sure if this is going to happen very soon.

As alternative, it might be possible that you can replace it with mtree
+ calling route(NAME) after the mtree match in config.

Cheers,
Daniel

>  
>
>  
>
>  
>
>  
>
> Martin *Nyström* | Connectel
>
> *Direct:   *+46 10 180 00 07
>
> *Support:*+46 771 12 12 10
>
> *Web:*  www.connectel.se 
>
>  
>
> *From: *Daniel-Constantin Mierla 
> *Reply-To: *"mico...@gmail.com" 
> *Date: *Monday 10 October 2016 at 13:26
> *To: *"Kamailio (SER) - Users Mailing List"
> , Martin Nyström
> 
> *Subject: *Re: [SR-Users] prefix_route and db_cluster not working
>
>  
>
> Hello,
>
> the prefix_route module was written by SER guys, when Kamailio and SER
> were split projects, and it uses what we refer as DB APIv2 (specific
> for ser project), while db_cluster implements DB APIv1 (specific for
> kamailio project).
>
> From my point of view, it will be easier to add support for DB APIv1
> in prefix_route module than implementing DB APIv2 in db_cluster. I
> think there very few modules implementing DB APIv2 at this moment
> (maybe around 5) and perhaps they should get support for DB APIv1.
>
> Cheers,
> Daniel
>
>  
>
> On 10/10/16 10:05, Martin Nyström wrote:
>
> Hi,
>
>  
>
> I have an issue when I am unable to get prefix_route to work
> together with db_cluster. If I set the db_url manually it works
> great, pointing it to a specific database. However we need the
> redundancy for this module.
>
>  
>
> Dispatcher uses the same cluster without any issues.
>
>  
>
> The following are my configuration sets:
>
>  
>
> # DB CLUSTER (db_cluster.inc)
>
> loadmodule *"db_cluster.so"*
>
>  
>
> modparam(*"db_cluster"*, *"connection"*,
> *"KAMDB01=>mysql://kamailio:password123@192.168.55.10/kamailio
> "*)
>
> modparam(*"db_cluster"*, *"connection"*,
> *"KAMDB02=>mysql://kamailio:password123@192.168.55.11/kamailio
> "*)
>
>  
>
> modparam(*"db_cluster"*, *"cluster"*,
> *"AccCluster=>KAMDB02=9s9s;KAMDB01=4s4s"*)
>
> modparam(*"db_cluster"*, *"cluster"*,
> *"Settings=>KAMDB02=9s9s;KAMDB01=4s4s"*)
>
>  
>
> # KAMAILIO.CFG (kamailio.cfg)
>
> # PREFIX ROUTE MODPARAM
>
>  
>
> loadmodule "prefix_route.so"
>
> include_file "db_cluster.inc"
>
> modparam(*"prefix_route"*, *"db_url"*, *"cluster://Settings"*)
>
> modparam(*"prefix_route"*, *"db_table"*, *"prefix_route"*)
>
> modparam(*"prefix_route"*, *"exit"*, 1)
>
>  
>
>  
>
> Syslog output:
>
>  
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:
>  [db_cmd.c:122]: db_cmd(): DB driver cluster does not
> implement mandatory db_cmd function
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:
>  [db_cmd.c:168]: db_cmd(): db_cmd: Cannot create db_cmd
> structure
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:
> prefix_route [prefix_route.c:126]: pr_db_load(): prefix_route:
> db_load(): db_cmd() failed
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: :
> prefix_route [prefix_route.c:214]: mod_init(): prefix_route:
> db_load() failed
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: ERROR:
>  [sr_module.c:974]: init_mod(): Error *while*initializing
> module prefix_route (usr/local/lib64/kamailio/modules/prefix_route.so)
>
> Oct10 09:53:03 kamailio01 /usr/local/sbin/kamailio[5225]: INFO:
>  [sctp_core.c:53]: sctp_core_destroy(): SCTP API not initialized
>
>  
>
>  
>
> Ubuntu 14.04LTS
>
> version: kamailio 4.3.6 (x86_64/linux) 105a17
>
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS,
> USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM,
> SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
> 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_LISTEN
> 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>
> id: 105a17
>
> compiled on 10:06:12 Oct  4 2016 with gcc 4.8.4
>
>  
>
>  
>
> Thank you.
>
>
>
>
> ___
>
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>
> 

Re: [SR-Users] Reload PIPILIMIT table from DB

2016-10-12 Thread Daniel-Constantin Mierla
Hello,


On 11/10/16 15:07, Grant Bagdasarian wrote:
>
> Hello,
>
>  
>
> Is it possible to live reload the pipelimit module so it gets new
> values from the DB without a restart of Kamailio?
>
>  
>
> I couldn’t find a command to do this.
>

no reload command at this moment. What do you want to update from db?
Getting new pipes or setting new limits?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Accounting CDR generation

2016-10-12 Thread Daniel-Constantin Mierla
Which reply code do you want, from initial INVITE of the call?

Cheers,
Daniel

On 12/10/16 15:55, Ivan Dudko wrote:
> Thank you, Daniel!
>
> It's works via dlg_vars.
> But i can't write in acc_crds SIP reply code in same way.
>
> $dlg_var(sip_cause)=$rs;
>
> ср, 12 окт. 2016 г. в 17:33, Daniel-Constantin Mierla
> >:
>
> Hello,
>
> for acc_cdr you have to load the dialog module and track the
> active calls with it. It may require that you store in dlg vars
> the values you want inside acc_cdr.
>
> Cheers,
> Daniel
>
>
> On 11/10/16 13:08, Ivan Dudko wrote:
>> Hello!
>>
>> I am setting this in kamailio.cfg
>>
>> #!ifdef WITH_ACCDB
>> modparam("acc", "db_flag", FLT_ACC)
>> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
>> modparam("acc", "db_url", DBURL)
>> modparam("acc", "db_extra",
>> 
>> "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
>> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>>
>> modparam("acc", "cdr_enable", 1)
>> modparam("acc", "cdr_start_on_confirmed", 1)
>> modparam("acc", "cdrs_table", "acc_cdrs")
>> modparam("acc",
>> 
>> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
>> modparam("acc", "cdr_start_id", "start_time")
>> modparam("acc", "cdr_end_id", "end_time")
>> modparam("acc", "cdr_duration_id", "duration")
>> #!endif
>>
>> But in CDRs table ('acc_cdrs') field dst_user=$rU is always empty
>> if call is not completed with remote side answer.
>> But in accounting table ('acc') this field isn't empty.
>>
>> Is this behavior is correct?
>> I think it is not correct.
>>
>>
>>
>> ___
>> 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
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 
> http://www.asipto.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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Accounting CDR generation

2016-10-12 Thread Ivan Dudko
I want to write final SIP disconnect cause.

ср, 12 Окт 2016, 18:01 Daniel-Constantin Mierla :

> Which reply code do you want, from initial INVITE of the call?
> Cheers,
> Daniel
>
>
> On 12/10/16 15:55, Ivan Dudko wrote:
>
> Thank you, Daniel!
>
> It's works via dlg_vars.
> But i can't write in acc_crds SIP reply code in same way.
>
> $dlg_var(sip_cause)=$rs;
>
> ср, 12 окт. 2016 г. в 17:33, Daniel-Constantin Mierla :
>
> Hello,
>
> for acc_cdr you have to load the dialog module and track the active calls
> with it. It may require that you store in dlg vars the values you want
> inside acc_cdr.
>
> Cheers,
> Daniel
>
> On 11/10/16 13:08, Ivan Dudko wrote:
>
> Hello!
>
> I am setting this in kamailio.cfg
>
> #!ifdef WITH_ACCDB
> modparam("acc", "db_flag", FLT_ACC)
> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
> modparam("acc", "db_url", DBURL)
> modparam("acc", "db_extra",
> "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdrs_table", "acc_cdrs")
> modparam("acc",
> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
> modparam("acc", "cdr_start_id", "start_time")
> modparam("acc", "cdr_end_id", "end_time")
> modparam("acc", "cdr_duration_id", "duration")
> #!endif
>
> But in CDRs table ('acc_cdrs') field dst_user=$rU is always empty if call
> is not completed with remote side answer.
> But in accounting table ('acc') this field isn't empty.
>
> Is this behavior is correct?
> I think it is not correct.
>
>
>
> ___
> 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 Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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 Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] 420 Bad Extension error

2016-10-12 Thread Infinicalls Infinicalls
Hi,
 From the log files, I can see ..

Oct 12 14:43:06 infinicalls /usr/local/sbin/kamailio[13198]: INFO:
stun [kam_stun.c:169]: stun_parse_header(): INFO: stun_parse_header:
incomplete header of STUN message

I have modified the $du field now. Instead of taking values from
REGISTRARIP and REGISTRARPORT, it is now substituted with actual
values. I have also added outbound.so and stun.so to the registrar
config.

But, still this error persists.

Can you tell me how to solve this. Thanks.

regards
Ganesh Kumar


On 10/11/16, Daniel-Constantin Mierla  wrote:
> Hello,
>
> this is typically because the address in r-uri (or outbound proxy $du)
> cannot be resolved with the DNS server. Try to run with debug=3 in
> kamailio.cfg and look at the logs for hints about what happens.
>
> Cheers,
> Daniel
>
>
> On 07/10/16 10:48, Infinicalls Infinicalls wrote:
>> Hi Daniel,
>>  By pasting the following to the registrar config file, I stopped
>> getting Bad Extension error. And I am able to stay online. But while
>> dialing, it gives the "I am terribly sorry..." error.
>>
>> modparam("path", "use_received", 1)
>> modparam("registrar", "use_path", 1)
>> modparam("registrar", "path_mode", 1)
>> modparam("registrar", "path_use_received", 1)
>>
>> regards
>> Ganesh Kumar
>>
>>
>> On 10/7/16, Infinicalls Infinicalls  wrote:
>>> Hi Daniel,
>>> I am pasting a fresh REGISTER request and the error message here. The
>>> Proxy and Registrar config files are taken from
>>> http://kamailio.org/docs/modules/4.2.x/modules/outbound.html
>>>
>>>
>>> -
>>> root@infinicalls:~# ngrep -d any -qt -W byline . port 5060
>>> interface: any
>>> filter: (ip or ip6) and ( port 5060 )
>>> match: .
>>>
>>> U 2016/10/07 08:36:50.151818 52.233.25.164:5060 -> 10.0.0.4:5060
>>> REGISTER sip:infinicalls-proxy1.canadacentral.cloudapp.azure.com SIP/2.0.
>>> Via: SIP/2.0/UDP
>>> 10.1.0.4;branch=z9hG4bK8a33.416e8573670e015bec4d14051ceb68a8.0.
>>> Via: SIP/2.0/UDP
>>> 10.114.70.81:1330;received=113.193.151.1;rport=1330;branch=z9hG4bKPj832cd09f4be040e89dc5d9e8d17bc531.
>>> Max-Forwards: 69.
>>> From: "Balaji"
>>> ;tag=eda6c2494a0742b08f8fbe6254bfa385.
>>> To: "Balaji" .
>>> Call-ID: b2b13a3cfeab41228fd8127e18e5acef.
>>> CSeq: 26376 REGISTER.
>>> User-Agent: MicroSIP/3.12.3.
>>> Contact: "Balaji" .
>>> Expires: 300.
>>> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE,
>>> NOTIFY, REFER, MESSAGE, OPTIONS.
>>> Content-Length:  0.
>>> Path: .
>>> .
>>>
>>>
>>> U 2016/10/07 08:36:50.154628 10.0.0.4:5060 -> 52.233.25.164:5060
>>> SIP/2.0 420 Bad Extension.
>>> Via: SIP/2.0/UDP
>>> 10.1.0.4;branch=z9hG4bK8a33.416e8573670e015bec4d14051ceb68a8.0;received=52.233.25.164.
>>> Via: SIP/2.0/UDP
>>> 10.114.70.81:1330;received=113.193.151.1;rport=1330;branch=z9hG4bKPj832cd09f4be040e89dc5d9e8d17bc531.
>>> From: "Balaji"
>>> ;tag=eda6c2494a0742b08f8fbe6254bfa385.
>>> To: "Balaji"
>>> ;tag=b27e1a1d33761e85846fc98f5f3a7e58.0549.
>>> Call-ID: b2b13a3cfeab41228fd8127e18e5acef.
>>> CSeq: 26376 REGISTER.
>>> Contact: ;expires=300.
>>> Unsupported: path.
>>> Path: .
>>> Supported: outbound.
>>> P-Registrar-Error: No support for found Path indicated.
>>> Server: kamailio (4.4.3 (x86_64/linux)).
>>> Content-Length: 0.
>>> .
>>> -
>>>
>>> Kindly let me know what went wrong. Thanks.
>>>
>>> regards
>>> Ganesh Kumar
>>>
>>
>
> --
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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
>


-- 
---
http://www.infinicalls.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] Out of memory in UB 210: OOM killed process 12261 (kamailio) score 0 vm:1614768kB, rss:280200kB, swap:131408kB

2016-10-12 Thread Jurijs Ivolga
Hi Daniel,

Thank you a lot, it looks that issue is solved, after updating libcurl.

I was using following manual for updating libcurl, in case if somebody will
have same issue.

https://www.digitalocean.com/community/questions/how-to-upgrade-curl-in-centos6

With kind regards,

Jurijs

On Tue, Oct 11, 2016 at 2:43 PM, Jurijs Ivolga 
wrote:

> Hi Daniel,
>
> You are correct we are using heavily http_query.
>
> I found following bug report:
>
> https://bugs.centos.org/view.php?id=9391
>
> I will try to update to libcurl 7.44 and check if this help.
>
> Thank you a lot Daniel!
>
> With kind regards,
>
> Jurijs
>
> On Tue, Oct 11, 2016 at 10:55 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> from the logs, it seems to be related to curl library, I see many reports
>> like:
>>
>> ==16459== 189,318 bytes in 167 blocks are possibly lost in loss record
>> 681 of 683
>> ==16459==at 0x4C26FEF: calloc (vg_replace_malloc.c:711)
>> ==16459==by 0x104BB699: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104AA537: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104AB81E: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104B0B88: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104B77E1: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0xB71ABC9: ??? (in /usr/lib64/libnss3.so)
>> ==16459==by 0xB71AE62: PK11_CreateGenericObject (in
>> /usr/lib64/libnss3.so)
>> ==16459==by 0xA0674DF: ??? (in /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA067666: ??? (in /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA069141: ??? (in /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA0601C4: Curl_ssl_connect (in
>> /usr/lib64/libcurl.so.4.1.1)
>>
>> That's like almost 200KB lost in this report.
>>
>> From the list of the modules, I see you have utils and I guess you use
>> http query function from there, is it?
>>
>> Cheers,
>> Daniel
>>
>> On 10/10/16 12:06, Jurijs Ivolga wrote:
>>
>> Hi Daniel,
>>
>> I left valgrind running for little while, not sure if this will be enough.
>>
>> Please find attached log file.
>>
>> Thank you a lot for your help!
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Fri, Oct 7, 2016 at 7:15 PM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> that's the way it was done for older versions of kamailio.
>>>
>>> In master and 4.4 the memory debugging is turned on and it is reflected
>>> by the presence of DBG_SR_MEMORY in the output of 'kamailio -v'.
>>>
>>> Anyhow, what you reported is not a leak inside kamailio memory manager,
>>> but a leak of using system memory, so it is not affected by DBG_SR_MEMORY
>>> and cannot be troubleshooted using the mechanisms for pkg and shm managers.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>> --
>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Reload PIPILIMIT table from DB

2016-10-12 Thread Daniel-Constantin Mierla
Hello,


On 12/10/16 12:46, Grant Bagdasarian wrote:
>
> Hi Daniel,
>
>  
>
> I’m trying to get new pipes from the DB and their associated limits.
>
> We’re using the SIP digest username as the pipe to limit the CPS.
>
>  
>
> I think I do have a workaround for this which is as following:
>
> -  Use a htable to load the ‘pipes’ (usernames) and their
> config (limit + algorithm) from the db
>
> -  Use the plcheck function to pass in the username, algorithm
> and limit.
>
>  
>
> This would allow us to reload the htable from db when new users are
> created and the plcheck will make sure a new pipe is created when it
> does not exist by passing the three params.
>
>  
>
> Do you see any issues with this workaround?
>

It sounds good.

If you have the pipelimit for caller and you do db authentication for
it, an alternative is to load the limit and algorithm via
load_credentials from auth_db. In this way there is no caching, but the
values are loaded with same query as the password.

Cheers,
Daniel
>
>  
>
> Regards,
>
>  
>
> Grant
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
> Behalf Of *Daniel-Constantin Mierla
> *Sent:* woensdag 12 oktober 2016 10:39
> *To:* Kamailio (SER) - Users Mailing List 
> *Subject:* Re: [SR-Users] Reload PIPILIMIT table from DB
>
>  
>
> Hello,
>
>  
>
> On 11/10/16 15:07, Grant Bagdasarian wrote:
>
> Hello,
>
>  
>
> Is it possible to live reload the pipelimit module so it gets new
> values from the DB without a restart of Kamailio?
>
>  
>
> I couldn’t find a command to do this.
>
>
> no reload command at this moment. What do you want to update from db?
> Getting new pipes or setting new limits?
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Out of memory in UB 210: OOM killed process 12261 (kamailio) score 0 vm:1614768kB, rss:280200kB, swap:131408kB

2016-10-12 Thread Daniel-Constantin Mierla
Hello,

thanks -- coming in my mind now, xcap_client should use also the curl
library.

Cheers,
Daniel

On 12/10/16 15:35, Jurijs Ivolga wrote:
> Hi Daniel,
>
> I will test couple more days and later I will try to add some comments
> to utils, http_client & HTTP_ASYNC_CLIENT(not sure if there any other
> modules which use curl, but I will check) modules when I will be 200%
> sure that issue is gone.
>
> With kind regards,
>
> Jurijs
>
> On Wed, Oct 12, 2016 at 4:30 PM, Daniel-Constantin Mierla
> > wrote:
>
> Hello,
>
> ok, so that was...
>
> Maybe it would be good to add a note to the docs of the module
> about this issue so people become aware of it. I guess the other
> http_* modules are affected. Pull requests or other suggestions
> are welcome, of course!
>
> Cheers,
> Daniel
>
>
> On 12/10/16 15:04, Jurijs Ivolga wrote:
>> Hi Daniel,
>>
>> Thank you a lot, it looks that issue is solved, after updating
>> libcurl.
>>
>> I was using following manual for updating libcurl, in case if
>> somebody will have same issue.
>>
>> 
>> https://www.digitalocean.com/community/questions/how-to-upgrade-curl-in-centos6
>> 
>> 
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Tue, Oct 11, 2016 at 2:43 PM, Jurijs Ivolga
>> > wrote:
>>
>> Hi Daniel,
>>
>> You are correct we are using heavily http_query.
>>
>> I found following bug report:
>>
>> https://bugs.centos.org/view.php?id=9391
>> 
>>
>> I will try to update to libcurl 7.44 and check if this help.
>>
>> Thank you a lot Daniel!
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Tue, Oct 11, 2016 at 10:55 AM, Daniel-Constantin Mierla
>> > wrote:
>>
>> Hello,
>>
>> from the logs, it seems to be related to curl library, I
>> see many reports like:
>>
>> ==16459== 189,318 bytes in 167 blocks are possibly lost
>> in loss record 681 of 683
>> ==16459==at 0x4C26FEF: calloc (vg_replace_malloc.c:711)
>> ==16459==by 0x104BB699: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104AA537: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104AB81E: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104B0B88: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0x104B77E1: ??? (in /usr/lib64/libnsspem.so)
>> ==16459==by 0xB71ABC9: ??? (in /usr/lib64/libnss3.so)
>> ==16459==by 0xB71AE62: PK11_CreateGenericObject (in
>> /usr/lib64/libnss3.so)
>> ==16459==by 0xA0674DF: ??? (in
>> /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA067666: ??? (in
>> /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA069141: ??? (in
>> /usr/lib64/libcurl.so.4.1.1)
>> ==16459==by 0xA0601C4: Curl_ssl_connect (in
>> /usr/lib64/libcurl.so.4.1.1)
>>
>> That's like almost 200KB lost in this report.
>>
>> From the list of the modules, I see you have utils and I
>> guess you use http query function from there, is it?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 10/10/16 12:06, Jurijs Ivolga wrote:
>>> Hi Daniel,
>>>
>>> I left valgrind running for little while, not sure if
>>> this will be enough.
>>>
>>> Please find attached log file.
>>>
>>> Thank you a lot for your help!
>>>
>>> With kind regards,
>>>
>>> Jurijs
>>>
>>> On Fri, Oct 7, 2016 at 7:15 PM, Daniel-Constantin Mierla
>>> > wrote:
>>>
>>> Hello,
>>>
>>> that's the way it was done for older versions of
>>> kamailio.
>>>
>>> In master and 4.4 the memory debugging is turned on
>>> and it is reflected by the presence of DBG_SR_MEMORY
>>> in the output of 'kamailio -v'.
>>>
>>> Anyhow, what you reported is not a leak inside
>>> kamailio memory manager, but a leak of using system
>>> memory, so it is not affected by DBG_SR_MEMORY and
>>> cannot be troubleshooted using the mechanisms for
>>> pkg and shm managers.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>
>> -- 
>> Daniel-Constantin Mierla
>> http://twitter.com/#!/miconda
>>  - 
>> 

Re: [SR-Users] Out of memory in UB 210: OOM killed process 12261 (kamailio) score 0 vm:1614768kB, rss:280200kB, swap:131408kB

2016-10-12 Thread Daniel-Constantin Mierla
Hello,

ok, so that was...

Maybe it would be good to add a note to the docs of the module about
this issue so people become aware of it. I guess the other http_*
modules are affected. Pull requests or other suggestions are welcome, of
course!

Cheers,
Daniel


On 12/10/16 15:04, Jurijs Ivolga wrote:
> Hi Daniel,
>
> Thank you a lot, it looks that issue is solved, after updating libcurl.
>
> I was using following manual for updating libcurl, in case if somebody
> will have same issue.
>
> https://www.digitalocean.com/community/questions/how-to-upgrade-curl-in-centos6
>
> With kind regards,
>
> Jurijs
>
> On Tue, Oct 11, 2016 at 2:43 PM, Jurijs Ivolga
> > wrote:
>
> Hi Daniel,
>
> You are correct we are using heavily http_query.
>
> I found following bug report:
>
> https://bugs.centos.org/view.php?id=9391
> 
>
> I will try to update to libcurl 7.44 and check if this help.
>
> Thank you a lot Daniel!
>
> With kind regards,
>
> Jurijs
>
> On Tue, Oct 11, 2016 at 10:55 AM, Daniel-Constantin Mierla
> > wrote:
>
> Hello,
>
> from the logs, it seems to be related to curl library, I see
> many reports like:
>
> ==16459== 189,318 bytes in 167 blocks are possibly lost in
> loss record 681 of 683
> ==16459==at 0x4C26FEF: calloc (vg_replace_malloc.c:711)
> ==16459==by 0x104BB699: ??? (in /usr/lib64/libnsspem.so)
> ==16459==by 0x104AA537: ??? (in /usr/lib64/libnsspem.so)
> ==16459==by 0x104AB81E: ??? (in /usr/lib64/libnsspem.so)
> ==16459==by 0x104B0B88: ??? (in /usr/lib64/libnsspem.so)
> ==16459==by 0x104B77E1: ??? (in /usr/lib64/libnsspem.so)
> ==16459==by 0xB71ABC9: ??? (in /usr/lib64/libnss3.so)
> ==16459==by 0xB71AE62: PK11_CreateGenericObject (in
> /usr/lib64/libnss3.so)
> ==16459==by 0xA0674DF: ??? (in /usr/lib64/libcurl.so.4.1.1)
> ==16459==by 0xA067666: ??? (in /usr/lib64/libcurl.so.4.1.1)
> ==16459==by 0xA069141: ??? (in /usr/lib64/libcurl.so.4.1.1)
> ==16459==by 0xA0601C4: Curl_ssl_connect (in
> /usr/lib64/libcurl.so.4.1.1)
>
> That's like almost 200KB lost in this report.
>
> From the list of the modules, I see you have utils and I guess
> you use http query function from there, is it?
>
> Cheers,
> Daniel
>
>
> On 10/10/16 12:06, Jurijs Ivolga wrote:
>> Hi Daniel,
>>
>> I left valgrind running for little while, not sure if this
>> will be enough.
>>
>> Please find attached log file.
>>
>> Thank you a lot for your help!
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Fri, Oct 7, 2016 at 7:15 PM, Daniel-Constantin Mierla
>> > wrote:
>>
>> Hello,
>>
>> that's the way it was done for older versions of kamailio.
>>
>> In master and 4.4 the memory debugging is turned on and
>> it is reflected by the presence of DBG_SR_MEMORY in the
>> output of 'kamailio -v'.
>>
>> Anyhow, what you reported is not a leak inside kamailio
>> memory manager, but a leak of using system memory, so it
>> is not affected by DBG_SR_MEMORY and cannot be
>> troubleshooted using the mechanisms for pkg and shm managers.
>>
>> Cheers,
>> Daniel
>>
>>
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> 
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - 
> http://www.asipto.com
>
-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Out of memory in UB 210: OOM killed process 12261 (kamailio) score 0 vm:1614768kB, rss:280200kB, swap:131408kB

2016-10-12 Thread Jurijs Ivolga
Hi Daniel,

I will test couple more days and later I will try to add some comments to
utils, http_client & HTTP_ASYNC_CLIENT(not sure if there any other modules
which use curl, but I will check) modules when I will be 200% sure that
issue is gone.

With kind regards,

Jurijs

On Wed, Oct 12, 2016 at 4:30 PM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> ok, so that was...
>
> Maybe it would be good to add a note to the docs of the module about this
> issue so people become aware of it. I guess the other http_* modules are
> affected. Pull requests or other suggestions are welcome, of course!
>
> Cheers,
> Daniel
>
> On 12/10/16 15:04, Jurijs Ivolga wrote:
>
> Hi Daniel,
>
> Thank you a lot, it looks that issue is solved, after updating libcurl.
>
> I was using following manual for updating libcurl, in case if somebody
> will have same issue.
>
> https://www.digitalocean.com/community/questions/how-to-
> upgrade-curl-in-centos6
>
> With kind regards,
>
> Jurijs
>
> On Tue, Oct 11, 2016 at 2:43 PM, Jurijs Ivolga 
> wrote:
>
>> Hi Daniel,
>>
>> You are correct we are using heavily http_query.
>>
>> I found following bug report:
>>
>> https://bugs.centos.org/view.php?id=9391
>>
>> I will try to update to libcurl 7.44 and check if this help.
>>
>> Thank you a lot Daniel!
>>
>> With kind regards,
>>
>> Jurijs
>>
>> On Tue, Oct 11, 2016 at 10:55 AM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> from the logs, it seems to be related to curl library, I see many
>>> reports like:
>>>
>>> ==16459== 189,318 bytes in 167 blocks are possibly lost in loss record
>>> 681 of 683
>>> ==16459==at 0x4C26FEF: calloc (vg_replace_malloc.c:711)
>>> ==16459==by 0x104BB699: ??? (in /usr/lib64/libnsspem.so)
>>> ==16459==by 0x104AA537: ??? (in /usr/lib64/libnsspem.so)
>>> ==16459==by 0x104AB81E: ??? (in /usr/lib64/libnsspem.so)
>>> ==16459==by 0x104B0B88: ??? (in /usr/lib64/libnsspem.so)
>>> ==16459==by 0x104B77E1: ??? (in /usr/lib64/libnsspem.so)
>>> ==16459==by 0xB71ABC9: ??? (in /usr/lib64/libnss3.so)
>>> ==16459==by 0xB71AE62: PK11_CreateGenericObject (in
>>> /usr/lib64/libnss3.so)
>>> ==16459==by 0xA0674DF: ??? (in /usr/lib64/libcurl.so.4.1.1)
>>> ==16459==by 0xA067666: ??? (in /usr/lib64/libcurl.so.4.1.1)
>>> ==16459==by 0xA069141: ??? (in /usr/lib64/libcurl.so.4.1.1)
>>> ==16459==by 0xA0601C4: Curl_ssl_connect (in
>>> /usr/lib64/libcurl.so.4.1.1)
>>>
>>> That's like almost 200KB lost in this report.
>>>
>>> From the list of the modules, I see you have utils and I guess you use
>>> http query function from there, is it?
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 10/10/16 12:06, Jurijs Ivolga wrote:
>>>
>>> Hi Daniel,
>>>
>>> I left valgrind running for little while, not sure if this will be
>>> enough.
>>>
>>> Please find attached log file.
>>>
>>> Thank you a lot for your help!
>>>
>>> With kind regards,
>>>
>>> Jurijs
>>>
>>> On Fri, Oct 7, 2016 at 7:15 PM, Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
 Hello,

 that's the way it was done for older versions of kamailio.

 In master and 4.4 the memory debugging is turned on and it is reflected
 by the presence of DBG_SR_MEMORY in the output of 'kamailio -v'.

 Anyhow, what you reported is not a leak inside kamailio memory manager,
 but a leak of using system memory, so it is not affected by DBG_SR_MEMORY
 and cannot be troubleshooted using the mechanisms for pkg and shm managers.

 Cheers,
 Daniel


>>> --
>>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
>>> http://www.linkedin.com/in/miconda
>>> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.com
>>>
>>> --
> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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] Accounting CDR generation

2016-10-12 Thread Ivan Dudko
Thank you, Daniel!

It's works via dlg_vars.
But i can't write in acc_crds SIP reply code in same way.

$dlg_var(sip_cause)=$rs;

ср, 12 окт. 2016 г. в 17:33, Daniel-Constantin Mierla :

> Hello,
>
> for acc_cdr you have to load the dialog module and track the active calls
> with it. It may require that you store in dlg vars the values you want
> inside acc_cdr.
>
> Cheers,
> Daniel
>
> On 11/10/16 13:08, Ivan Dudko wrote:
>
> Hello!
>
> I am setting this in kamailio.cfg
>
> #!ifdef WITH_ACCDB
> modparam("acc", "db_flag", FLT_ACC)
> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
> modparam("acc", "db_url", DBURL)
> modparam("acc", "db_extra",
> "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdrs_table", "acc_cdrs")
> modparam("acc",
> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
> modparam("acc", "cdr_start_id", "start_time")
> modparam("acc", "cdr_end_id", "end_time")
> modparam("acc", "cdr_duration_id", "duration")
> #!endif
>
> But in CDRs table ('acc_cdrs') field dst_user=$rU is always empty if call
> is not completed with remote side answer.
> But in accounting table ('acc') this field isn't empty.
>
> Is this behavior is correct?
> I think it is not correct.
>
>
>
> ___
> 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 Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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


Re: [SR-Users] Accounting CDR generation

2016-10-12 Thread Daniel-Constantin Mierla
Hello,

for acc_cdr you have to load the dialog module and track the active
calls with it. It may require that you store in dlg vars the values you
want inside acc_cdr.

Cheers,
Daniel


On 11/10/16 13:08, Ivan Dudko wrote:
> Hello!
>
> I am setting this in kamailio.cfg
>
> #!ifdef WITH_ACCDB
> modparam("acc", "db_flag", FLT_ACC)
> modparam("acc", "db_missed_flag", FLT_ACCMISSED)
> modparam("acc", "db_url", DBURL)
> modparam("acc", "db_extra",
> "src_user=$fU;src_domain=$fd;src_ip=$si;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
> modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
>
> modparam("acc", "cdr_enable", 1)
> modparam("acc", "cdr_start_on_confirmed", 1)
> modparam("acc", "cdrs_table", "acc_cdrs")
> modparam("acc",
> "cdr_extra","src_user=$fU;src_domain=$fd;src_ip=$si;dst_user=$rU;dst_ouser=$tU;dst_domain=$rd;sip_code=$rs;sip_reason=$rr;callid=$dlg(callid);dst_ip=$Ri")
> modparam("acc", "cdr_start_id", "start_time")
> modparam("acc", "cdr_end_id", "end_time")
> modparam("acc", "cdr_duration_id", "duration")
> #!endif
>
> But in CDRs table ('acc_cdrs') field dst_user=$rU is always empty if
> call is not completed with remote side answer.
> But in accounting table ('acc') this field isn't empty.
>
> Is this behavior is correct?
> I think it is not correct.
>
>
>
> ___
> 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
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Oct 24-26, 2016 - http://www.asipto.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