[SR-Users] Media Proxy and STUN

2015-05-08 Thread Nahum Nir
Hi All,

After reading the docs I got that it is possible to configure the server so
it will change the SDP so clients will send the media to the media proxy.

But, what if the clients are not behind a symmetric NAT and using ICE where
able to get their real IP:port? How can the server be aware to this and not
change the SDP?

Thanks,
Nir
___
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] Timer Process versus Slow Timer Process

2015-05-08 Thread Mack Hendricks
Hi All,

I'm looking to have a better understanding of when to use the Timer process
versus the Slow Timer Process.  This is what I came up with, but please
correct me:


   - The “*Timer*” process is used to handle core processing within
   Kamailio.  Therefore, you don’t want to put long running logic into the
   routing handler

   - The “*Slow Timer*” process can be used for long running processes
___
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 authentication method

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

On 07/05/15 15:38, Mathys Frédéric wrote:

 Still on the subject, we are exploring the possibilities and one of
 them would be to use the diameter module. As stated in the documentation :

 “NOTE: diameter support was developed for DISC (DIameter Server Client
 project at http://developer.berlios.de/projects/disc/). This project
 seems to be no longer maintained and DIAMETER specifications were
 updated in the meantime. Thus, the module is obsolete and needs rework
 to be usable with opendiameter or other DIAMETER servers.”

 Is it planned to update this module on your side on not?


the module might be (pretty) functional, but due to no real demand and
lack of open source diameter servers, it was not proper maintained.

Note that there is another module that does diameter, named cdp, which
is mainly used in IMS deployments -- this one is active and used.

  

 One other solution would be to write our own module to connect to
 another server (which contains the users/passwords and calculate the
 HA1 and HA2 values), tcp layer would still be done by auth module. To
 do that, is there a spec on how to communicate with auth module? And
 any documentation on custom module development and deployment? The
 principle would be more or less the same as diameter, but maybe our
 server would not use radius nor diameter protocols.


Maybe for this case is better to use http to contact the server -- you
can do an http query from kamailio.cfg using utils module (another
module for http operations should be in a personal branch of Olle,
something related to curl -- see all branches in our git repository).

Also, you may build a faster prototype using an embedded language (Lua,
Perl, Python -- see the modules that have the name starting with app_ ).

  

 By doing it, we try to reach two goals : use SHA instead of MD5 and
 increase the security of the user management by hosting it in a
 different way as Kamailio does.


Said in a previous email -- you can focus on auth module for
pv_auth_check() function. You can fetch the password or its hashed
variant via other connectors (e.g., ldap, sqlops) -- see next a tutorial
about ldap:

 - http://www.kamailio.org/wiki/tutorials/mini-howto-admin/ldap-user-auth

Cheers,
Daniel

  

 Thank you,

 Frederic

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Wednesday 6 May 2015 16:44
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Kamailio authentication method

  

 Hello,

 to understand properly, do you need to have:

 HA1=SHA(username:realm:password)
 HA2=SHA(method:digestURI)
 response=SHA(HA1:nonce:HA2)

 Perhaps it can be done with config file scripting, if you are familiar
 with transformations and header manipulation. But I think it will be
 simpler to extend auth module to support different hashing algorithm.

 The code for computing shaX is already in kamailio (used for shaX
 transformations), so the change in auth should be about advertising
 and detecting when the new algorithm has to be used.

 Cheers,
 Daniel

  

 On 06/05/15 16:28, Mathys Frédéric wrote:

 Hello,

  

 In my scenario with a Kamailio server, I have a VOIP client
 connecting to the server which, for some reasons, cannot calculate
 MD5 hashes but only SHA. In this situation, would it be possible
 to change the authentication algorithm by either modifying
 Kamailio scripts or writing an external module to do that?

  

 As far as I know, the authentication response is calculated as
 follow (standard HTTP Digest authentication) :

 HA1=MD5(username:realm:password)

 HA2=MD5(method:digestURI)

 response=MD5(HA1:nonce:HA2)

  

 For that, I have to save ha1 and ha1b values in the DB with the
 SHA function directly (with a trigger for example), and then
 change the authentication method too.

 What is the best solution to do that? Does a module already exists?

  

 Thank you!

  

 Frederic Mathys

 System Integration  Validation

  




 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

 sr-users@lists.sip-router.org mailto: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://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org

Re: [SR-Users] NO VOICE AFTER MSILO

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

I suspect you call exit somewhere and the packets are not routed out.

Load debugger module and enable cfgtrace parameter, then send the log
messages here to see what actions from configuration files are executed.

Cheers,
Daniel

On 01/05/15 10:51, sscc wrote:
 am also cluless:-(



 On 01-May-2015, at 12:01, SamyGo [via SIP Router] [hidden email]
 /user/SendEmail.jtp?type=nodenode=137467i=0 wrote:


 They should be unrelated, RTPPROXY called on INVITES and MSILO on
 REGISTER|MESSAGE, why should INVITE's flow change using that msilo
 route ?


 On Thu, Apr 30, 2015 at 4:13 AM, sscc [hidden email]
 /user/SendEmail.jtp?type=nodenode=137464i=0 wrote:

 # - msilo params -
 #!ifdef WITH_MSILO

 modparam(msilo, db_url,
 mysql://kamailio:abc@localhost/kamailio)

 modparam(msilo, from_address, [hidden email]
 /user/SendEmail.jtp?type=nodenode=137464i=1)

 modparam(msilo, contact_hdr, Contact: [hidden email]
 /user/SendEmail.jtp?type=nodenode=137464i=2;msilo=yes\r\n)

 modparam(msilo, content_type_hdr, Content-Type:text/plain\r\n)
 modparam(msilo, offline_message, User $ru is offline!)

 modparam (msilo, outbound_proxy,
 sip:sscc.tk:6524;transport=tcp)






 ### Routing Logic 


 # Main SIP request routing logic
 # - processing of any incoming SIP request starts with this route
 # - note: this is the same as route { ... }
 request_route {

 # per request initial checks
 route(REQINIT);

 # NAT detection
 route(NATDETECT);

 # CANCEL processing
 if (is_method(CANCEL)) {
 if (t_check_trans()) {
 route(RELAY);
 }
 exit;
 }

 # handle requests within SIP dialogs
 route(WITHINDLG);

 ### only initial requests (no To tag)
 xlog(L_NOTICE,main route enter\n);
 # handle retransmissions
 if(t_precheck_trans()) {
 t_check_trans();
 exit;
 }
 t_check_trans();

 # authentication
 route(AUTH);

 # record routing for dialog forming requests (in case
 they are routed)
 # - remove preloaded route headers
 remove_hf(Route);
 if (is_method(INVITE|SUBSCRIBE))
 record_route();

 # account only INVITEs
 if (is_method(INVITE)) {
 setflag(FLT_ACC); # do accounting
 }

 # dispatch requests to foreign domains
 route(SIPOUT);

 ### requests for my local domains

 # handle presence related requests
 route(PRESENCE);

 # handle registrations
 route(REGISTRAR);

 if ($rU==$null) {
 # request with no Username in RURI
 sl_send_reply(484,Address Incomplete);
 exit;
 }
 # for msilo routing logic (sajjad)
 route(MSILO);
 # dispatch destinations to PSTN
 route(PSTN);

 # user location service
 route(LOCATION);
 }

 # Wrapper for relaying requests
 route[RELAY] {
  xlog(L_NOTICE, RELAY route enter\n);

 # enable additional event routes for forwarded requests
 # - serial forking, RTP relaying handling, a.s.o.
 if (is_method(INVITE|BYE|SUBSCRIBE|UPDATE)) {
 if(!t_is_set(branch_route))
 t_on_branch(MANAGE_BRANCH);
 }
 if (is_method(INVITE|SUBSCRIBE|UPDATE)) {
 if(!t_is_set(onreply_route))
 t_on_reply(MANAGE_REPLY);
 }
 if (is_method(INVITE)) {
 if(!t_is_set(failure_route))
 t_on_failure(MANAGE_FAILURE);
 }

 if (!t_relay()) {
 sl_reply_error();
 }
 exit;
 }

 # Per SIP request initial checks
 route[REQINIT] {
 #!ifdef WITH_ANTIFLOOD
 # flood dection from same IP and traffic ban for a while
 # be sure you exclude checking trusted peers, such as
 pstn gateways
 # - local host excluded (e.g., loop to self)
 if(src_ip!=myself) {
 if($sht(ipban=$si)!=$null) {
 # ip is already blocked
 #xdbg(request from blocked IP - $rm from
 $fu (IP:$si:$sp)\n);
 xlog(L_NOTICE,request from blocked IP
 - $rm from
 $fu (IP:$si:$sp)\n);
 exit;
 }
 if (!pike_check_req()) {
 #xlog(L_ALERT,ALERT: pike blocking $rm
 from $fu (IP:$si:$sp)\n);
 xlog(L_NOTICE,ALERT: pike 

Re: [SR-Users] Kamailio authentication method

2015-05-08 Thread Daniel-Constantin Mierla
Hello,


On 07/05/15 09:49, Mathys Frédéric wrote:

 Hello Daniel,

  

 Thank you for your answer, this is exactly what I need. Modification
 of the auth module seems to be a better solution, but this lead to
 some questions for me…

 -  Could you explain a little bit how the auth module is
 working? Which files do I have to modify to change the hash method?


It is hard to remember by heart or explain here -- but in short, what I
would do is to identify where the MD5 hashing is done and from there try
to add an alternative for shaX.

 -  If I used another auth_* module to get username / password,
 the modification in  the auth module is enough for the
 www_authentication? In other words, the authentication is always done
 in this module? Even If I use auth_radius or auth_diameter or a
 self-made auth_* module?


Some of those modules might be touched as well, given, for example, that
auth_db can already retrieve the hashed value from the database. IIRC,
radius auhentication sends all the attributes for authentication to
radius and radius server does all the computation for check.

As a first step, I would focus on auth module for pv_auth_check() which
takes the password or the hashed value as parameter.

Cheers,
Daniel

  

 *From:*sr-users [mailto:sr-users-boun...@lists.sip-router.org] *On
 Behalf Of *Daniel-Constantin Mierla
 *Sent:* Wednesday 6 May 2015 16:44
 *To:* Kamailio (SER) - Users Mailing List
 *Subject:* Re: [SR-Users] Kamailio authentication method

  

 Hello,

 to understand properly, do you need to have:

 HA1=SHA(username:realm:password)
 HA2=SHA(method:digestURI)
 response=SHA(HA1:nonce:HA2)

 Perhaps it can be done with config file scripting, if you are familiar
 with transformations and header manipulation. But I think it will be
 simpler to extend auth module to support different hashing algorithm.

 The code for computing shaX is already in kamailio (used for shaX
 transformations), so the change in auth should be about advertising
 and detecting when the new algorithm has to be used.

 Cheers,
 Daniel

  

 On 06/05/15 16:28, Mathys Frédéric wrote:

 Hello,

  

 In my scenario with a Kamailio server, I have a VOIP client
 connecting to the server which, for some reasons, cannot calculate
 MD5 hashes but only SHA. In this situation, would it be possible
 to change the authentication algorithm by either modifying
 Kamailio scripts or writing an external module to do that?

  

 As far as I know, the authentication response is calculated as
 follow (standard HTTP Digest authentication) :

 HA1=MD5(username:realm:password)

 HA2=MD5(method:digestURI)

 response=MD5(HA1:nonce:HA2)

  

 For that, I have to save ha1 and ha1b values in the DB with the
 SHA function directly (with a trigger for example), and then
 change the authentication method too.

 What is the best solution to do that? Does a module already exists?

  

 Thank you!

  

 Frederic Mathys

 System Integration  Validation

  




 ___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

 sr-users@lists.sip-router.org mailto: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://twitter.com/#%21/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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] Timer Process versus Slow Timer Process

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

On 07/05/15 16:32, Mack Hendricks wrote:
 Hi All,

 I'm looking to have a better understanding of when to use the Timer
 process versus the Slow Timer Process.  This is what I came up with,
 but please correct me:

   * The “*Timer*” process is used to handle core processing within
 Kamailio.  Therefore, you don’t want to put long running logic
 into the routing handler

   * The “*Slow Timer*” process can be used for long running processes



Pretty much so -- see in the source tree the file: doc/timers.txt -- it
has some more details there for proper understanding.

Also note that you can create your own timer processes if you write your
own c module -- rtimer module can be used to see some examples of how to
do it. With rtimer you can actually create new timer processes that
execute config route blocks periodically.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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] Kamailio proxy for far-end nat traversal

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

you can force rtp relaying always, if it is what you want -- just call
rtpproxy_manage() for all INVITE requests and their replies.

Otherwise you have to tune the nat_uac_test() parameter in order to
match what you want to relay.

For signaling relaying, be sure you do record_route() for calls.

Cheers,
Daniel

On 07/05/15 16:01, rahul.ultimate wrote:
 Hi Daniel

 I have rtpproxy to perform media relaying.

 The case where it just timeouts: 
 1. Client A behind NAT (wifi) calling Client B on 3G



 Sent from Samsung Mobile


  Original message 
 From: Daniel-Constantin Mierla
 Date:05/05/2015 12:52 (GMT+05:30)
 To: Kamailio (SER) - Users Mailing List
 Subject: Re: [SR-Users] Kamailio proxy for far-end nat traversal

 Hello,

 do you have rtpproxy or rtpengine for relaying rtp packets? Kamailio
 is routing only sip packets, you need the rtp relay application to
 help with media streams.

 Cheers,
 Daniel

 On 01/05/15 13:15, rahul.ultimate wrote:
 Hello

 I need a small guidance on creating a light weight proxy which only
 forwards the msgs to my sip server and also does supports symmetrical
 nated clients.

 The way I have created the configuration is a slight modification of :
 https://github.com/xlab1/sipfe_kamailio/blob/master/kamailio.cfg

 Problem is unless the sip clients use STUN media packets are not
 routed. And sometimes even the signalling does not pass through.

 Should i not use fix_nated_register and switch to fix _ nated_contact
 always ?

 Because in all those cases where signalling does not pass through, I
 see RTO. My best guess is kamailio trying to communicate with private ip.

 Anything which I can try that you could suggest from the top of
 yourmind woyld be muc appreciated. 


 Thanks
 Rahul


 Sent from Samsung Mobile


 ___
 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 World Conference, May 27-29, 2015
 Berlin, Germany - http://www.kamailioworld.com

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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] db_text error

2015-05-08 Thread jaflong jaflong


db_text error

I am getting the following error on using db_text

 0(6638) INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: 
/usr/local/etc/kamailio/ 0(6638) ERROR: db_text [dbt_base.c:207]: dbt_query(): 
table version not loaded! (too few columns)
 0(6638) ERROR: db_text [dbt_base.c:306]: dbt_query(): failed to query the 
table!


I have thisin my kamailio.cfg
#!define DBURL text:///usr/local/etc/kamailio/dbtext


I created the following files

cat  /usr/local/etc/kamailio/dbtext/version

table_name(str) table_version(int)
subscriber:6
location:6
aliases:6


cat  /usr/local/etc/kamailio/dbtext/subscriber

username(str) password(str) ha1(str) domain(str) ha1b(str)
someuser:someuser:xxx:10.1.1.5:xxx

can some advise how to get db_text work for me


Regards

___
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] db_text error

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

set debug=3 in kamailio.cfg and test again, you should get more details
about what kamailio tried to do and what is the potential error (maybe
some empty line).

Cheers,
Daniel

On 08/05/15 14:53, jaflong jaflong wrote:

 db_text error

 I am getting the following error on using db_text

  0(6638) INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: 
 /usr/local/etc/kamailio/ 0(6638) ERROR: db_text [dbt_base.c:207]: 
 dbt_query(): table version not loaded! (too few columns)
  0(6638) ERROR: db_text [dbt_base.c:306]: dbt_query(): failed to query the 
 table!


 I have thisin my kamailio.cfg
 #!define DBURL text:///usr/local/etc/kamailio/dbtext


 I created the following files

 cat  /usr/local/etc/kamailio/dbtext/version

 table_name(str) table_version(int)
 subscriber:6
 location:6
 aliases:6


 cat  /usr/local/etc/kamailio/dbtext/subscriber

 username(str) password(str) ha1(str) domain(str) ha1b(str)
 someuser:someuser:xxx:10.1.1.5:xxx

 can some advise how to get db_text work for me


 Regards

 ___
 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 World Conference, May 27-29, 2015
Berlin, Germany - http://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] Recommended configuration for TCP support

2015-05-08 Thread Mickael Marrache
What would happen in this case? If I understand correctly, the proxy will
always forward the request but the last hop (before the UAS) will forward
the request only if a connection is active?

 

If the last hop doesn't forward the request because no TCP connection
exists, what happens? How the proxy will detect this situation?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Vitaliy Aleksandrov
Sent: Friday, May 08, 2015 4:06 PM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hi, 

I suppose calling set_forward_no_connect() at the LB for a request from the
registrar to a user will lead to the result. LB won't try to make an
outgoing tcp/tls connection to reach a requested destination and will only
forward a request only via existing one.

BR



Thanks for your explanation, the problem is that the actual lookup is done
by a proxy which is located after our load balancer. Therefore, the TCP
connection with the UA should not be visible by the proxy but by the load
balancer.

 

How does that work in such case?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Vitaliy Aleksandrov
Sent: Wednesday, May 06, 2015 10:34 AM
To: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

set_forward_no_connect() called after lookup() prevents kamailio from making
a new connection to a phone if there is no active connection. 
This is useful when you are trying to call to a UA which kamailio still
keeps registration record for, but TCP/TLS connect to this phone is already
gone (due to timeout, network problem, etc...).

On 05/05/15 14:54, Mickael Marrache wrote:

In general, it happens in our network (as more and more Via headers are
added).

 

Sorry, I didn't understand your last sentence. What do you mean by not
connect if there is no active connection after location lookup?

 

From: sr-users [mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of
Daniel-Constantin Mierla
Sent: Monday, May 04, 2015 11:07 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Recommended configuration for TCP support

 

Hello,

where are typically those issues with truncated SDP? On the phones?

If you use tcp and have phones behind the nat, it is recommended to not
connect if there is no active connection after location lookup -- see core
functions for tcp.

Cheers,
Daniel

On 04/05/15 13:54, Mickael Marrache wrote:

Hi,

 

We sometimes get issues caused by truncated SDP bodies. Therefore, we are
looking at using TCP instead of UDP.

 

What is the recommended configuration when TCP is used?

 

Currently, I only have the following:

 

children=16

listen=udp:ip:5060

listen=tcp:ip:5060

disable_tcp=no

tcp_connection_lifetime=605 (registration expiry is 600)

 

Also, is there a difference with UDP regarding NAT handling?

 

Thanks,

Mickael








___
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://twitter.com/#%21/miconda  -
http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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

 

___
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] Memory leak or bad setting.

2015-05-08 Thread Daniel-Constantin Mierla
Hello,

it is recommended to upgrade to latest 4.2.x -- there were some fixes
since version 4.2.1. The same configuration file and database structure
works for all 4.2.x, therefore just deploy the newer 4.2.x like you did
with 4.2.1 and just restart.

After upgrade, if you still see decrease of pkg free memory, let us know
to investigate further.

Cheers,
Daniel

On 08/05/15 16:01, Kjeld Flarup wrote:
 Hello

 We experienced a failure on our kamailio (4.2.1+trusty), which required
 a restart.
 May  6 07:40:41 rtpproxy01 /usr/sbin/kamailio[5467]: ERROR: core
 [msg_translator.c:2270]: generate_res_buf_from_sip_res(): out of mem

 Afterwards we inspected all the settings to be using default, but at a
 much higher level than an other older kamailio which runs much more traffic.

 The big difference, is that this kamailio works with rtpengine. Does
 that require more memory?

 We also observed that the free memory is constantly falling on some
 instances. They all started with 16MB but after 1½ day some are on 11.6
 Is this normal behaviour that will find a natural level or is there
 something bad going on?

 We can also see that there are frags. Is that to be worried about, or is
 this natural?

 kamcmd pkg.stats | egrep -e 'free|frag'
   free: 16362760
   total_frags: 17
   free: 15835176
   total_frags: 232
   free: 15845760
   total_frags: 205
   free: 15829288
   total_frags: 188
   free: 15847456
   total_frags: 181
   free: 15853024
   total_frags: 183
   free: 15873232
   total_frags: 225
   free: 15858584
   total_frags: 231
   free: 15834592
   total_frags: 205
   free: 15852520
   total_frags: 132
   free: 15869048
   total_frags: 120
   free: 15824872
   total_frags: 100
   free: 15828448
   total_frags: 113
   free: 15858216
   total_frags: 109
   free: 15861992
   total_frags: 82
   free: 15871712
   total_frags: 110
   free: 15813824
   total_frags: 109
   free: 11583736
   total_frags: 121
   free: 11588896
   total_frags: 106
   free: 11580448
   total_frags: 118
   free: 11586312
   total_frags: 134
   free: 11592840
   total_frags: 159
   free: 11632536
   total_frags: 120
   free: 11582368
   total_frags: 127
   free: 11660104
   total_frags: 97
   free: 16352192
   total_frags: 14
   free: 16351088
   total_frags: 13
   free: 16341248
   total_frags: 46
   free: 16351184
   total_frags: 19

 We use 4.2.1+trusty with these modules, is it possible that a newer
 version has fixed some memory leak?

 loadmodule db_mysql.so
 loadmodule mi_fifo.so
 loadmodule kex.so
 loadmodule tm.so
 loadmodule tmx.so
 loadmodule sl.so
 loadmodule rr.so
 loadmodule pv.so
 loadmodule maxfwd.so
 loadmodule textops.so
 loadmodule siputils.so
 loadmodule xlog.so
 loadmodule sanity.so
 loadmodule ctl.so
 loadmodule mi_rpc.so
 loadmodule acc.so
 loadmodule dispatcher.so
 loadmodule permissions.so
 loadmodule sdpops.so
 loadmodule rtpengine.so


-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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] db_text error

2015-05-08 Thread Daniel-Constantin Mierla
Yes, it seems it is looking for different database path -- can you
double check to be sure you set db_url properly for all modules?

Cheers,
Daniel

On 08/05/15 15:50, jaflong jaflong wrote:
 Thanks, I got slightly more debug

  0(3933) DEBUG: core [route.c:907]: fix_actions(): fixing save()
  0(3933) INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: 
 /usr/local/etc/kamailio/ 0(3933) DEBUG: db_text [dbt_lib.c:129]: 
 dbt_cache_get_db(): looking for db /usr/local/etc/kamailio/!
  0(3933) DEBUG: db_text [dbt_lib.c:150]: dbt_cache_get_db(): new db!
  0(3933) DEBUG: db_text [dbt_file.c:102]: dbt_load_file(): request for table 
 [version]
  0(3933) DEBUG: db_text [dbt_file.c:109]: dbt_load_file(): db is 
 [/usr/local/etc/kamailio/]
  0(3933) DEBUG: db_text [dbt_file.c:124]: dbt_load_file(): loading file 
 [/usr/local/etc/kamailio/]
  0(3933) DEBUG: db_text [dbt_tb.c:187]: dbt_table_new(): mtime is 1431092741
  0(3933) ERROR: db_text [dbt_base.c:207]: dbt_query(): table version not 
 loaded! (too few columns)
  0(3933) ERROR: db_text [dbt_base.c:306]: dbt_query(): failed to query the 
 table!




 shouldnt this 
 using database at: /usr/local/etc/kamailio/ 0(3933)  be  like be 
 /usr/local/etc/kamailio/dbtext?

 it seems it cant find dbtext?

 Any help please




 08.05.2015, 16:35, Daniel-Constantin Mierla mico...@gmail.com:
 Hello,

 set debug=3 in kamailio.cfg and test again, you should get more details
 about what kamailio tried to do and what is the potential error (maybe
 some empty line).

 Cheers,
 Daniel

 On 08/05/15 14:53, jaflong jaflong wrote:
  db_text error

  I am getting the following error on using db_text

   0(6638) INFO: db_text [dbt_base.c:99]: dbt_init(): using database at: 
 /usr/local/etc/kamailio/ 0(6638) ERROR: db_text [dbt_base.c:207]: 
 dbt_query(): table version not loaded! (too few columns)
   0(6638) ERROR: db_text [dbt_base.c:306]: dbt_query(): failed to query the 
 table!

  I have thisin my kamailio.cfg
  #!define DBURL text:///usr/local/etc/kamailio/dbtext

  I created the following files

  cat  /usr/local/etc/kamailio/dbtext/version

  table_name(str) table_version(int)
  subscriber:6
  location:6
  aliases:6

  cat  /usr/local/etc/kamailio/dbtext/subscriber

  username(str) password(str) ha1(str) domain(str) ha1b(str)
  someuser:someuser:xxx:10.1.1.5:xxx

  can some advise how to get db_text work for me

  Regards

  ___
  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 World Conference, May 27-29, 2015
 Berlin, Germany - http://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

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://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] Memory leak or bad setting.

2015-05-08 Thread Kjeld Flarup
Hello

We experienced a failure on our kamailio (4.2.1+trusty), which required
a restart.
May  6 07:40:41 rtpproxy01 /usr/sbin/kamailio[5467]: ERROR: core
[msg_translator.c:2270]: generate_res_buf_from_sip_res(): out of mem

Afterwards we inspected all the settings to be using default, but at a
much higher level than an other older kamailio which runs much more traffic.

The big difference, is that this kamailio works with rtpengine. Does
that require more memory?

We also observed that the free memory is constantly falling on some
instances. They all started with 16MB but after 1½ day some are on 11.6
Is this normal behaviour that will find a natural level or is there
something bad going on?

We can also see that there are frags. Is that to be worried about, or is
this natural?

kamcmd pkg.stats | egrep -e 'free|frag'
free: 16362760
total_frags: 17
free: 15835176
total_frags: 232
free: 15845760
total_frags: 205
free: 15829288
total_frags: 188
free: 15847456
total_frags: 181
free: 15853024
total_frags: 183
free: 15873232
total_frags: 225
free: 15858584
total_frags: 231
free: 15834592
total_frags: 205
free: 15852520
total_frags: 132
free: 15869048
total_frags: 120
free: 15824872
total_frags: 100
free: 15828448
total_frags: 113
free: 15858216
total_frags: 109
free: 15861992
total_frags: 82
free: 15871712
total_frags: 110
free: 15813824
total_frags: 109
free: 11583736
total_frags: 121
free: 11588896
total_frags: 106
free: 11580448
total_frags: 118
free: 11586312
total_frags: 134
free: 11592840
total_frags: 159
free: 11632536
total_frags: 120
free: 11582368
total_frags: 127
free: 11660104
total_frags: 97
free: 16352192
total_frags: 14
free: 16351088
total_frags: 13
free: 16341248
total_frags: 46
free: 16351184
total_frags: 19

We use 4.2.1+trusty with these modules, is it possible that a newer
version has fixed some memory leak?

loadmodule db_mysql.so
loadmodule mi_fifo.so
loadmodule kex.so
loadmodule tm.so
loadmodule tmx.so
loadmodule sl.so
loadmodule rr.so
loadmodule pv.so
loadmodule maxfwd.so
loadmodule textops.so
loadmodule siputils.so
loadmodule xlog.so
loadmodule sanity.so
loadmodule ctl.so
loadmodule mi_rpc.so
loadmodule acc.so
loadmodule dispatcher.so
loadmodule permissions.so
loadmodule sdpops.so
loadmodule rtpengine.so

-- 
Med venlig hilsen / Best regards
Kjeld Flarup (Christensen) M.Sc E.E, Teknisk chef
Viptel ApS, Benslehøjvej 3, DK-7470 Karup J
Telefon: +45 46949949, Telefax: +45 46949950, http://viptel.dk

___
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] Recommended configuration for TCP support

2015-05-08 Thread Vitaliy Aleksandrov


What would happen in this case? If I understand correctly, the proxy 
will always forward the request but the last hop (before the UAS) will 
forward the request only if a connection is active?



correct.


If the last hop doesn't forward the request because no TCP connection 
exists, what happens? How the proxy will detect this situation?


It won't find any matching connection and won't try to establish a new 
one since you asked it to not. So it will just send a reply back to the 
registrar with an error. After receiving an error registrar in its turn 
can perform some smart actions like forwarding to a voicemail system.
___
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