Re: [SR-Users] Error loading carrierroute in Kamailio 4.0.x

2013-10-20 Thread Marius Zbihlei
I'm running some problems atm witch don't allow me to test.

Well, if carrierroute built than you already have libconfuse-dev.
Carrierroute uses libconfuse as a shared library. I would suggest doing a
ldd carrieroute.so and than check that you have the confuse library needed
as a carrierroute dependency in /usr/lib/. I found sometimes that there
might be some symlinks missing in the system libraries dir, especially for
something as 'deprecated' as libconfuse is.

Marius


On Sun, Oct 20, 2013 at 6:16 PM, Aaron Seelye aseelye-li...@eltopia.comwrote:

 I found I already had libconfuse, and installed libconfuse-dev, at which
 point I did another 'make deb', still getting the same result at the end.
  I just checked by running ldconfig -v, and the libconfuse library is
 indeed in there.  I even rebuilt to make sure the ldconfig I just ran didnt
 affect anything.  Same carrierroute.so size, same end result.

 Is something further needed to make kamailio incorporate the libconfuse
 files into the build process?

 -Aaron


 On 10/20/2013 5:12 AM, Marius Zbihlei wrote:

 Hello,

 Have you installed libconfuse? the symbol is part of the library. Be
 sure that you install both libconfuse-dev (for header) and libconfuse
 (can't even remember if it's packed in Debian anymore).

 Make double sure the library is present in your  $LD_LIBRARY_PATH .

 Anyway, some time ago there were plans to rewrite the configuration
 parsing of carrierroute so that it remove the dependencies of
 libconfuse? Any updates on that?

 M.


 On Sat, Oct 19, 2013 at 10:52 PM, Aaron Seelye
 aseelye-li...@eltopia.com 
 mailto:aseelye-lists@eltopia.**comaseelye-li...@eltopia.com
 wrote:

 On debian 7/wheezy, updated this morning, running kamailio 4.0.x
 (pulled this morning, git commit
 cabe585ea64c03d29bcdbe5c46b019**__0c41bf18a5), I'm running into an

 error loading carrierroute.so.  After setting the loadmodule
 carrierroute.so in the configuration, and starting kamailio, I'm
 given the error:

 Not starting Kamailio: invalid configuration file!
 -e
   0(28740) ERROR: core [sr_module.c:572]: load_module(): ERROR:
 load_module: could not open module
 /usr/lib64/kamailio/modules/_**_carrierroute.so:
 /usr/lib64/kamailio/modules/__**carrierroute.so: undefined symbol:

 cfg_set_error_function
   0(28740) : core [cfg.y:3567]: yyerror_at(): parse error in
 config file /etc/kamailio/kamailio.cfg, line 244, column 12-28:
 failed to load module
   0(28740) ERROR: core [modparam.c:163]: set_mod_param_regex():
 set_mod_param_regex: No module matching carrierroute found
   0(28740) : core [cfg.y:3570]: yyerror_at(): parse error in
 config file /etc/kamailio/kamailio.cfg, line 459, column 47: Can't
 set module parameter
   0(28740) ERROR: core [modparam.c:163]: set_mod_param_regex():
 set_mod_param_regex: No module matching carrierroute found
   0(28740) : core [cfg.y:3570]: yyerror_at(): parse error in
 config file /etc/kamailio/kamailio.cfg, line 460, column 90: Can't
 set module parameter
 ERROR: bad config file (3 errors)

 It starts fine without the carrierroute module (though I won't
 accomplish what I'd like to without it).  I just subscribed to the
 list, so I can't reply to previous emails, but it looks like Oliver
 Roth is seeing the same thing at
 http://lists.sip-router.org/__**pipermail/sr-users/2013-__**
 October/080096.htmlhttp://lists.sip-router.org/__pipermail/sr-users/2013-__October/080096.html
 http://lists.sip-router.org/**pipermail/sr-users/2013-**
 October/080096.htmlhttp://lists.sip-router.org/pipermail/sr-users/2013-October/080096.html
 .

   I saw a message from august that was vague regarding possibly
 something similar on CentOS needing libconfuse, but having installed
 that and remade/installed the debs, that doesn't appear to be it.

 At this point I'm fairly stuck, and would love a tip in the right
 direction.

 TIA,

 -Aaron

 __**___

 SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
 list
 sr-users@lists.sip-router.org 
 mailto:sr-us...@lists.sip-**router.orgsr-users@lists.sip-router.org
 
 
 http://lists.sip-router.org/__**cgi-bin/mailman/listinfo/sr-__**usershttp://lists.sip-router.org/__cgi-bin/mailman/listinfo/sr-__users
 
 http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**usershttp://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-**usershttp://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

Re: [SR-Users] [sr-dev] New developer: Lucian Balaceanu

2013-07-22 Thread Marius Zbihlei
Welcome Lucian and happy coding!

Marius


On Mon, Jul 22, 2013 at 11:18 AM, Daniel-Constantin Mierla 
mico...@gmail.com wrote:

 Hello,


 On 7/16/13 2:45 PM, Henning Westerholt wrote:

 Hello,

 I am pleased to announce a new developer for the Kamailio project: Lucian
 Balaceanu. Lucian works in our 11 office in Bucharest and is for some
 years
 with us in the company. He worked on several internal projects with our
 Kamailio stack and will contribute some fixes to the sipcapture and
 carrierroute module. He will also probably commit some other smaller
 fixes from
 time to time.

 Welcome Lucian and all the best,

 welcome and looking forward to new contributions,

 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/miconda



 __**_
 sr-dev mailing list
 sr-...@lists.sip-router.org
 http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

___
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] Not getting correct result after sending a OPTION query

2013-06-22 Thread Marius Zbihlei
Hello,

You need to register your test user to kamailio, using the password
provided. This adds a entry containing a contact (127.0.0.1:5070) to the
location table which is queried by the lookup() function in registrar.

The subscriber table only shows what users can subscribe to your system and
with what credentials.

Marius


On Sat, Jun 22, 2013 at 3:41 PM, aft aft...@gmail.com wrote:

 ( I posted a same message through gmane interface. gmane is not
 working right now at my place, So i can't respond to the replies i got
 there).

 I have now these users :

 arif@khost:~$ kamctl db show subscriber
 database engine 'MYSQL' loaded
 Control engine 'FIFO' loaded

 ++--+---++---+--+--+--+
 | id | username | domain| password   | email_address | ha1
  | ha1b | rpid |

 ++--+---++---+--+--+--+
 |  1 | test | 192.168.7.143 | testpasswd |   |
 ad87b307789553f95799738d87246ca0 | e211f539e22a1ad2cc0f3c07056c3517 |
 NULL |
 |  4 | test | 127.0.0.1 | ps |   |
 bca93be084f6c7a291c98fe9b0077b0b | d9ce12a4ec42448f65287de912cb9d43 |
 NULL |

 ++--+---++---+--+--+--+


 Now still if i send OPTION query

 sofsip o sip:test@127.0.0.1:5070
 UA: OPTIONS to sip:test@127.0.0.1:5070
 sofsip UA: OPTIONS 404 Not Found

 And from kamailio log :

 (5827) DEBUG: registrar [lookup.c:158]: lookup(): 'test' Not found in
 usrloc


 --
 -Cheers
 -Arif

 ___
 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] Basic question

2013-04-21 Thread Marius Zbihlei
Hello,

The function is
http://kamailio.org/docs/modules/stable/modules/textopsx.html#textopsx.msg_apply_changes,
but note that  unexpected results might happen.

Marius


On Sun, Apr 21, 2013 at 2:09 PM, אורן אברהם oren.av@gmail.com wrote:

 thank you for the explanation.

 can  you please tell me the name of the function that copy the changes to
 the inbound buffer ?




 2013/4/21 Olle E. Johansson o...@edvina.net


 21 apr 2013 kl. 01:50 skrev אורן אברהם oren.av@gmail.com:

  Dear List.
 
  I'm trying to change the contact header of a message. ( by calliing
 add_contact_alias - that shuld add the ;alias= parameter to the contact
 header)
  but, when i print the contact header (with xlog), it shows no change.
 
  I know the function works, and that it added the parameter as expected
 by using debug mode. (it sais that it was added)
 
  Can anyone explain me why i don't see that change in the xlog ? (i've
 printer both $ct and $hdr(Contact))
 

 Kamailio keeps two buffers of the incoming message, one is a copy of the
 incoming and the other one
 is the one where changes happen, a template for any outbound message used
 when forwarding
 to the next hop.

 If you change headers, they are changed in the outbound buffer, not the
 incoming. When you use
 functions to check headers, you check the incoming buffer.

 There is a function to apply changes to the inbound buffer that is needed
 sometimes, but very
 few times. It can be quite confusing if you are not aware of how changes
 to messages are applied.

 /O


 ___
 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] [sr-dev] Wiki site registration updates - OFF-TOPIC

2013-04-01 Thread Marius Zbihlei
Some ideas about improving the security of the site:

1. Drop http connections for authentication pages
2. Fix the  kamailio.org certificate. At the moment the identity of the
domain can't be established as there is no issuer chain provided with it.

From Firefox information page:

kamailio.org uses an invalid security certificate.

The certificate is not trusted because no issuer chain was provided.

(Error code: sec_error_unknown_issuer)


Marius


On Mon, Apr 1, 2013 at 6:55 PM, Edson - Lists 4li...@gmail.com wrote:

 Just as a side note, I've seem anti-spambots 'captcha systems' (just see,
 not implemented, nor know about a library that implement it) that use a
 dual factor approach: one that you see and one that you know.

 Indeed very simple: show an image and ask something about it.
 Questions can be: type just the letters, type just the numbers, type
 numbers and letters in pre-defined order (left-to-right,up-down,etc),
 number of colors, of groups, color on the booton right, etc... The
 combination are limited on the imagination. And the best: it increment in
 exponential the way bots have to work.

 Does anybody knows a library/system that implement such approach not all
 of them, but at least part of it?

 Edson.

 Em 01/04/2013 06:27, Daniel-Constantin Mierla escreveu:

 Hello,

 as of yesterday, creation of new accounts for Kamailio's wiki site
 requires to answer a project related question. Captcha was useless as
 spam bots were lately going through it easily, creating accounts in a
 rate of approx 50 new registrations per day.

 The extra question is asked just after CAPTCHA, see it at:
 - 
 https://www.kamailio.org/wiki/**start?do=registerhttps://www.kamailio.org/wiki/start?do=register

 Hopefully the questions are simple enough to allow good people to
 register and difficult enough for spambots to give up. It is not a very
 sophisticated system, let's see if there will be any efforts in reverse
 engineering to break in with bots. So far no new spammer account. If
 they will succeed, at least they learn something useful.

 If anyone has difficulties creating wiki accounts, write an email to
 sr-dev mailing list and it will be investigated.

 Cheers,
 Daniel

 PS. This registration system will last, is not for April 1.


 __**_
 sr-dev mailing list
 sr-...@lists.sip-router.org
 http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**devhttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

___
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] [sr-dev] Wiki site registration updates - OFF-TOPIC

2013-04-01 Thread Marius Zbihlei
Hello Daniel,

You were right in the end. After installing the Intermediate certificate
and the RootCA certificate for CACert (this was the missing one) it works,
but only for kamailio.org URLs not www.kamailio.org.

Great about pointing https://kamailio.org to the right page.

Cheers
Marius



On Mon, Apr 1, 2013 at 9:06 PM, Daniel-Constantin Mierla
mico...@gmail.comwrote:

  Hello,


 On 4/1/13 9:57 PM, Marius Zbihlei wrote:

 Hello,

  Comments inline


 On Mon, Apr 1, 2013 at 8:27 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:


 On 4/1/13 9:13 PM, Marius Zbihlei wrote:

 Some ideas about improving the security of the site:

  1. Drop http connections for authentication pages

  Not sure how much it will help, as the bots were able to create accounts
 by solving the captcha. HTTPS is no longer something hard to get in any
 application. So far so good with the new system, no spammer got that
 familiar with Kamailio modules :-), but there were few new valid accounts.


   Well,

  I would be very nice  for the https://www.kamailio.org to work (at the
 moment it returns an 200 OK with an empty HTML Page). Also, I consider bad
 security practice to allow traffic that is uncrypted for login forms, but I
 agree it has small benefits.


 You can access the login forms via https and it is recommended to use
 https for logging it, as mentioned on the front page of dokuwiki -- I just
 said that the https vs http does not bring benefits against spammers.



  2. Fix the  kamailio.org certificate. At the moment the identity of
 the domain can't be established as there is no issuer chain provided with
 it.

  From Firefox information page:


  You actually need to fix Firefox -- I struggled yesterday a bit with
 same situation. The certificate is actually new, generated yesterday and
 signed by CACert.org. The previous one was selfsigned, from openser times,
 expired for few years.

 I had to try other browsers to check if works, because Firefox was
 displaying some error. Then I went back to stable channel from beta channel
 without any success, even removing the old certificate from firefox
 preference. To solve it, I cleared the cache.


  I have tried with both Chrome and Firefox, both normal and Incognito
 mode. Same error. I believe the problem is with the server.


 It is working fine for me over https, tried both firefox and chrome. I
 replaced the certificate because the previous one was expired and
 mentioning openser. CACert is not a default trusted authority anyhow, I
 choose that instead of another self signed certificate because CACert has
 some popularity out there in the open source space.

 So, you don't really get to the content via https? Or is just that the
 browser does not trust it?

 Cheers,
 Daniel



  The server provides the correct certificate (I've downloaded it), but it
 must provide also an intermediate certificate signed with CaCert RootCA.
 The client only has the Root CA, so for authentication of the cert the
 intermediate one is needed.

  I guess 
 https://www.globalsign.com/support/install/install_apache.phpprovides a 
 solution ( Note that the root CA might not make sense)


- Your virtual host section will need to contain the following
directives:
- *SSLCACertificateFile* – This will need to point to the appropriate
GlobalSign root CA certificate.
- *SSLCertificateChainFile* – This will need to point to the
appropriate intermediate root CA certificates you previously created in
Step 1 above.
- *SSLCertificateFile* – This will need to point to the end entity
certificate (the one you have called mydomain.crt)
- *SSLCertificateKeyFile* – This will need to point to the private key
file associated with your certificate.



   Let me know if works for you in the same way.

 Cheers,
 Daniel


  
  kamailio.org uses an invalid security certificate.

  The certificate is not trusted because no issuer chain was provided.

  (Error code: sec_error_unknown_issuer)
 

  Marius


 On Mon, Apr 1, 2013 at 6:55 PM, Edson - Lists 4li...@gmail.com wrote:

 Just as a side note, I've seem anti-spambots 'captcha systems' (just
 see, not implemented, nor know about a library that implement it) that use
 a dual factor approach: one that you see and one that you know.

 Indeed very simple: show an image and ask something about it.
 Questions can be: type just the letters, type just the numbers, type
 numbers and letters in pre-defined order (left-to-right,up-down,etc),
 number of colors, of groups, color on the booton right, etc... The
 combination are limited on the imagination. And the best: it increment in
 exponential the way bots have to work.

 Does anybody knows a library/system that implement such approach not all
 of them, but at least part of it?

 Edson.

 Em 01/04/2013 06:27, Daniel-Constantin Mierla escreveu:

 Hello,

 as of yesterday, creation of new accounts for Kamailio's wiki site
 requires to answer a project related question

Re: [SR-Users] carrierroute module

2013-03-29 Thread Marius Zbihlei
Hello,

Either the .so is not linked to libconfuse, or you have installed only the
development headers and not the actual library. Check to see in /usr/lib
the version of libconfuse that you have installed, and than run `ldd
carrierroute.so` to check the dependency needed.

Cheers,
Marius


On Thu, Mar 28, 2013 at 4:16 PM, Angel Angelov anry.ange...@abv.bg wrote:

 Hello,

 When I tried to start kamailio-4.0 with carrirroute module include, the
 follow error appeared

  0(8732) ERROR: core [sr_module.c:572]: ERROR: load_module: could not
 open module /usr/local/kamailio-4.0/lib/kamailio/modules/carrierroute.so:
 /usr/local/kamailio-4.0/lib/kamailio/modules/carrierroute.so:* undefined
 symbol: cfg_getnint*.

 Do you need more information?
 Thanks in advanced.
 Regards.
 Angelov?


 ___
 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] How to remove custom header after adding one

2013-02-24 Thread Marius Zbihlei
Hello,

I can see two variants:
1. Move the append_hf in the branch route so you can have a per branch
decision
2. call mg_apply_change() from textops to immediately apply the changes
after append_hf()

http://kamailio.org/docs/modules/devel/modules/textopsx.html#textopsx.msg_apply_changes

You can call remove_hf() on the changed message.

Cheers,
Marius


On Sun, Feb 24, 2013 at 6:19 PM, Javi Gallart jgall...@systemonenoc.comwrote:

 Hello

 you may try to do the remove/add operations in each branch_route

 Regards

 Javi
 -Original Message-
 From: Mino Haluz mino.ha...@gmail.com
 Sender: sr-users-boun...@lists.sip-router.org
 Date: Sun, 24 Feb 2013 19:06:29
 To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
  Mailing Listsr-users@lists.sip-router.org
 Reply-To: SIP Router - Kamailio \(OpenSER\) and SIP Express Router
 \(SER\) -
 Users Mailing List sr-users@lists.sip-router.org
 Subject: [SR-Users] How to remove custom header after adding one

 ___
 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] dns queries on ipv6 addresses

2012-10-25 Thread Marius Zbihlei

On 10/25/2012 05:33 PM, Alex Hermann wrote:

On Thursday 25 October 2012, Juha Heinanen wrote:

an ipv6 address can thus never be a valid domain name.  an ipv4 address,
on the other hand, is syntactically valid domain name and perhaps
someone has populated their local name server with such names.

But the application (kamailio) should not attempt a DNS lookup if the hostname
is an IP(v4/v6) address, from RFC1123, section 2.1:


Whenever a user inputs the identity of an Internet host, it SHOULD
be possible to enter either (1) a host domain name or (2) an IP
address in dotted-decimal (#.#.#.#) form.  The host SHOULD check
the string syntactically for a dotted-decimal number before
looking it up in the Domain Name System.
.
.

Hello,

Didn't had time to check the RFCs (RFC 1123 is from 1989 so it might be 
updated), but from what I know the rule of the thumb (and inet_pton(3) 
is useful describing several cases where a string is considered an ip 
address):


- if a string can represent a 32-bit number (ipv4), or a 128 bit number 
(ipv6) than it represents and IP address of respective family (ping 
0xdeadbeef in console to see that 0xdeadbeef is a correct ip address).
-quad doted formats (decimal, octal or hexa) are allowed for IPv4 
(010.010.010.010 is actually 8.8.8.8)
-IPv6 addresses have several forms, eight groups or less, or the hybrid 
notation (e.g. :::192.168.0.2)


inet_pton(3), inet_aton(3), inet_addr(3) only handle part of these 
types, the new resolver API getaddrinfo(3) handles all + a and quad-a 
DNS request.


I think we should handle all as well...

Cheers,
Marius


.
However, a valid host name can never
have the dotted-decimal form #.#.#.#, since at least the
highest-level component label will be alphabetic.


It would be nice if Kamailio refuses to lookup both IPv4 and IPv6 addresses
independent of the address family of listening sockets (see my emails about
dispatcher and IPv6, where DNS lookups on IPv6 addressed are only skipped if
Kamailio is listening on an IPv6 address).





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] getting siptrace error on start up

2012-10-23 Thread Marius Zbihlei

On 10/22/2012 11:37 PM, Christopher Holland wrote:

getting this error:


Hello,

What version of Kamailio are you using, this parameter is available from 
3.2 onwards.


For building modules you can tune modules.lst as described here 
https://www.kamailio.org/wiki/install/devel/git#tuning_makefiles


Cheers,
Marius


kamailio: ERROR: core [modparam.c:151]: set_mod_param_regex: 
parameter trace_to_database not found in module siptrace
parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 
63, column 46: Can't set module parameter


I have set this to modparam(siptrace, trace_to_database, 0) in 
my .cfg


/I didn't compile siptrace when I compiled kamailio. I don't know how 
to add a module after compiling and installing kamailio. I haven't 
been able to find any documentaion on how to add a module after 
installing only compiling before installing.


Thanks all for your help

Christopher
/ 



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] compilation warnings

2012-09-24 Thread Marius Zbihlei

On 09/24/2012 02:09 PM, Vieri wrote:

Hi,


Hello,

Can you provide more information about what compiler (name, version) are 
you using?


Cheers,
Marius


On a Gentoo Linux system I'm getting the following compile-time warnings 
(kamailio-3.3.1 ebuild):

  * python_msgobj.c:529:5: warning: dereferencing type-punned pointer will 
break strict-aliasing rules

  * ld_con.c:241:4: warning: implicit declaration of function 
'ldap_simple_bind_s'

  * perl.c:340:2: warning: null argument where non-null required (argument 2)
  * perl.c:340:2: warning: null argument where non-null required (argument 1)

Hopefully I can just ignore these messages.

Thanks,

Vieri


___
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





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] authentication for client applications

2012-09-20 Thread Marius Zbihlei

On 09/20/2012 01:12 AM, David Thomson wrote:

Hi,

I am working on a project where a custom sip client will be integrated 
into a suite of applications to provide voip.  The sip client will be 
working with Kamailio.  The goal is to ensure that the client is 
authorized for communication with kamailio before allowing any calls 
to be made.  Conventional username/password authentication for 
individual users will also be used once the client has been authenticated.



Hello,

Why not rely on TLS with client-side authentication. Just deploy the 
client with a CA signed with a certificate known by  Kamailio, and then 
use the tls module with the following configuration to perform the 
client-certificate check:


1.9.8. |require_certificate| (boolean)

When enabled it will require a certificate from a client. If the client 
does not offer a certificate and |verify_certificate| is on, the 
certificate verification will fail.


The default value is off.

More information http://kamailio.org/docs/modules/devel/modules/tls.html

Cheers,
Marius


Currently other applications in the suite use a digital signature in 
the http headers when communicating with server processes.  If the 
signature is validated by the server process then the applications 
identity is validated and communication with the server process is 
allowed.


Is it possible to include a public key and digital signature in the 
register events and have kamailio perform the transformation to 
validate the client's identity?  If so which module provides such 
functionality?  Has something like this been implemented in the past? 
 Thanks for any input.


ttyl,
Dave



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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 usage

2012-09-05 Thread Marius Zbihlei

On 09/05/2012 10:19 AM, Uri Shacked wrote:

Hi,
When I start kamailio it loads some data into memory.
Now calls are starting to gather up. How can I check how mach memory 
does my avp's take?

BR,
Uri

Hello Uri,

avp's are associated with the transactions, so they free'd when the 
transaction stops(and calls are composed of transactions). This is true 
for dialog information as well (dlg_var's etc.). Continuous growth in 
memory at a constant call rate (incoming sip requests) might mean a 
leak. If you need statistics about the total memory usage you can use 
`kamctl fifo get_statistics all` and check for the shmem real_used_size 
and max_used_size fields.


Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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 usage

2012-09-05 Thread Marius Zbihlei

On 09/05/2012 11:44 AM, Uri Shacked wrote:

Hi,
Thanks,
How do i find memory leaks?
when my application starts the it shows the following values:
shmem:fragments = 143898
shmem:freesize = 3446570952
shmem:max_used_size = 861854768
shmem:real_used_size = 848396344
shmem:total_size = 4294967296
shmem:used_size = 319676976
I divided the real_used_size with the total_size and notice that 
it is 20%. So, this is my initial value of the application.
After 2 months with 40,000 calls per day, the relations between these 
values is 39%. (doing a reload of the data that occupies 20% failed 
due to no memory)
So, 19% occupation of memory is normal for this amount of calls? or is 
it a memory leak? if it is a memeory leak, how do i see where?

Hello,

Too little information to go on here. A reload might fail mostly because 
data from the DB (e.g. with carrierroute case) is first loaded into 
private memory (the sql result). Depending of the module there are other 
tricks you could do (decrease the number of fetch rows the query returns 
etc.). The out of memory condition affects shared or private mem. Try to 
use at least 15 MB for PKG mem.


If the 39% is with traffic, then it's normal, if you don't have any 
traffic I still would not worry. The thing that worries me a little is 
the value, you are using from the start around 0.8 GB of used shared 
memory... this is a lot. From the percentages you provided it looks ok


Marius

Uri
On 09/05/2012 10:19 AM, Uri Shacked wrote:
/Hi, //When I start kamailio it loads some data into memory. //Now 
calls are starting to gather up. How can I check how mach memory 
//does my avp's take? //BR, //Uri /Hello Uri,


avp's are associated with the transactions, so they free'd when the
transaction stops(and calls are composed of transactions). This is true
for dialog information as well (dlg_var's etc.). Continuous growth in
memory at a constant call rate (incoming sip requests) might mean a
leak. If you need statistics about the total memory usage you can use
`kamctl fifo get_statistics all` and check for the shmem real_used_size
and max_used_size fields.

Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania




--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] Segfault running 3.3.0 with registrar/p_usrloc/path

2012-08-01 Thread Marius Zbihlei

On 08/01/2012 01:05 PM, DanB wrote:

Hey Guys,

Just a quick follow up to see if anything happened with p_usrloc fixup.
Any chance to expect it running on new 3.3.1 release?

Hello Dan,

At the moment the GRUU/outbound patch is integrated into the master 
branch([1]). I don't know exactly if this is a bug (so it will be 
cherry-picked to 3.3.x) or a feature, that will be present in upcoming 
3.4. IMHO, I will treat this as a bug, so I will cherry-pick the patch 
and apply it to 3.3.x as well. If somebody objects please let's comment 
on the reasons.


Cheers,
Marius

[1] 
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1f6bfa0b3ba15201c2ca3e2387a9f9e81e989643 


Ta,
DanB

___
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





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] Shared memory fragmentation

2012-06-08 Thread Marius Zbihlei

On 06/08/2012 03:09 PM, Morten Isaksen wrote:

Hi,

Hello,


We have 2 Kamailio 3.0.3 servers that has been running with
carrierroute for about 2 years without any problems. They have 128 MB
shared memory and
The shared memory is too little. Keep in mind that this is shared by all 
children, so it will not increase with the creating of more children. 
Also keep in mind that the Linux memory alocator (like for mmap) is 
lazy, so allocating 1 GB by the application will not use 1 GB of RAM, 
but instead pages will be delivered to the application as it needs it. 
To force allocation there is the shm_force_alloc core parameter to 
really force allocation of memory by the system bye writing 0's to the 
memory reagion. Also there is the mlock_pages parameter that will force 
the allocated memory pages to not be swappable.

modparam(carrierroute, config_source, db)
modparam(carrierroute, db_url, DBURL)
modparam(carrierroute, fetch_rows, 500)


Fetch_rows is affects the private memory used when loading data from a 
data source that has the fetch result capability. This decreases the 
private memory requirements for reloading the table.


The carrierroute table is about 91K lines and have been growing slowly.


From experience this takes around 60-70 MB of shared memory to hold 
it.  This depends a lot based on system (32 vs 64 for example), 
structure etc.




Suddenly we get this ERROR: carrierroute [cr_data.c:585]: could not
allocate shared memory from available pool after a few kamctl cr
reload.

I increased the shared memory to 256 MB but with the same result. I
have now increased it to 512 MB and it seems to work better now.

I have noticed this. After a restart the shmem counters is like this:

shmem:total_size = 536870912
shmem:used_size = 28486752
shmem:real_used_size = 40147128
shmem:max_used_size = 41135424
shmem:free_size = 496723784
shmem:fragments = 555

And after the first kamctl cr reload it is like this:

shmem:total_size = 536870912
shmem:used_size = 28619016
shmem:real_used_size = 51842768
shmem:max_used_size = 76993616
shmem:free_size = 485028144
shmem:fragments = 722063

I would worry if the used_size or real_used_size would have changed a 
lot. The difference from used_size to real_used_size is due to 
fragmentation but this will be manageable if the number of fragments is 
kept constant. As Daniel suggested, for carrierroute reload we need 
double the amount of memory as it holds the old and the new tables until 
it swaps the pointers (so that the applications doesn't block when 
reloading the table).



Notice the increase in fragments. Sequentials kamctl cr reload does
not change the fragments allot.

Any ideas?


I would recommend using kamailio with at least 1 GB of shared memory. 
Also monitor the used_size and real_used_size  if they are increasing in 
a `weird` way. The real_used_size might increase because of 
fragmentation during cr_reload_route commands, but it should not fail, 
as chunks will be reallocated to other usages of the command.




Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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 debug send messages

2012-05-22 Thread Marius Zbihlei

On 05/22/2012 10:07 AM, Klaus Darilion wrote:

In my opinion it would be cool if core has a feature to log every
received and every sent message. The logging should include
timestamp+proto+sourceIP:port+receivedIP:port for received messages and
timestamp+proto+sourceIP:port+destinationIP:port for sent messages. For
TLS of course it should log the encrypted message.

Configuration should be done with a core parameter message_log=0-4,
similiar to memlog.

IIRC there were again issues with siptrace not logging all messages and
for example on a load balancer I do not want to use a DB just for logging.

Hello,

Siptrace can log all messages if used in onsend_route with the patch 
Anca provided (will be merged into the master after 3.3 branching). ATM, 
onsend is called only for messages and not replies but the patch 
addresses this. You can use siptrace to log the messages to a separate K 
instance, and there use any DB backend to store the messages.


Regarding logging, I think you can get all these parameters from 
route(), reply_route() (for incoming) and onsend_route() (for outgoing) 
and using xlog() statements.


Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] FW: (Devel) Segmentation fault using pua_dialoginfo

2012-05-16 Thread Marius Zbihlei

On 05/16/2012 03:02 PM, Charles Chance wrote:


Currently testing devel version and experiencing the following when 
using pua_dialoginfo:


-

Program terminated with signal 11, Segmentation fault.

#0  core_hash (t=0xb3d7e330, type=1024, ps=0xbfcc31c8) at 
../../hashes.h:279


279 v=(*p24)+(p[1]16)+(p[2]8)+p[3];



Hello,
Don't know if this is related, but the statement above hides a nasty 
bug: p[1] is a char (as for the description), so is signed, shifting to 
the left 16 bits is ok, as an integral promotion takes place. The 
problem is that if p[1] is negative (-1 is 0xff), then the integral 
promotion is signed as well and is complementary of 2 (or whatever the 
implementation considers), and the shift will return another value as 
expected.


For example :
#include stdio.h

int main(){
char b = 0xff;
unsigned h = (b16);
printf(%x\n, h);
return 0;
}

will print  instead of ff as expected. Haven't calculated 
the implication of this related to the bug. An fix would be to cast p[1] 
to (unsigned char)


Cheers,
Marius




--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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 debug send messages

2012-05-14 Thread Marius Zbihlei

On 05/11/2012 11:24 PM, Konstantin M. wrote:

Hi Daniel,

For some reasons, onsend_route doesn't triggered when transfering 
100,180,183, etc...



Hello,

Normally, onsend_route is not triggered for replies, only for messages. 
If there are some good reasons behind it, I don't know, as we have a 
simple patch that enables this (we are reviewing it before pushing it to 
upstream). Of course, no changes to the messages/replies are permitted ...


So again, is there a cause why onsend_route is not triggered for replies 
atm?


Cheers,
M.

2012/5/11 Daniel-Constantin Mierla mico...@gmail.com 
mailto:mico...@gmail.com


Hello,

debug messages printed to syslog from the source code are because
the developer needed/wanted them for troubleshooting.

As an admin, you have the option of using xlog to print what ever
messages you want. In 3.1.x there is onsend_route to see outgoing
requests via $snd(...) variable.

But if you want to get the sip traffic going through kamailio,
better use siptrace module which stores requests/replies in
database table.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -http://www.asipto.com

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


___
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





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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 + Asterisk, what happens when limit for gateway is reached

2012-03-12 Thread Marius Zbihlei

On 03/12/2012 11:00 AM, Sasa Vilic wrote:

Hello,

I have read here about load balancing between multiple gateways by 
using carrierroute module, but there is one particular question for 
which I found no answer.


Let's say I have two asterisk servers (X und Y), that are my gateways 
to PSTN. Let we do it simple. Let's say that each gateway supports 
only one outgoing call at the time and there is no incoming calls from 
PSTN. Now:


Bob calls one number and Kamailio uses X gateway.
Alice calls other number and Kamailio uses Y gateway.
Alice terminates the call.
Alice place a new call, but Bob's call is still in progress.
If we were used round robin algorithm, Kamailio would then use X 
gateway, but X gateway is currently occupied. What shell happen now?
And what if Alice didn't tear down call ordinary? What if it her SIP 
client simply crashed? (Then kamailio would think that there is now 
free gateway)


So the main question is: can kamailio know/detect, how much calls are 
going over one particular gateway and what can be done when limit for 
this gateway is reached?




Hello,

Carrierroute module support load balancing based on weights(so it can be 
non-uniform distribution).Keep in mind that this works on large numbers 
of calls, so on the long run we will have 50-50% load on the servers 
(given enough calls). For small number of calls (like your example) the 
carrierroute module has no way of determining to route on the other 
gateway.


As others suggested, you can use failure_route to route between 
gateways. Carrierroute module supports this over the failure route table.


Cheers,
Marius

Thank you in advance.

Kind Regards,
Sasa Vilic



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] exec_avp problem

2012-03-12 Thread Marius Zbihlei

On 03/12/2012 02:27 PM, Uri Shacked wrote:

Hi,
i am using the exec_avp command as followed:
/exec_avp([/usr/local/etc/kamailio/maintenance/service/service_pr.sh,  
$avp(xxx),$avp(yyy));/
//
here is the shell script content:
//
/RETVAL=-1
RES=`kamctl cr reload`
RETVAL=$?
echo $RETVAL
echo $RES/


Hello,

Check to see if you can run the script as the user that is the user id 
of the kamailio process. Also use the full path to the kamctl script, as 
relying on $PATH might not work always (environment settings).


Cheers
Marius

//
I keep on getting 127 as the retval. any ideas why?
I must say that two days ago, the script was OK. :-(
where i run the script manualy i have no problems... retval is 0.



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] avp_delete problem [kamailio 1.5]

2012-02-22 Thread Marius Zbihlei

On 02/22/2012 09:45 AM, Sven Knoblich wrote:

Hello all,
i am currently confused by using the avpops function avp_delete. When i
run avp_delete without the flag-value \g only the last value will be
unset (like an undo). Is this the wanted behaviour?

Hello Sven,

After looking thru the code it seems that this is the wanted behaviour 
(something like sed with /g switch) even in 3.x (master).


From the fixup function of avp_delete :
code
case 'g':
case 'G':
ap-ops|=AVPOPS_FLAG_ALL;
/code

This flag is sent as the /all /parameter in destroy_avps in usr_avp.c 
method. (The avp's are inserted in memory in reversed order so it's a 
Last In First Out type structure)


Cheers
Marius

EXAMPLE:

$avp(test) = test
if( $avp(test)){xlog(L_NOTICE,result1:$avp(test)\n);}

$avp(test) = nooo;
if( $avp(test)){xlog(L_NOTICE,result2:$avp(test)\n);}

avp_delete($avp(test));
if( $avp(test)){xlog(L_NOTICE,result3:$avp(test)\n);}


RESULT:

result1:test
result2:nooo
result3:test

Could anybody helps me to understand that?

thanks in advance,
Sven


___
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




--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] Problems with TCP

2012-02-16 Thread Marius Zbihlei

On 02/16/2012 05:26 PM, Mino Haluz wrote:

2) I tried to set mhomed=1, but it has become even worse - No out socket.


Hello,

mhomed only works for UDP connection. It shouldn't have any effect on 
TCP. There must be something else.


For TCP and multihomed, I think you have to use force_send_socket. 
Because the fact the receiving socket will always be selected to send 
the message on,  you either have to use force_send_socket to specify a 
routeable interface, or ensure that the client ip is reacheable from the 
ones that receives the message.


Manipulating routes might give you more answers (ip route)

Cheers
Marius
So I tried to disable it again and force kamailio to listen on 
physical address as well (so simultaneously on virtual and physical). 
The error disappeared, but the BYE message is not forwarded, it is 
processed and onsend event-route is triggered as usually , but the 
packet is not sent anywhere. I used tcpdump -i any. I will investigate 
if it is some network issue, however, is there any way how to debug it 
further ?


On Mon, Feb 13, 2012 at 4:28 PM, Daniel-Constantin Mierla 
mico...@gmail.com mailto:mico...@gmail.com wrote:


Hello,

for 1) Is the device behind nat? Do you have tcp connection
lifetime parameter value long enough?

for 2) is the physical IP a public space IP? Do you have mhomed
parameter set? It is a warning saying that the interface returned
by OS for connecting to the destination is not in the listen list.

for 3) yes it is expected behaviour, you just need to do record
routing as usual, nothing special.

Cheers,
Daniel


On 2/13/12 11:43 AM, Mino Haluz wrote:

Hi,

our customers are using mostly UDP but some of them want to use
TCP. The problem is, I get various TCP errors in kamailio log and
I do not understand what they mean

1) ERROR: core [tcp_main.c:4130]: connect customerIP:port failed
This means kamailio is trying to connect with TCP to the customer ??
2) WARNING: tcp_do_connect customerIP:port : could not find
corresponding listening socket for IPaddress , using default... (
where IPaddress is kamailio physical IP address)
Kamailio has one virtual IP address (heartbeat IP address) and
one physical. It listens on the virtual IP address but I do not
understand why it is trying to use the physical IP address ?

I was investigating this thing because the BYE message is not
being relayed if the TCP is used (everytime the 2. error message
is printed), so that's why I have to understand what it really
means...

And the last question,

3) If kamailio is relaying the traffic to the PSTN gateway, and
the customer is using TCP, kamailio uses TCP as well for
connecting to the PSTN gw. Is this behaviour normal ? I would
expect that

customer -- TCP -- kamailio --- UDP -- GW,

and not

customer -- TCP -- kamailio --- TCP -- GW,

Thanks,
Mino




___
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://www.asipto.com

http://linkedin.com/in/miconda  -- http://twitter.com/miconda





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9152
Str Mircea Eliade 18Tel RO: +40-31-223-9152
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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 usage problem in xmpp modules

2012-01-26 Thread Marius Zbihlei

On 01/26/2012 02:34 PM, laura testi wrote:

Hi Hennings,
thanks a lot for your answer.

I'm sending you other information about our Kamailio xmpp server.

in attach the sercmd cfg.set_now_int core mem_dump_shm output.

And here:

kamctl fifo get_statistics | grep mem

shmem:fragments = 13107
shmem:free_size = 99724520
shmem:max_used_size = 57559216
shmem:real_used_size = 34493208
shmem:total_size = 134217728
shmem:used_size = 25651280

Thanks an kind regards,

Hello,

This seems pretty low (and normal). Probably there are some problems 
with external libraries (API) using malloc and not properly freeing 
memory. This is not a problem with the library itself, but more with the 
way the library is used. For example the libpcre library had this sort 
of leak when used in the regex modules.


Look for external libraries (by checking the dependency list) for the 
custom setup you have. Then, try to match every external library 
instantiation(allocation) (via library method) to a corresponding 
release of resources.


Cheers
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] carrierroute issue with rewrite host

2011-12-21 Thread Marius Zbihlei

On 10/25/2011 03:28 PM, Uri Shacked wrote:


Hi,

I am using kamailio (only one) as routing engine. I have 2 gateways. 
Both of them sending calls to kamailio.


When i use the carrierroute module i need to change (and succeed) the 
user ($rU). But, i need to send the call (the invite) back to the 
gateway that sent me the call from the beginning (it can be either one 
of those 2). So, my problem is that i don’t want to rewrite the host 
in carrierroute, just the user. If i leave the rewrite_host field 
empty, it is considered to be black list and drops the call. If i 
rewrite the host, i can send the call to the second gateway that was 
not the one that sent the call, and the call drops as well.




Hello,

after cr_route() that sets the RURI set $du (pseudovar  needs pv.so 
afaik ) to either of the 2 balancers (or to a domain that resolves to 
both of the two balancers - for load balancing). $du will set the 
destination uri of the package without modifying the RURI (which is set 
by cr_route()), so the balancer will route the message to the client.


Cheers
Mraius


any ideas how to use carrierroute for changing user only and send the 
invite back to the gateway that originally sent the call?


Thanks,

Uri




--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] force_send_socket and IPv6

2011-12-15 Thread marius zbihlei

On 12/14/2011 07:28 PM, Andreas Granig wrote:

Hey Daniel,

On 12/14/2011 06:00 PM, Daniel-Constantin Mierla wrote:

is the ipv6 address in between square brackets (can you give exact usage
of the foce_send_socket())? It should work as the bridging ipv4-ipv6 is
using the same mechanism -- may be an issue with the exported function
to config, though. Can you try to set $fs as alternative to
force_send_socket()?

I tried both ways, like force_send_socket(x::x:5060); and
force_send_socket([x::x]:5060); - both resulting in the same error.

However, doing $fs=[x::x]:5060; works perfectly fine, thanks for the hint!

A fix for force_send_socket would maybe still be good to not confuse people.

Thanks,
Andreas



Hello,

Actually, looking at the code I've observed some weird behavior :  for 
example to fix the force_send_socket IPv6 address, a call to str2ip6() 
(from resolve.h) is done (via resolvehost()). The function tries to 
manually parse the IP address, so it makes me wonder why not use a 
library function like inet_pton(AF_INET6... to get the correct structure.


A possible bug is that with the current code, IPv4 mapped to IPv6 
(x:x:x:x:x:x:d.d.d.d) will not be parsed correctly.


Why don't we use inet_pton(AF_INET6 ... . Any reasons?

Cheers
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] force_send_socket and IPv6

2011-12-15 Thread marius zbihlei

On 12/15/2011 04:41 PM, Daniel-Constantin Mierla wrote:

Hello,

On 12/15/11 1:18 PM, marius zbihlei wrote:

On 12/14/2011 07:28 PM, Andreas Granig wrote:

Hey Dani

Hello,

Actually, looking at the code I've observed some weird behavior :  for
example to fix the force_send_socket IPv6 address, a call to str2ip6()
(from resolve.h) is done (via resolvehost()). The function tries to
manually parse the IP address, so it makes me wonder why not use a
library function like inet_pton(AF_INET6... to get the correct structure.

A possible bug is that with the current code, IPv4 mapped to IPv6
(x:x:x:x:x:x:d.d.d.d) will not be parsed correctly.

Why don't we use inet_pton(AF_INET6 ... . Any reasons?

have you checked if inet_pton() doesn't break the internal ip_addr
structure and the use of it? If all is ok, I guess inet_pton() is
portable enough through most unix/linux distro's to make use of it.

Cheers,
Daniel



Hello,

Even if inet_pton() can't use our existing structure, but it can use an 
in6_addr structure (size is 16 bytes) that can be easily converted into 
our internal representation (keep in mind endianess and other constraints).


I will have a look when I implement it and will test the changes.

Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] force_send_socket and IPv6

2011-12-15 Thread marius zbihlei

On 12/15/2011 06:33 PM, Andreas Granig wrote:

So, to sum it up:

If you want to use IPv6, use $fs instead of force_send_socket() (or
maybe multihoming, haven't tried that yet), and set dns_try_ipv6=yes.

Andreas


Hello,

I have attached an improved version (uses inet_pton instead of manually 
parsing the address) of the str2ip6 function that was failing initially. 
Can you test it against force_send_socket() with an IP address in the 
form [ipv6_address]:port (the [] are mandatory) ?


Thanks,
Marius
(in the sip-router/ directory run patch d.patch to apply the patch)


--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

From 7c9d698e7fbb55f20bf025a8f4b6cdeb5e9aa837 Mon Sep 17 00:00:00 2001
From: Marius Zbihlei marius.zbih...@1and1.ro
Date: Thu, 15 Dec 2011 18:39:23 +0200
Subject: [PATCH] core: resolve.h For IPv6 use inet_pton instead of custom parsing functions

---
 resolve.h |  117 ++--
 1 files changed, 28 insertions(+), 89 deletions(-)

diff --git a/resolve.h b/resolve.h
index 5611c9d..08b524b 100644
--- a/resolve.h
+++ b/resolve.h
@@ -274,111 +274,50 @@ error_dots:
 
 
 #ifdef USE_IPV6
+#include arpa/inet.h /*for inet_pton*/
+
 /* returns an ip_addr struct.; on error returns 0
  * the ip_addr struct is static, so subsequent calls will destroy its content*/
-static inline struct ip_addr* str2ip6(str* st)
-{
-	int i, idx1, rest;
-	int no_colons;
-	int double_colon;
-	int hex;
+ 
+static inline struct ip_addr* str2ip6(str* st){
 	static struct ip_addr ip;
-	unsigned short* addr_start;
-	unsigned short addr_end[8];
-	unsigned short* addr;
-	unsigned char* limit;
-	unsigned char* s;
+	char addr[128];
+	unsigned char* buf = ip.u.addr;
+#ifdef RESOLVE_DBG
+	unsigned short* addr_start = ip.u.addr16;
+#endif
+	memset(addr, 0, sizeof(addr));
+
+	if(!st || !st-s || !st-len) goto error;
 	
-	/* init */
-	if ((st-len)  (st-s[0]=='[')){
-		/* skip over [ ] */
-		if (st-s[st-len-1]!=']') goto error_char;
-		s=(unsigned char*)(st-s+1);
-		limit=(unsigned char*)(st-s+st-len-1);
-	}else{
-		s=(unsigned char*)st-s;
-		limit=(unsigned char*)(st-s+st-len);
-	}
-	i=idx1=rest=0;
-	double_colon=0;
-	no_colons=0;
 	ip.af=AF_INET6;
 	ip.len=16;
-	addr_start=ip.u.addr16;
-	addr=addr_start;
-	memset(addr_start, 0 , 8*sizeof(unsigned short));
-	memset(addr_end, 0 , 8*sizeof(unsigned short));
-	for (; slimit; s++){
-		if (*s==':'){
-			no_colons++;
-			if (no_colons7) goto error_too_many_colons;
-			if (double_colon){
-idx1=i;
-i=0;
-if (addr==addr_end) goto error_colons;
-addr=addr_end;
-			}else{
-double_colon=1;
-addr[i]=htons(addr[i]);
-i++;
-			}
-		}else if ((hex=HEX2I(*s))=0){
-addr[i]=addr[i]*16+hex;
-double_colon=0;
-		}else{
-			/* error, unknown char */
-			goto error_char;
-		}
-	}
-	if (!double_colon){ /* not ending in ':' */
-		addr[i]=htons(addr[i]);
-		i++; 
-	}
-	/* if address contained '::' fix it */
-	if (addr==addr_end){
-		rest=8-i-idx1;
-		memcpy(addr_start+idx1+rest, addr_end, i*sizeof(unsigned short));
-	}else{
-		/* no double colons inside */
-		if (no_colons7) goto error_too_few_colons;
+
+	if ((st-s[0]=='[')){
+		/* skip over [ ] */
+		if (st-s[st-len-1]!=']') goto error;
+		memcpy(addr, st-s+1, st-len-2);
+	} else {
+		memcpy(addr, st-s, st-len);
 	}
-/*
-	DBG(str2ip6: idx1=%d, rest=%d, no_colons=%d, hex=%x\n,
-			idx1, rest, no_colons, hex);
-	DBG(str2ip6: address %x:%x:%x:%x:%x:%x:%x:%x\n, 
-			addr_start[0], addr_start[1], addr_start[2],
-			addr_start[3], addr_start[4], addr_start[5],
-			addr_start[6], addr_start[7] );
-*/
-	return ip;
 
-error_too_many_colons:
-#ifdef RESOLVE_DBG
-	DBG(str2ip6: ERROR: too many colons in [%.*s]\n, st-len, st-s);
-#endif
-	return 0;
+	if( inet_pton(AF_INET6, addr, buf) != 1) goto error;
 
-error_too_few_colons:
 #ifdef RESOLVE_DBG
-	DBG(str2ip6: ERROR: too few colons in [%.*s]\n, st-len, st-s);
+	  DBG(str2ip6: address %x:%x:%x:%x:%x:%x:%x:%x\n,
+			addr_start[0], addr_start[1], addr_start[2],
+			addr_start[3], addr_start[4], addr_start[5],
+			addr_start[6], addr_start[7] );
 #endif
-	return 0;
+	return ip;
 
-error_colons:
+error:
 #ifdef RESOLVE_DBG
-	DBG(str2ip6: ERROR: too many double colons in [%.*s]\n, st-len, st-s);
+	DBG(str2ip6: ERROR: could not resolve address [%.*s]\n, st-len, st-s);
 #endif
 	return 0;
-
-error_char:
-	/*
-	DBG(str2ip6: WARNING: unexpected char %c in  [%.*s]\n, *s, st-len,
-			st-s);*/
-	return 0;
 }
-#endif /* USE_IPV6 */
-
-
+#endif /*USE_IPV6*/
 
 struct hostent* _sip_resolvehost(str* name, unsigned short* port, char* proto);
 
-- 
1.7.0

___
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] carrierroute reload option

2011-12-14 Thread marius zbihlei

On 12/14/2011 10:28 AM, Uri Shacked wrote:

Hi,
Is there a way to reload only specified raws from the carrierroute 
table and not reload the full table?

BR,
Uri

Hello

No, there is no such way. But you could modify the table to only those 
nodes and issue a full reload. Keep in mind that the switch between 
the old routing table and the new is atomic.


Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] carrierroute reload option

2011-12-14 Thread marius zbihlei

On 12/14/2011 12:24 PM, Uri Shacked wrote:


OK,
If for example I loaded at startup 30K raws.
Then, after 5 min 20 raws needs to change...
I truncate the carrierroute table, populate it again with 20 raws
onlye and reload
what about the others? they will be gone right?



Hello,

Yes, the new loaded carrierroute will contain only 20 raws. Instead of 
truncate/insert do an update on the 20 rows and and a cr_reload fifo 
command.


Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] Problem to verify contact header

2011-12-08 Thread marius zbihlei

On 12/07/2011 06:45 PM, Bruno Bresciani wrote:
this line is present in a module that i am writting, but on 
modules_k/pua_bla/notify.c line 205 has a similar condition...


Cheers

607af7c7 (Henning Westerholt   2008-08-07 08:39:24 + 203)   
if(msg-contact== NULL || msg-contact-body.s== NULL)


As you can see, it test if it _is_ NULL (==) not different (!=).

Marius



2011/12/7 marius zbihlei marius.zbih...@1and1.ro 
mailto:marius.zbih...@1and1.ro


On 12/07/2011 06:24 PM, Bruno Bresciani wrote:

Hi All,

Kamailio generate a core at line below

if(_msg-contact!= NULL || _msg-contact-body.s!= NULL){

_msg is a sip_msg struct that my module receive from kamailio.
I want verify if on that request messagem have a contact
header, but a core is being generated when contact header
isn't present on message.

Someone knows why this is happening?

Cheers

Hello,

Looks like a bug. Can you also point to  the source file where
this line is present. It certainly looks like a typo. I've tried
grepping over the latest 3.2 but to no avail.

Cheers,
Marius

-- 
Zbihlei Marius


Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
tel:%2B40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
mailto:marius.zbih...@1and1.ro
71295, Romania



___
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





--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] Problem to verify contact header

2011-12-07 Thread marius zbihlei

On 12/07/2011 06:24 PM, Bruno Bresciani wrote:

Hi All,

Kamailio generate a core at line below

if(_msg-contact!= NULL || _msg-contact-body.s!= NULL){

_msg is a sip_msg struct that my module receive from kamailio. I want 
verify if on that request messagem have a contact header, but a core 
is being generated when contact header isn't present on message.


Someone knows why this is happening?

Cheers

Hello,

Looks like a bug. Can you also point to  the source file where this line 
is present. It certainly looks like a typo. I've tried grepping over the 
latest 3.2 but to no avail.


Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] Fwd: [Sip-implementors] FOSDEM 2012 Telephony/Communications Devroom Call for Presenters

2011-11-15 Thread marius zbihlei



 Original Message 
Subject: 	[Sip-implementors] FOSDEM 2012 Telephony/Communications 
Devroom Call for Presenters

Date:   Mon, 14 Nov 2011 20:28:53 +0100
From:   Kevin P. Fleming kpflem...@digium.com
To: 	sip-implement...@lists.cs.columbia.edu 
sip-implement...@lists.cs.columbia.edu




Greetings,

This is a call for presenters (with presentations!) for the telephony
and communications devroom at FOSDEM 2012 - http://www.fosdem.org/.

We will be holding a day full of presentations on development topics in
the area of open source telephony and communications on Sunday, February
5th. The schedule allows for presentations from 9:00 to 17:00. The room
we will be using will have a projector, wifi, and 100 seats.

Please submit all proposals no later than 2011-12-09.  Notification of
accepted speakers will be provided by 2011-12-16.  We will then work to
have a schedule finalized by 2012-01-06.  Talks should be submitted by
subscribing to and then posting to the telephony-devroom mailing list
hosted on http://lists.fosdem.org/.  If you would like to contact the
devroom organizer directly, please contact Kevin P. Flemingkpfleming
at digium.com.

Feel free to forward this along to any people or mailing lists that you
think would be interested in this event.

Thank you!
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
Jabber: kflem...@digium.com | SIP: kpflem...@digium.com | Skype: kpfleming
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at www.digium.com  www.asterisk.org
___
Sip-implementors mailing list
sip-implement...@lists.cs.columbia.edu
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors


___
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] Carrierroute: Could not allocate shared memory

2011-10-10 Thread marius zbihlei

On 10/10/2011 03:51 PM, Mino Haluz wrote:

Hi,

is there any setting which could allow me to set maximum memory per 
module ? As I am testing the carrier route module, I've added for 
testing purposes 100 000 rules sofar. When I start the kamailio, it 
gives me :


Oct 10 14:46:46 kamrouter /usr/sbin/kamailio[2182]: ERROR: 
carrierroute [../../ut.h:702]: could not allocate shared memory from 
available pool
Oct 10 14:46:46 kamrouter /usr/sbin/kamailio[2182]: ERROR: 
carrierroute [cr_rule.c:155]: could not allocate shared memory from 
available pool


Thanks.


Hello

Can you increase the shared memory size ? But 100k rules should take 
only about 40-50MB of shared memory... I advise for at least 
1GB(gigabyte) of SHM.


The error is happening only when the rules are loaded (or reloaded via 
cr_reload_routes) or during a message processing (I understand the 
former but just want to make sure)


Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] no more pkg mem on ul_dump

2011-10-06 Thread marius zbihlei

On 10/06/2011 11:52 AM, Klaus Darilion wrote:

Hi!

Kamailio 1.3.4: kamctl ul monitor causes:

ERROR:core  [attr.c:80]: no more pkg mem (21)
ERROR: mi_fifo [fifo_fnc.c:513]: command (ul_dump) processing failed

There are ~ 2000 entries in location table. Default PKG size is used.

I remember there were some similar reports recently, but couldn't find
the relevant threads.



Hello,

You can either increase the PKG size, or (what we do),  uncomment a line 
in sip-router/lib/kmi/Makefile that enables system malloc instead of 
pkg_malloc for fifo commands.


## uncomment next line for using system malloc with MI
#DEFS+= -DMI_SYSTEM_MALLOC

Cheers,
Marius

Any hints for the cause of this problem and workarounds?

Thanks
Klaus

___
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



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] no more pkg mem on ul_dump

2011-10-06 Thread marius zbihlei

On 10/06/2011 02:12 PM, Antanas Masevicius wrote:

Hello,

i would vote for dynamic allocation too. These days i had to allocate
way more than default 4MB of pkg mem. Does anyone who used heavy MI
loaded system with MI_SYSTEM_MALLOC compiled could give us feedback on
how this feature is stable currently?



Hello,

Sorry, i have read kamailio 3.1.4 not 1.3.4. The MI_SYSTEM_MALLOC is 3.x 
only so this is not an options. As I've said in the previous mail, we 
are using it for quite a while now, no problems what so ever


Marius

best regards,

Antanas Masevicius

On 2011.10.06 14:04, Daniel-Constantin Mierla wrote:

Hello,



On 10/6/11 10:52 AM, Klaus Darilion wrote:

Hi!

Kamailio 1.3.4: kamctl ul monitor causes:

ERROR:core  [attr.c:80]: no more pkg mem (21)
ERROR: mi_fifo [fifo_fnc.c:513]: command (ul_dump) processing failed

There are ~ 2000 entries in location table. Default PKG size is used.

I remember there were some similar reports recently, but couldn't
find the relevant threads.

Any hints for the cause of this problem and workarounds?

you can turn on usage of system memory manager for MI, see
lib/kmi/Makefile

Maybe we should make it default. With the size of the config files
today, is not much left for other pkg operations, specially dumping
content via MI.

Cheers,
Daniel




--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] releasing v3.2.0

2011-09-28 Thread marius zbihlei

On 09/28/2011 12:56 PM, Daniel-Constantin Mierla wrote:

Hello,

it is time to set the time to release v3.2.0. From my point of view,
testing went very well, considering also that core and main modules were
not touched much during this devel cycle, the most of the efforts were
on new modules and application service components such as presence
server, Lua ...

A convenient date for me will be Tuesday, October 18, 2011, allowing to
work a bit on packaging and docs. If there are other preferences, jump
in this discussion.

Cheers,
Daniel


Hello Daniel,

I have some patches regarding IPv6 interface discovery on Linux. Now the 
IPv6 interfaces have to be manually binded to via a listen directive 
(because ipv6 discovery doesn't work on linux), but this patch fixes it 
.So if kamailio is not given a listen interface , he will discover any 
non-link-local ipv6 iface and bind to it. This changes the default 
behavior (no IPv6 default binding), and works for all supported 
transport protocols (UDP, TCP, SCTP, TLS(over TCP))


The patch is fairly well tested (but not yet in production), and is 
based on Linux specific RT_NETLINK sockets (for other NIX flavors like 
BSD the present code works well).


Do you think this patch is of interest for 3.2 release?

Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] releasing v3.2.0

2011-09-28 Thread marius zbihlei

On 09/28/2011 01:24 PM, Daniel-Constantin Mierla wrote:

can you push it in a personal branch to review the impact on the
existing code. It is of interest, of course, ultimately there can be a
parameter (cfg or command line) to control it.

Thanks,
Daniel


Hello Daniel,

Here it is 
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bcea195d73c85adaa9790320998100b80a00b375


branch mariuszbihlei/ipv6_fix

Cheers,
Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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 terminating after upgrading from 3.1.2 to 3.1.4

2011-09-15 Thread marius zbihlei

On 09/14/2011 07:40 PM, Phillman25 Kyriacou wrote:

Hello

Here is the output of the gdb commands:

(gdb) core core
[New Thread 18567]
Core was generated by `/usr/local/sbin/kamailio -P 
/var/run/kamailio/kamailio.pid -m 64 -u root -g roo'.

Program terminated with signal 6, Aborted.
#0  0x0040a422 in __kernel_vsyscall ()
.
.
.

(gdb) bt full
#0  0x0040a422 in __kernel_vsyscall ()
No symbol table info available.
#1  0x0056a651 in ?? ()
No symbol table info available.
#2  0x00695ff4 in ?? ()
No symbol table info available.
#3  0x0056da82 in ?? ()
No symbol table info available.
#4  0x0006 in ?? ()
No symbol table info available.
#5  0xbff91960 in ?? ()


Hello,
This is not very helpful as the debug symbols weren't loaded. You have 
to compile Kamailio with debug symbols (make sure the -g flag is passed 
to CFLAGS when compiling) and then reload the core (it is not mandatory 
to generate another one )


make QUIET=no (to see the flags)

Also don't strip the executable


Marius

--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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 terminating after upgrading from 3.1.2 to 3.1.4

2011-09-14 Thread marius zbihlei

On 09/14/2011 05:01 PM, Phillman25 Kyriacou wrote:

Dear Marius

Thank you for your prompt reply.
I apologise, As i am a newbie could you please explain how to produce 
the below output that you require?



if you can reproduce the crash, in a shell write

ulimit -c unlimited #to allow unlimited size of coredump
kamailio -f ../path/to/cfg #any other options you give to kamailio
here the crash happens - make it happen

In the directory that you lunch the commands you will find several 
core.kamailio.pid (or simply just core) file, that are called 
coredumps (they should be fairly large so don't worry)


After that :

gdb /path/to/kamailio core.kamailo.pid #or how the core was called
bt full
info reg

(these commands are in gdb prompt)
Paste the output of the gdb commands and lets see what happens. It would 
really help if kamailio already has debug symbols when compilling 
(should be enabled by default).


Cheers
Marius


Thanking you in advance for your help!

Regards
Phillip



___
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] cr default route

2011-09-13 Thread marius zbihlei

On 09/02/2011 03:52 PM, caio wrote:

Hello,


Hello,
The documentation of carrierroute says If flags and mask are not 
zero, and no match to the message flags is possible, no routing will 
be done. Then is there any route entry which can act as default gw 
(like an always-match entry)?



From what I see in the code and documentation, no.

For example this 'carrierroute' table:

   +-++-+---+--+--+
   | carrier | domain | scan_prefix | flags | mask |
   +-++-+---+--+--+
1  |   1 |  1 | 156 | 500 |0 |
2  |   1 |  1 | | 0 |0 |
3  |   1 |  2 | | 0 |0 |
   +-++-+---+--+-

Here if ruri is 156xx, and there is no flag set, then the cr module 
does not find a match because of the non-zero value in the flag column 
(entry 1).
But I want to route this call via carrier1 domain1 and scan_prefix 
empty-value entry (entry 2).


It seems that you can't select route 2, but you can select rule 3. For 
example


if(!cr_route(default, 1, $rU, $rU, call_id)){
if(!cr_route(default, 2, $rU, $rU, call_id)) #here rule 3 
would be selected because domain is 2, not 1

send_reply(403, Not allowed);
}

So you can have a special domain for each carrier that has no flags set 
and just acts like a catch all construct. Performance should not be 
impacted.


Hope this helps.
Marius

How can I set a default route entry here? Is possible with cr? Now I 
only find it possible via a pstn.def_gw_ip variable.

Thank you,

Claudio



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania

___
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] new developer: Sven Knoblich

2011-09-05 Thread marius zbihlei

On 09/05/2011 10:58 AM, Daniel-Constantin Mierla wrote:

Hello,

On 9/1/11 3:17 PM, Henning Westerholt wrote:

Hi all,

I'm happy to announce a new developer for the sip-router project:
Sven Knoblich.

Sven is an experienced C/C++ developer in our offices in Karlsruhe and since
about a year part of the team that develops our VoIP backend services.

Past contributions of him were the CDR based accounting extensions in the acc
module and several other bugfixes and extensions for the dialog module. He'll
maintain in the future this new acc and dialog functionality and also other
code contributed from us.

welcome Sven, thanks for CDR extension to acc and looking forward to new
contributions.

Cheers,
Daniel

Welcome Sven,

Happy hacking!

Marius

  



___
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] add carrierroute module

2011-08-25 Thread marius zbihlei

On 08/25/2011 11:46 AM, Skyler wrote:

Hi,

  What OS are you running? Did you compile from source or install via
packages?



Hello,

If installed via packages apt-get install kamailio-carrierroute-modules

If compiled check that carrierroute it's not in the exclude_module list 
(it depends on some external library) and recompile .


Marius

Skyler

On Tue, 2011-08-23 at 15:40 +0300, אורי שקד - חטיבת הנדסה ורשת - Uri
Shacked wrote:



--
Zbihlei Marius

Head of
Linux Development Services Romania

11 Internet Development srlTel KA: 754-9512
Str Mircea Eliade 18Tel RO: +40-31-223-9512
Sect 1, Bucuresti   mailto: marius.zbih...@1and1.ro
71295, Romania


___
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] Carrierroute Compilation error Kamailio 3.1.4

2011-06-22 Thread marius zbihlei

On 06/22/2011 03:41 AM, Omar wrote:

Here we go

   


Hello Omar,

You are missing a -DOPENSER_MOD_INTERFACE in the gcc command line. This 
is set in modules/carrierroute/Makefile  like below


...
DEFS+=$(CONFUSEDEFS)
LIBS=$(CONFUSELIBS)

DEFS+=-DOPENSER_MOD_INTERFACE

SERLIBPATH=../../lib
SER_LIBS+=$(SERLIBPATH)/trie/trie $(SERLIBPATH)/srdb1/srdb1 
$(SERLIBPATH)/kmi/kmi $(SERLIBPATH)/kcore/kcore


include ../../Makefile.modules


(This is just under the libconfuse find).
Can you check that this Makefile is unchanged(or at least you have this 
line). Also try to run make QUIET=0 from the modules/carrierroute 
directory and see what -D flags are passed to the compiler


Thanks
Marius

bash-3.00# make clean
bash-3.00# make quiet=0
/opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize 
-Wall-DNAME='kamailio' -DVERSION='3.1.4' -DARCH='sparc64' -DOS='solaris_' -DOS_QUOTED='solaris' 
-DCOMPILER='/opt/SUNWgccfss/gcc/bin/gcc 4.2.0' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 
-DCFG_DIR='/opt/kamailio3/etc/kamailio/' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE 
-DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -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 -DSPARC64_MODE 
-DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  
-I/opt/openser/include -DMOD_NAME='carrierroute' -c prime_hash.c -o prime_hash.o -MMD -MP
/opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize 
-Wall-DNAME='kamailio' -DVERSION='3.1.4' -DARCH='sparc64' -DOS='solaris_' -DOS_QUOTED='solaris' 
-DCOMPILER='/opt/SUNWgccfss/gcc/bin/gcc 4.2.0' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 
-DCFG_DIR='/opt/kamailio3/etc/kamailio/' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE 
-DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -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 -DSPARC64_MODE 
-DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  
-I/opt/openser/include -DMOD_NAME='carrierroute' -c cr_data.c -o cr_data.o -MMD -MP
/opt/SUNWgccfss/gcc/bin/gcc -m64 -fPIC -DPIC -g -O9 -funroll-loops -m64 -mcpu=ultrasparc -mtune=ultrasparc -fno-strict-overflow -ftree-vectorize 
-Wall-DNAME='kamailio' -DVERSION='3.1.4' -DARCH='sparc64' -DOS='solaris_' -DOS_QUOTED='solaris' 
-DCOMPILER='/opt/SUNWgccfss/gcc/bin/gcc 4.2.0' -D__CPU_sparc64 -D__OS_solaris -DSER_VER=3001004 
-DCFG_DIR='/opt/kamailio3/etc/kamailio/' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE 
-DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC -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 -DSPARC64_MODE 
-DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT -DHAVE_FILIO_H  
-I/opt/openser/include -DMOD_NAME='carrierroute' -c carrierroute.c -o carrierroute.o -MMD -MP
carrierroute.c:54: error: 'MODULE_INTERFACE_VER' undeclared here (not in a 
function)
carrierroute.c:87: error: expected '=', ',', ';', 'asm' or '__attribute__' 
before 'cmds'
carrierroute.c:132: error: variable 'exports' has initializer but incomplete 
type
carrierroute.c:133: warning: excess elements in struct initializer
carrierroute.c:133: warning: (near initialization for 'exports')
carrierroute.c:134: warning: excess elements in struct initializer
carrierroute.c:134: warning: (near initialization for 'exports')
carrierroute.c:135: error: 'cmds' undeclared here (not in a function)
carrierroute.c:135: warning: excess elements in struct initializer
carrierroute.c:135: warning: (near initialization for 'exports')
carrierroute.c:136: warning: excess elements in struct initializer
carrierroute.c:136: warning: (near initialization for 'exports')
carrierroute.c:137: warning: excess elements in struct initializer
carrierroute.c:137: warning: (near initialization for 'exports')
carrierroute.c:138: warning: excess elements in struct initializer
carrierroute.c:138: warning: (near initialization for 'exports')
carrierroute.c:139: warning: excess elements in struct initializer
carrierroute.c:139: warning: (near initialization for 'exports')
carrierroute.c:140: warning: 

Re: [SR-Users] Broken Via/reply-matching for natping OPTION

2011-04-20 Thread marius zbihlei

On 04/20/2011 04:47 PM, Andreas Granig wrote:

Hi,

When kamailio-3.1 sends OPTIONS for natping, the Via branch is wrong, e.g:

OPTIONS sip:192.168.51.1:5060 SIP/2.0.
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=0.
Route:something
   


Hello

Check the syn_branch global parameter... must be 1 i think so that it 
creates a SIP 2.0 compliant branch. The default is imho bad and I will 
change it soon.


Marius

Should be branch=z9hG4bKsomething  instead of branch=0, right? When a
reply comes back, like this...

SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 127.0.0.1:5062;branch=0;rport=5062.
From: sip:pinger@something

... then kamailio logs this:

INFO:core  [forward.c:786]: broken reply to forward - no 2nd via

The full debug log looks like this:

DEBUG:core  [parser_helpers.c:196]: path for branch:
'sip:lb@127.0.0.1:5060;lr;received=sip:192.168.51.1:5060'
DEBUG:core  [parser/msg_parser.c:640]: SIP Reply  (status):
DEBUG:core  [parser/msg_parser.c:642]:  version:SIP/2.0
DEBUG:core  [parser/msg_parser.c:644]:  status:100
DEBUG:core  [parser/msg_parser.c:646]:  reason:Trying
DEBUG:core  [parser/parse_via.c:1287]: Found param type 232,branch
=0; state=6
DEBUG:core  [parser/parse_via.c:1287]: Found param type 235,rport  =
5062; state=16
DEBUG:core  [parser/parse_via.c:2300]: end of header reached, state=5
DEBUG:core  [parser/msg_parser.c:515]: parse_headers: Via found, flags=2
DEBUG:core  [parser/msg_parser.c:517]: parse_headers: this is the
first via
DEBUG:core  [receive.c:145]: After parse_msg...
DEBUG: tm [t_lookup.c:1081]: DEBUG: t_check_msg: msg id=1 global id=0 T
start=0x
DEBUG:core  [parser/parse_to.c:803]: end of header reached, state=9
DEBUG:core  [parser/msg_parser.c:187]: DEBUG: get_hdr_field:To
[23]; uri=[sip:192.168.51.1:5060]
DEBUG:core  [parser/msg_parser.c:189]: DEBUG: to body
[sip:192.168.51.1:5060#015#012]
DEBUG:core  [parser/msg_parser.c:167]: get_hdr_field: cseqCSeq:1
OPTIONS
DEBUG: tm [t_lookup.c:1055]: DEBUG: t_reply_matching: failure to match a
transaction
DEBUG: tm [t_lookup.c:1150]: DEBUG: t_check_msg: msg id=1 global id=1 T
end=(nil)
DEBUG:core  [parser/msg_parser.c:201]: DEBUG: get_hdr_body :
content_length=0
DEBUG:core  [parser/msg_parser.c:103]: found end of header
INFO:core  [forward.c:786]: broken reply to forward - no 2nd via
DEBUG:core  [usr_avp.c:646]: DEBUG:destroy_avp_list: destroying list (nil)

Thanks,
Andreas





   



___
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 stops responding after 10 days or so

2011-04-11 Thread marius zbihlei

On 04/09/2011 11:09 AM, Morten Isaksen wrote:

Hi Marius,

   


Hello,

Thanks for the update, but unfortunately I can't spot anything wrong. As 
Daniel noted, please send a trace of the worker process (you can also 
select the worker's pid from the log file)Attack with GDB for several 
times and issue a bt (or bt full) command. If the traces are different, 
this will help. Also do a ngrep to see that indeed you have traffic and 
K is not responding at all.


Marius

The carrier avp is always set in route[0].

My failure_route looks like this.

 xlog(L_WARN, Failure route - M=$rm RURI=$ru F=$fu T=$tu
IP=$si ID=$ci\n);
 if (t_check_status(408|404|5[0-9][0-9]|6[0-9][0-9])
!t_check_status(503)) {
 revert_uri();
 if (!cr_next_domain($avp(s:carrier), $avp(s:domain), $rU,
 $avp(s:host),
$T_reply_code, $avp(s:domain))) {
 xlog(L_ERR, cr_next_domain failed\n);
 exit;
 }
 if (!cr_route($avp(s:carrier), $avp(s:domain), $rU, 
$rU,
 call_id)) {
 xlog(L_ERR, cr_route failed\n);
 exit;
 }
 $avp(s:host)= $rd;
 t_on_failure(COREROUTE);
 append_branch();
 xlog(L_WARN, Outgoing M=$rm RURI=$ru F=$fu T=$tu
IP=$si ID=$ci\n);
 xlog($si -  $rd);
 if (!t_relay()) {
 xlog(L_ERR, t_relay failed\n);
 exit;
 };
 }
   



___
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 stops responding after 10 days or so

2011-04-08 Thread marius zbihlei

On 04/07/2011 10:02 PM, Morten Isaksen wrote:

Hi!

Kamailio 3.0.3.

I have a strange problem with one of our Kamailio servers. This one is
used for routing (with carrierroute) and to send presence information
(with pua module)

Once every 10 day or so I get this error and then Kamailio stops
responding to any SIP packets.

Apr  6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: WARNING:
script: Failure route - M=INVITE RURI=sip:8615x...@178.xx.xx.xx
F=sip:861X@188.120.93.114:1025 T=sip:86155x...@sip1.uni-tel.dk
IP=178.XX.XX.XX ID=6de881ec07f9c6494ee589cf208da358@10.11.87.206
Apr  6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
carrierroute [cr_func.c:95]: cannot find AVP 'carrier'
Apr  6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
carrierroute [cr_func.c:805]: invalid carrier id -1
Apr  6 08:05:48 sip-core-1 /usr/local/sbin/kamailio[9186]: ERROR:
script: cr_next_domain failed

   

Hello Morten,

Do you have the carrier avp set in the failure route (it is ok if it's 
set  in normal route it should be visible from there)? Also can you 
paste the lines from failure_route that are around the cr_next_domain . 
My suspicion is that you have some calls that reach failure route, but 
because of some particular cfg lines, they are not correctly routed and 
the daemon just sleeps in some lines of code on each worker.


For replicating the bug and retrieve the line of code where the workers 
block(as Daniel suggested), it would be better if you decrease the 
number of worker and keep the same shm memory config value.


Marius


Shared memory size is 128M and over halv is free just before the
error. The server is in production and does handle debug1 well, so I
do not have much information in the log files. Private memory is the
default size.

Any ideas what it could be, or how to investegate further?

I think my next steps would be to increase the private memory og to
increase children=4 to children=8

   



___
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] ring_insert_callid() fixup error

2011-04-08 Thread marius zbihlei

On 04/08/2011 03:44 PM, Juha Heinanen wrote:

i have

modparam(siputils, ring_timeout, 30)

but i get

Apr  8 15:32:02 sip /usr/sbin/sip-proxy[23748]: ERROR: siputils [ring.c:378]: 
ring_insert_callid functionality deactivated, you need to set a positive 
ring_timeout
Apr  8 15:32:02 sip /usr/sbin/sip-proxy[23748]: ERROR:core  [route.c:1216]: 
fixing failed (code=-1) at cfg:/etc/sip-proxy/sip-proxy.cfg:658
Apr  8 15:32:02 sip /usr/sbin/sip-proxy[23748]: ERROR:core  [route.c:1216]: 
fixing failed (code=-1) at cfg:/etc/sip-proxy/sip-proxy.cfg:691

when i start sip router (master version).
   


Hello Juha,

Tested on 3.0.3 and it works... Weird will check with master now and get 
back on you.


Marius

i looked the code briefly and it tests module param value in fixup
function, which i have not seen before.

is this a bug or am i missing something?

-- 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

   



___
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] [sr-dev] Kamailio at Google Summer of Code 2011

2011-04-05 Thread marius zbihlei

On 04/05/2011 03:19 PM, Daniel-Constantin Mierla wrote:

Hello,

I should have said it from the beginning that this project is
practically just a proposal for the moment, the idea started at FOSDEM
this year while talking with the folks at Jitsi project and we thought
sip-to-jingle gw might work only with signaling conversion.

We have one slot for a project at GSoC 2011, if you have your own idea
for some cool extension for Kamailio and you know a student willing to
implement it, just write here and we will consider it. At the end, we
will select the best idea based on the best potential student that looks
very likely to complete it.

Since the time is quite short, you better hurry with your proposals and
students.

   


Hello,

I have started to work on HTABLE ( a BigTable type storage for Hadoop 
from Apache) backend support in Kamailio, as I consider stepping away 
from SQL type databases to more distributed environments will benefit us 
in the long run. The requirements are C++ and Thrift(very easy to use - 
already made them work), so we need an external C++ library that would 
talk with K's future db_htable module. As time is not that  it would be 
nice  that I  have some help :).


Also I remember that there were talks last year about a new dialog 
design and several people work on it. This would also be a nice 
extension to K.


Of course, both ideas don't involve Jitsi directly, they might fail from 
the start.


Marius

Thanks,
Daniel

On 3/29/11 9:38 AM, Schumann Sebastian wrote:
   

2011/3/28 Schumann Sebastiansebastian.schum...@st.sk:
   

You are right, sorry. Anyhow, how you ever seen a XMPP server
integrating some kind of interoperability/gateway with SIP? In
Kamailio/*SER we have some attemps to interoperate with XMPP world.
   

Openfire has SIP SIMPLE support.
 

What components of SIP SIMPLE does it support? MESSAGE?
PUBLISH/SUBSCRIBE/NOTIFY for event presence? XCAP? does it work?
   

I don't know details as I have not used it myself. I just answered that I know 
an XMPP server that does SIP integration - not sure to which extend and about 
functionality.

I assume it does not support XCAP as it claims SIP/SIMPLE in the gateway only 
(as per RFC I guess and not OMA I assume). The gateway is under the same 
section as gateways to ICQ, Gadu-Gadu etc. so IM gateway.

Moreover, it has an Asterisk-IM plugin and also a SIP Phone Plugin. Again, 
I do know to which extend they work, but it is an XMPP server and it has implemented SIP on various 
places.

Best regards
Sebastian
___
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] valgrind errors from 3.1-stable (git 2fe4d633e4ac)

2011-04-01 Thread marius zbihlei

On 03/31/2011 07:52 PM, Timo Teräs wrote:

Hi all,

I'm running 3.1-branch git head currently under valgrind. And I've seen
several invalid reads and writes (apparently most are off by one).
   


Hello,

I haven't used Valgrind memcheck tool for Kamailio , but from what I 
know it might not be that useful. What Valgrind does it hooks into the 
memory allocation functions like malloc/calloc/realloc/alloca and keeps 
track of said allocation. Because, by default, Kamailio uses it's own 
memory manager (both for private memory or shared), this messes up on 
how Valgrind can keep track of its allocation/deallocation.


I don't know if there is a way to make Valgrind to work reliable with K 
memory managers, but I will take a look on the cases you provide just to 
be sure.


As a side note, I had uses static analysis tools quite succesfully on 
3.1 . I had use clang analyzer from the llvm suite. There are still some 
outstanding bugs which I didn't had time to look at.


Marius

==22274== Invalid read of size 1
==22274==at 0x6DA2C0A: pv_set_ruri_user (pv_core.c:1755)
==22274==by 0x13BA15: lval_pvar_assign (lvalue.c:357)
==22274==by 0x13BF0F: lval_assign (lvalue.c:405)
==22274==by 0x139E4D: do_action (action.c:1472)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x12FDEB: do_action (action.c:711)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x13A86F: run_actions_safe (action.c:1607)
==22274==by 0x1E2666: rval_get_int (rvalue.c:904)
==22274==by 0x1E5252: rval_expr_eval_int (rvalue.c:1866)
==22274==by 0x131B8A: do_action (action.c:1071)
==22274==by 0x13A6F1: run_actions (action.c:1555)

Is fairly obvious. modules_k/pv/pv_core.c has several places which take
backup of val-rs.s[val-rs.len] and replaces it with zero for string
termination. It's than later on set back to the original value. However,
it would appear that the value passed does not always point to a memory
area which is large enough. This results in multiple invalid reads and
writes of one.

The remaining reads are not so clear to me.

==22274== Invalid read of size 1
==22274==at 0x4811A69: strncpy (mc_replace_strmem.c:339)
==22274==by 0x6DA77FF: set_var_value (pv_svar.c:122)
==22274==by 0x6DA1EDB: pv_set_scriptvar (pv_core.c:1636)
==22274==by 0x13BA15: lval_pvar_assign (lvalue.c:357)
==22274==by 0x13BF0F: lval_assign (lvalue.c:405)
==22274==by 0x139E4D: do_action (action.c:1472)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x131E05: do_action (action.c:1086)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x12FDEB: do_action (action.c:711)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x131E05: do_action (action.c:1086)

==22274== Invalid read of size 2
==22274==at 0x4811E1F: memcpy (mc_replace_strmem.c:523)
==22274==by 0x1E134D: rval_new_str (rvalue.c:269)
==22274==by 0x1E394E: rval_convert (rvalue.c:1301)
==22274==by 0x1E4780: rval_str_add2 (rvalue.c:1610)
==22274==by 0x1E8681: rval_expr_eval (rvalue.c:2399)
==22274==by 0x13BBD9: lval_assign (lvalue.c:389)
==22274==by 0x139E4D: do_action (action.c:1472)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x12FDEB: do_action (action.c:711)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x139229: do_action (action.c:1342)
==22274==by 0x13A6F1: run_actions (action.c:1555)

Any ideas how to fix these? Or any instructions what to provide more in
the bug report?

Cheers,
  Timo

___
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] valgrind errors from 3.1-stable (git 2fe4d633e4ac)

2011-04-01 Thread marius zbihlei

On 04/01/2011 10:38 AM, Timo Teräs wrote:

Hello,

Comments inline.


On 04/01/2011 10:29 AM, marius zbihlei wrote:
   

On 03/31/2011 07:52 PM, Timo Teräs wrote:
 

Hi all,

I'm running 3.1-branch git head currently under valgrind. And I've seen
several invalid reads and writes (apparently most are off by one).

   

Hello,

I haven't used Valgrind memcheck tool for Kamailio , but from what I
know it might not be that useful. What Valgrind does it hooks into the
memory allocation functions like malloc/calloc/realloc/alloca and keeps
track of said allocation. Because, by default, Kamailio uses it's own
memory manager (both for private memory or shared), this messes up on
how Valgrind can keep track of its allocation/deallocation.
 

It does not make valgrind useless. Basically, it just makes valgrind not
detect all errors. Any errors it does detect, should be valid.

   

That is good to know.

I don't know if there is a way to make Valgrind to work reliable with K
memory managers, but I will take a look on the cases you provide just to
be sure.
 

There are valgrind hooks for memory managers. Should probably add them,
so it becomes aware of the things. However, those should be only needed
for memory pools. Ultimately kamailio uses malloc or mmap to allocate
the memory and valgrind knows both.
The allocation inside the memory pools, that is what valgrind must be 
aware of.

The first really evil programming mistake I found is at:
modules_k/textops/txtvar.c:tr_txt_eval_re()

In line 86, it will fills the transformed variable with tr_txt_buf and
returns that. However, that is a stack variable, which will get
corrupted pretty soon after function return. I'm not sure how to fix
this properly.

   
Good call. I truly belive that should a static keyword in front of the 
buffer declaration. Can you test it. (because in the cfg you usually 
assign that transformation result to another pvar, the buffer will be 
deep copied soon enough).


diff --git a/modules_k/textops/txt_var.c b/modules_k/textops/txt_var.c
index ae1fce6..a13e5e1 100644
--- a/modules_k/textops/txt_var.c
+++ b/modules_k/textops/txt_var.c
@@ -41,7 +41,7 @@ int tr_txt_eval_re(struct sip_msg *msg, tr_param_t 
*tp, int subtype,

int nmatches;
str* result;
 #define TR_TXT_BUF_SIZE2048
-   char tr_txt_buf[TR_TXT_BUF_SIZE];
+   static char tr_txt_buf[TR_TXT_BUF_SIZE];

if(val==NULL || (!(val-flagsPV_VAL_STR)) || val-rs.len=0)
return -1;


Marius
 

==22274== Invalid read of size 1
==22274==at 0x6DA2C0A: pv_set_ruri_user (pv_core.c:1755)
==22274==by 0x13BA15: lval_pvar_assign (lvalue.c:357)
==22274==by 0x13BF0F: lval_assign (lvalue.c:405)
==22274==by 0x139E4D: do_action (action.c:1472)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x12FDEB: do_action (action.c:711)
==22274==by 0x13A6F1: run_actions (action.c:1555)
==22274==by 0x13A86F: run_actions_safe (action.c:1607)
==22274==by 0x1E2666: rval_get_int (rvalue.c:904)
==22274==by 0x1E5252: rval_expr_eval_int (rvalue.c:1866)
==22274==by 0x131B8A: do_action (action.c:1071)
==22274==by 0x13A6F1: run_actions (action.c:1555)

Is fairly obvious. modules_k/pv/pv_core.c has several places which take
backup of val-rs.s[val-rs.len] and replaces it with zero for string
termination. It's than later on set back to the original value. However,
it would appear that the value passed does not always point to a memory
area which is large enough. This results in multiple invalid reads and
writes of one.
   

I fixed this by making a temporary copy of the string data to local
stack variable and null terminating it there. That made valgrind happy.
So obviously pv_set_ruri_user and others, are called with strings that
are allocated for the exact length, and the hacky zero-termination
cannot be used in this module.

   
Well, indeed that's a ugly hack. As str's are not 0 terminated, you 
either copy to a buffer length+1 or you overwrite the memory location 
next to the end and revert the change afterwards. Not the cleanest way 
to do it, but from a performance point of view, it make sense. If should 
be taken extra care to ensure that on every code path the backup is 
restored.


Marius

The remaining reads are not so clear to me.
   

I'm analysing the rest problems. Seems that they are almost always
related to using re.subst, which has the problem mentioned in the
beginning of the mail.

- Timo


   



___
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] The SIP protocol v2 - we're giving up.

2011-04-01 Thread marius zbihlei

On 04/01/2011 11:54 AM, Olle E.Johansson wrote:

Friends,

After having spent many years working with the Asterisk SIP channel driver, 
Kamailio and the SIPv2 protocol, I have finally realized that this is a dead 
end. It's getting nowhere and it's way too complicated to set up, run and 
support in working code.

   

I call April Fools. :)

After realizing this, I started a new standardization project together with my 
friends in Canada, Simon and Marc, to develop a working solution based on the 
combination of IPv6 and SIP. We have gotten great feedback and now the IETF, 
the ITU and the IPv6 forum jointly launches the new standard, SIP-six.

 From the press release:

”We realize that 99% of the SIP users use SIP for PSTN phone calls. The 
original SIP standards was written with other applications in mind, a vision that 
never came true.” said Bob Plug, area director in the IETF. ”That’s why we sat down 
and said to ourselves that this should be way more simple.”

The SIP-six standard totally removes the dependency of domains and URI syntax. 
There’s no point in using this, since everyone seems to think that IP 
addressing is more than enough. The new standard use part of the vast IPv6 
address space to incorporate the E.164 phone numbers as addresses. This is the 
reverse of the reverse phone number usage in the enum standard, which is no 
longer needed in SIP-six.

By using IPv6 mobile IP, phone users register their phones and get access to 
their phone number. Users that need security can easily integrate IPsec into 
their setup. Media and signalling uses the same addressing scheme and is mixed 
so that both SIP-six, RTP and RTCP only uses one port address - but in this 
case a port address with 32 bit subaddress identifying the media stream. This 
finally solves a lot of the firewall traversal issues that SIP v2.0 had. With 
the combination of mobile IP and use of public IPv6 addresses NAT traversal 
won’t be an issue.

The testbed for SIP-six has been running for a year at six choosen large SIP 
carriers, with the assistance of Edvina AB in Sweden and ViaGenius in Montreal, 
Canada. In an International effort, the testbed is today put in production and 
Roboid phones all over the world is automatically connected to this worldwide 
network.


You will be able to find out more about it here:
http://bit.ly/sipsix

SIP-six is implemented as a channel driver in Asterisk 2.0, as a replacement 
for SIP2.0 in Kamailio 4.0 and a channel module in FreeSwitch - all releases to 
be released later today. Softphones for testing will shortly be available from 
Blink and Zoiper.

Looking forward to continue this project with the rest of the 
Kamailio/SIP-router community!
Special thanks to Daniel for the reference implementation in Kamailio 4.0!

Have a nice weekend!

/Olle
___
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] Outbound socket selection (HA implementation)

2011-03-29 Thread marius zbihlei

On 03/29/2011 12:31 PM, Asgaroth wrote:

Hi All,

I'm trying to setup an active/passive proxy instance with kamailio
3.1.2. I'm using ucarp (www.ucarp.org) to provide the floating ip
addresses. I have installed and configured ucarp and it appears to be
working as expected.

I have configured kamailio on both systems to be online all the time
(using the net.ipv4.ip_nonlocal_bind kernel parameter on the standby
server). I have configured kamailio with the listen parameter to be
listening on the floating ip addresses only.

The problem now is that kamailio uses the inbound interface as the
outbound socket for messages (I think this is the default, expected,
behaviour).

If I enable the mhomed parameter then I get the following error:

ERROR:core  [forward.c:218]: ERROR: get_out_socket: no socket found
ERROR:core  [forward.c:572]: forward_req: ERROR: cannot forward to af
2, proto 1 no corresponding listening socket ERROR: sl [sl_funcs.c:282]:
ERROR: sl_reply_error used: I'm terribly sorry, server error occurred (7/SL)

   

Hello,

Some observations: mhomed only works for UDP, but I think it's enough 
for your setup. Second, for it to select the outbound interface, 
Kamailio must be started and listening on that interface (or the 
interface the kernel selects to route traffic to the specific destination).


I would suggest to start Kamailio to listen on all available interfaces.

Marius

I had a look around on the docuwiki and I found $fs. Would I need to
force the outbound socket for each message in this case, or do I have a
simple comfiguration issue?

Any thoughts/comments would be greatly appreciated.

Thanks

___
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] Outbound socket selection (HA implementation)

2011-03-29 Thread marius zbihlei

On 03/29/2011 02:42 PM, Asgaroth wrote:

Thank you all for your replies.

   


Hello again,

I have sent you another email in the thread but no reply. Can you 
confirm that you have a listening UDP socket on the interface that is 
selected by the kernel for sending the datagram in a mhomed environment. 
If you are not listening on that interface Kamailio will complain with 
the error message you received in mhomed=1 config



Marius

Our requirement, currently is fairly simple, and, I'm thinking that
pacemaker/heartbeat/corosync is a little more overhead than required.
Ucarp seems to fit the profile fairly well for what we are trying to
achieve.

I'd like to have kamailio decide on the outbound interface if at all
possible, I suspect I would need to delve into all the routing branches
if I were to force the outbound socket manually.

If I listen on all interfaces and enable mhomed then kamailio transmits
on the correct outbound interface, but then uses, what I suppose, is
called the primary address associated with the interface. If I were to
stay with this configuration, then, would I need to enable the
advertised address/port parameters? What about devices behind NAT
firewalls, if my advertised address was 1.2.3.4 and the actual interface
address was 1.2.3.3 then the NAT'ed UA would see traffic arriving to
them as originating from 1.2.3.3 which is not what I am trying to
achieve (it needs to arrive in as 1.2.3.4, which is the same address
that they registered against. In either case, I would need to set the
advertised address based on the destination ip address (i assume
obtained by $dd or $rd) so that I can set the appropriate advertised
address/port or forced outbound socket.

I saw a previous post saying that for mhomed to work correctly kamailio
needs to be listening on the interface that is used for the routing of
the destination address, this makes sense to me. However, with the carp
configuration I have, the virtual address is indeed sitting on the
interface that has the destination network configured. I guess Kamailio
is unable to decide on which ip address to use on the outbound
interface, would it not be possible to have the address used to send, be
that of the listen_address parameter even if it is an associated
virtual address on the same physical NIC.

Or maybe this may be possible with a couple ip rule commands to
associate a destination net with a virtual ip address?

With corosync/pacemaker/heartbeat, are you able to have kamailio operate
on the floating address without haveing to perform the routing decisions
for kamailio?

Any comments/suggestions would be greatly appreciated.

Thanks



___
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] Outbound socket selection (HA implementation)

2011-03-29 Thread marius zbihlei

On 03/29/2011 03:32 PM, Asgaroth wrote:

Hi Marius,

   

Hello Asgaroth,

Comments inline

I have sent you another email in the thread but no reply. Can you
confirm that you have a listening UDP socket on the interface that is
selected by the kernel for sending the datagram in a mhomed
environment. If you are not listening on that interface Kamailio will
complain with the error message you received in mhomed=1 config
 

I have my kamailio configuration as follows:

listen=192.168.1.100:5060
listen=192.168.2.100:5060

And my linux server ip configuration is as follows:

Where 192.168.1.99/192.168.2.99 is the ip address configured for the
respective interfaces, and the 192.168.1.100/192.168.2.100 are the
virtual interfaces created by ucarp.

[root@testprxy #] ip addr show

2: eth0:BROADCAST,MULTICAST,UP,LOWER_UP  mtu 1500 qdisc pfifo_fast
qlen 1000
 link/ether 00:0c:29:9d:0d:c5 brd ff:ff:ff:ff:ff:ff
 inet 192.168.1.99/24 brd 192.168.1.255 scope global eth0
 inet 192.168.1.100/32 scope global eth0
 inet6 fe80::20c:29ff:fe9d:dc5/64 scope link
valid_lft forever preferred_lft forever
3: eth1:BROADCAST,MULTICAST,UP,LOWER_UP  mtu 1500 qdisc pfifo_fast
qlen 1000
 link/ether 00:0c:29:9d:0d:cf brd ff:ff:ff:ff:ff:ff
 inet 192.168.2.99/24 brd 192.168.2.255 scope global eth1
 inet 192.168.2.100/32 scope global eth1
 inet6 fe80::20c:29ff:fe9d:dcf/64 scope link
valid_lft forever preferred_lft forever

Do I need to have kamailio listen on the 192.168.1.99/192.168.2.99
addresses as well?

I think currently the kernel my select 192.168.1.99 to route out to
192.168.1.x/24, and 192.168.2.99 to route out to 192.168.2.x. See
routeing table below:

[root@testprxy #] ip route show
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.99
192.168.2.0/24 dev eth1  proto kernel  scope link  src 192.168.2.99
default via 192.168.1.1 dev eth0

   
Yes , for kamailio to send datagrams on those interfaces it has to 
explicitely listen on them.

Now if I did something like:

ip rule add from 192.168.1.100/32   table 100
ip rule add to  192.168.1.100/32   table 100
ip rule add to  192.168.1.0/24   table 100
ip route add default via 192.168.1.1 table 100
ip route add 192.168.1.0/24 dev eth0 src 192.168.1.100 table 100

ip rule add from 192.168.2.100   table 101
ip rule add to  192.168.2.100   table 101
ip rule add to  192.168.2.0/24 table 101
ip route add 192.168.2.0/24 dev eth1 src 192.168.2.100 table 101

Would kamailio be able to use those interfaces then?

Thanks

   


The restriction is from a design/functionality p.o.v.  Kamailio must be 
able to receive a reply (response) on the interface it sends to. So if 
you can ensure that the kernel will choose one interface that kamailio 
is bound to, then you are ok, but if it choses one iface that kamailio 
does not listen, then you have no way of sending the datagram(and that 
error will appear).


I can't really say that the route table will work. One way I used for 
testing is via Ping or netcat without any local parameters. The choosing 
of the local address and port is left to the kernel, the same as 
kamailio with mhomed, so if you can find a suitable routeing table where 
only the ucarp interfaces are selected then you are ok. Why don't you 
listen also on 192.168.1.99/192.168.2.99 ?


Marius.

___
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] Outbound socket selection (HA implementation)

2011-03-29 Thread marius zbihlei

On 03/29/2011 05:47 PM, Asgaroth wrote:

Hi Marius,

   

I can't really say that the route table will work. One way I used for
testing is via Ping or netcat without any local parameters. The
choosing of the local address and port is left to the kernel, the same
as kamailio with mhomed, so if you can find a suitable routeing table
where only the ucarp interfaces are selected then you are ok. Why
don't you listen also on 192.168.1.99/192.168.2.99 ?
 

When kamailio transmits the messages it will substitute (by default) the
outbound interface ip address for its route/via headers. If I enable
kamailio to listen on all addresses then kamailio sends the messages
with source address of .99. I need the source address and routing
headers to contain the floating address (.100), this is also for NAT
traversal on the public address of the proxy.

   


Hello,

If i understand, then you will need to force sending of outgoing 
requests (not in-dialog or replies) to be sent via the floating address, 
so reachable for them. You might want to look force_send_sock as well 
(don't know if already this appeared on this thread)


Marius


___
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] SIP Communicator renamed to Jitsi

2011-03-28 Thread marius zbihlei

On 03/28/2011 11:27 AM, Daniel-Constantin Mierla wrote:


On 3/28/11 8:22 AM, CT Radu wrote:
   

Pe 27.03.2011 12:34, Daniel-Constantin Mierla a scris:
 

Hello,

I thought it is an useful information to announce here that the SIP
Communicator SIP softphone was renamed to Jitsi. There are several
pages mentioning Kamailio and SIP Communicator out there, among them
our participation to Google Summer of Code 2010 as well as the full
SIP SIMPLE Presence configuration with XCAP:
* http://asipto.com/u/sp

   

Is it just my network, or asipto.com is down.
  From my network, asipto.com asnwers to ping, but no web server seems
available.
Can you please confirm Daniel?
 

Maybe you are unlucky to connect from a network that was source of
scanning attacks, thus being blocked by the firewall. Try with a proxy.
   

... a proxy outside Ro :)

Marius

Cheers,
Daniel

   

Regards,
Costin Radu

___
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] re-SUBSCRIBE and Record-Route

2011-03-04 Thread marius zbihlei

On 03/04/2011 04:56 PM, Klaus Darilion wrote:

Not so easy .

16.4 Route Information Preprocessing


The proxy MUST inspect the Request-URI of the request.  If the
Request-URI of the request contains a value this proxy previously
placed into a Record-Route header field (see Section 16.6 item 4),
the proxy MUST replace the Request-URI in the request with the last
value from the Route header field, and remove that value from the
Route header field.  The proxy MUST then proceed as if it received
this modified request.

   This will only happen when the element sending the request to the
   proxy (which may have been an endpoint) is a strict router.  This
   rewrite on receive is necessary to enable backwards compatibility
   with those elements.  It also allows elements following this
   specification to preserve the Request-URI through strict-routing
   proxies (see Section 12.2.1.1).


Thus, Kamailio should somehow detect if the URI is inserted by himself
or not. This may only happen if the previous hop is a strict-router. As
Kamailio is a loose-router and always adds the ;lr parameter, the check
could be extended to check if the RURI also cotains lr parameter. If the
lr parameter is not present, this means for sure that the RURI was not
generated by Kamailio.

   


Hello,

I was thinking of maybe adding a new configurable RR param. A strict 
router would copy this header into the RURI. But a.t.m. loose_route does 
not perform any checking on tags. Maybe an exclude_uri_tag module param 
that can work like this:


modparam(rr, exclude_uri_tag, mark=on);

Then, when the initial SUBSCRIBE (dialog setting message) comes

add_rr_param(;mark=on);

In the loose_route processing, if exclude_uri_tag is set and  !(RURI =~ 
exclude_uri_tag), then perform loose routing on that request (the 
request isn't coming from a strict router)


What do you think?

Marius

Of course this would require code changes.

A dirty hack would be to manipulate the Route headers manually and set $du.


regards
Klaus



Am 04.03.2011 15:25, schrieb marius zbihlei:
   

Hello list,

An UAC sends a resubscribe in the form

SUBSCRIBE sip:al...@example.com SIP/2.0
Route:sip:sip.example.com;lr=on
Route:sip:sip.next-hop.example.com;lr=on


The request has a to tag, from tag... Basic resubscribe(R-URI is the
same as original SUBSCRIBE) The proxy that handles it is a Kamailio (1.5
but this refers to 3.1 as well). The problem is that loose_route()
treats this request as coming from a strict routing router, not from the
UAC, so it applies the strict-to-loose rules and rewrites the request as:

SUBSCRIBE sip:sip.next-hop.example.com;lr=on SIP/2.0
Route:sip:sip.example.com;lr=on


The segment that handles this is pretty standard:

if (loose_route()) {
 # sequential request withing a dialog should take the path
 # determined by record-routing
 if(has_totag()) {
 forward();
 exit;
}

It sees that message has Route set, it finds the to tag (so the routes
were not a preset), and then , the important thing, sees that the domain
from the RURI matches itself (kamailio has aliases configured for
example.com), thus considering the request as coming from a strict
router. Then it takes the bottom Route header and overwrites the RURI.

What is the best way to ensure that loose routing is applied to the
resubscribe as described above?

Cheers,
Marius

___
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] re-SUBSCRIBE and Record-Route

2011-03-04 Thread marius zbihlei

On 03/04/2011 05:05 PM, marius zbihlei wrote:

On 03/04/2011 04:56 PM, Klaus Darilion wrote:
   

Not so easy .

16.4 Route Information Preprocessing


 The proxy MUST inspect the Request-URI of the request.  If the
 Request-URI of the request contains a value this proxy previously
 placed into a Record-Route header field (see Section 16.6 item 4),
 the proxy MUST replace the Request-URI in the request with the last
 value from the Route header field, and remove that value from the
 Route header field.  The proxy MUST then proceed as if it received
 this modified request.

This will only happen when the element sending the request to the
proxy (which may have been an endpoint) is a strict router.  This
rewrite on receive is necessary to enable backwards compatibility
with those elements.  It also allows elements following this
specification to preserve the Request-URI through strict-routing
proxies (see Section 12.2.1.1).


Thus, Kamailio should somehow detect if the URI is inserted by himself
or not. This may only happen if the previous hop is a strict-router. As
Kamailio is a loose-router and always adds the ;lr parameter, the check
could be extended to check if the RURI also cotains lr parameter. If the
lr parameter is not present, this means for sure that the RURI was not
generated by Kamailio.


 

Hello,

I was thinking of maybe adding a new configurable RR param. A strict
router would copy this header into the RURI. But a.t.m. loose_route does
not perform any checking on tags. Maybe an exclude_uri_tag module param
that can work like this:

modparam(rr, exclude_uri_tag, mark=on);

Then, when the initial SUBSCRIBE (dialog setting message) comes

add_rr_param(;mark=on);

In the loose_route processing, if exclude_uri_tag is set and  !(RURI =~
exclude_uri_tag), then perform loose routing on that request (the
request isn't coming from a strict router)

What do you think?
   

Replying to myself..

Of course, this is almost the same as your idea, the question would this 
suffice, of a param to loose_route will be needed to enable/disable this 
behavior ?!


Marius



Marius
   

Of course this would require code changes.

A dirty hack would be to manipulate the Route headers manually and set $du.


regards
Klaus



Am 04.03.2011 15:25, schrieb marius zbihlei:

 

Hello list,

An UAC sends a resubscribe in the form

SUBSCRIBE sip:al...@example.com SIP/2.0
Route:sip:sip.example.com;lr=on
Route:sip:sip.next-hop.example.com;lr=on


The request has a to tag, from tag... Basic resubscribe(R-URI is the
same as original SUBSCRIBE) The proxy that handles it is a Kamailio (1.5
but this refers to 3.1 as well). The problem is that loose_route()
treats this request as coming from a strict routing router, not from the
UAC, so it applies the strict-to-loose rules and rewrites the request as:

SUBSCRIBE sip:sip.next-hop.example.com;lr=on SIP/2.0
Route:sip:sip.example.com;lr=on


The segment that handles this is pretty standard:

if (loose_route()) {
  # sequential request withing a dialog should take the path
  # determined by record-routing
  if(has_totag()) {
  forward();
  exit;
}

It sees that message has Route set, it finds the to tag (so the routes
were not a preset), and then , the important thing, sees that the domain
from the RURI matches itself (kamailio has aliases configured for
example.com), thus considering the request as coming from a strict
router. Then it takes the bottom Route header and overwrites the RURI.

What is the best way to ensure that loose routing is applied to the
resubscribe as described above?

Cheers,
Marius

___
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] Segfault in Kamailio 1-3-4 to 1.5.5

2011-03-01 Thread marius zbihlei

On 03/01/2011 11:02 AM, Andrew O. Zhukov wrote:

On 03/01/2011 10:49 AM, Daniel-Constantin Mierla wrote:
   


On 3/1/11 8:41 AM, Andrew O. Zhukov wrote:
 

I someone interested in .
It's the old coredumps from 1.3.4. It's really much stabile then 1.5.5
I did degrade today night
   

version 1.3.x is openser only which became later kamailio, practically
is no other option for this version.

Have you considered upgrading to latest stable (3.1.x) instead of
downgrade?
 

Daniel,
I sent you my config.
How can I do it on a hi usage production server for a one night.
The lot of fixes for a different buggy customers SIP and NAT devices
which is impossible to retest again.

I'll try opensips and possible will be back.
   


Hello,

I had been checking the coredumps you provided for a while. I don't 
think they are very useful because for me this looks like an Heisenbug. 
The coredumps only show the result of the memory corruption and not the 
cause.


Daniel has asked you for some input when compiling with memory debug on 
(to see if canary values where overwritten by what operations). I have 
not seen this output yet (don't know if you send it privately to him, or 
I have missed it on the list). Try to compile again with debug memory 
support, and set logging to a apropriate level.


An idea is to set a special server with a special version of Kamailio. 
Minimize the number of children (use only one worker) and use just part 
of the traffic so you have a easier debugging. The bug affects private 
memory so the number of children should not be an impact. Also you might 
want to increase the PKG_MEM_SIZE from the default value of 4 MB to 
something bigger (try 10-15 MB or more). See if this has an impact on 
the bug (it might be caused by fragmentation in this case a bigger pool 
might help).


If all else fail, I strongly suggest dropping pkg_malloc all together, 
and using libc's Malloc() instead. This is done at compile time by 
removing the -DPKG_MALLOC from Makefile.defs and recompiling.. This 
should fix your bug


Marius



Cheers,
Daniel

 


___
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] pdb module timeouts

2011-02-18 Thread marius zbihlei

On 02/18/2011 12:53 PM, Thomas Baumann wrote:

Hello Marius,

the main problem I had was caused with wrong debug-level in the
script. Debug level 3 is not a good choice for loadtesting, my
mistake.

After changing to debug level 2, it looks a lot better.  I did more
testing with the right settings, and yes the change in pdb.c had some
influence on the timeouts.
   


Hello Thomas,

Good to hear that, I couldn't replicate the problems you were having 
with pdb. Are you sure you have asynchronous syslogd configured for 
kamailio? If not performance is a killer


BTW, my patch doesn't really do anything afaik (i am not 100% sure on 
linux but my tests seemed to confirm it).


Cheers,
Marius

With the patch I did not see any timeouts after running a loadtest
overnight (200.000 calls executed with max. 12 cps for one application
server). But with the old code where are still few timeouts:

Completed Calls:9732 Failed Calls:13 Failure Rate:0.133 perc. Loop Count:2336


Have a nice weekend,

Thomas





On Wed, Feb 16, 2011 at 8:20 PM, bt047265bt047...@gmail.com  wrote:
   

Hi Marius, Hi Henning,

sorry for the wrong information, the patch did not work for me. I did
not see any timeouts if only one server was used. If more than 2
Servers are used, where are failed calls.

regards,

Thomas


One server old pdb.c:

modparam(pdb, server, 10.12.18.41:10001)

Feb 16 19:28:03 m-lab-prx-as-2 /openser/sbin/kamailio[29622]: INFO:
pdb [pdb.c:291]: got an answer in 0.99 ms
Feb 16 19:28:03 m-lab-prx-as-2 /openser/sbin/kamailio[29619]: INFO:
pdb [pdb.c:291]: got an answer in 36.197000 ms
Feb 16 19:28:03 m-lab-prx-as-2 /openser/sbin/kamailio[29619]: INFO:
pdb [pdb.c:291]: got an answer in 0.151000 ms

two servers old pdb.c:

modparam(pdb, server, 10.12.18.41:10001,10.12.19.51:10001)

Feb 16 19:35:13 m-lab-prx-as-2 /openser/sbin/kamailio[29688]: INFO:
pdb [pdb.c:291]: got an answer in 0.179000 ms
Feb 16 19:35:13 m-lab-prx-as-2 /openser/sbin/kamailio[29693]: INFO:
pdb [pdb.c:291]: got an answer in 0.248000 ms
Feb 16 19:35:13 m-lab-prx-as-2 /openser/sbin/kamailio[29692]: WARNING:
pdb [pdb.c:260]: exceeded timeout while waiting for response.
Feb 16 19:35:13 m-lab-prx-as-2 /openser/sbin/kamailio[29688]: INFO:
pdb [pdb.c:291]: got an answer in 0.489000 ms
Feb 16 19:35:13 m-lab-prx-as-2 /openser/sbin/kamailio[29692]: INFO:
pdb [pdb.c:291]: got an answer in 0.596000 ms


One server new pdb.c:

modparam(pdb, server, 10.12.18.41:10001)

Feb 16 19:55:31 m-lab-prx-as-2 /openser/sbin/kamailio[1079]: INFO: pdb
[pdb.c:291]: got an answer in 48.584000 ms
Feb 16 19:55:31 m-lab-prx-as-2 /openser/sbin/kamailio[1084]: INFO: pdb
[pdb.c:291]: got an answer in 0.29 ms
Feb 16 19:55:31 m-lab-prx-as-2 /openser/sbin/kamailio[1079]: INFO: pdb
[pdb.c:291]: got an answer in 0.19 ms
Feb 16 19:55:31 m-lab-prx-as-2 /openser/sbin/kamailio[1079]: INFO: pdb
[pdb.c:291]: got an answer in 0.241000 ms

two servers old pdb.c:

modparam(pdb, server, 10.12.18.41:10001,10.12.19.51:10001)

Feb 16 20:08:36 m-lab-prx-as-1 /openser/sbin/kamailio[17348]: INFO:
pdb [pdb.c:291]: got an answer in 0.314000 ms
Feb 16 20:08:36 m-lab-prx-as-1 /openser/sbin/kamailio[17348]: INFO:
pdb [pdb.c:291]: got an answer in 0.202000 ms
Feb 16 20:08:36 m-lab-prx-as-1 /openser/sbin/kamailio[17349]: WARNING:
pdb [pdb.c:260]: exceeded timeout while waiting for response.
- Show quoted text -

On Wed, Feb 16, 2011 at 4:59 PM, marius zbihleimarius.zbih...@1and1.ro  wrote:
 

On 02/16/2011 04:47 PM, Thomas Baumann wrote:
   

Hello Marius,

thanks a lot for submitting the patch. It works like a charm now. But to
be honest I had troubles to find this patch, I just checked the daily
tarball  [http://sip-router.org/tarballs/sr/] and found this  change.
How I can get patch e914f97b4 in a better way ?

regards,

 

Hello

You can find here a tutorial on installing kamailio from GIT.
http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git

Glad the patch worked. I really doubted the usefulness of the patch as
revents member should be cleared by the poll() method before setting the
POLLIN event for a fd. I will have to test it with a small test case on my
machine before I commit this to master branch(anyway no wrong can come to
it, the change has no impact on performance and stability of the pdb module)

Cheers
Marius
   

Thomas


 

Hello

   


 

I have made a patch to 3.1(e914f97b4) . The poll() event list was not
cleared when a response was received so when 2 servers responded one
after the other it might block in an incorrect recv(). Can you please
test with this?

   


 

Marius

   

___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

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

Re: [SR-Users] pdb module timeouts

2011-02-16 Thread marius zbihlei

On 02/16/2011 04:47 PM, Thomas Baumann wrote:

Hello Marius,

thanks a lot for submitting the patch. It works like a charm now. But to be 
honest I had troubles to find this patch, I just checked the daily tarball  
[http://sip-router.org/tarballs/sr/] and found this  change.
How I can get patch e914f97b4 in a better way ?

regards,
   


Hello

You can find here a tutorial on installing kamailio from GIT. 
http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git


Glad the patch worked. I really doubted the usefulness of the patch as 
revents member should be cleared by the poll() method before setting the 
POLLIN event for a fd. I will have to test it with a small test case on 
my machine before I commit this to master branch(anyway no wrong can 
come to it, the change has no impact on performance and stability of the 
pdb module)


Cheers
Marius

Thomas

   

Hello
 
   

I have made a patch to 3.1(e914f97b4) . The poll() event list was not
cleared when a response was received so when 2 servers responded one
after the other it might block in an incorrect recv(). Can you please
test with this?
 
   

Marius
 

___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

___
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] pdb module timeouts

2011-02-15 Thread marius zbihlei

On 02/15/2011 06:31 PM, Thomas Baumann wrote:

Hello

I have made a patch to 3.1(e914f97b4) . The poll() event list was not 
cleared when a response was received so when 2 servers responded one 
after the other it might block in an incorrect recv(). Can you please 
test with this?


Marius

Hello,

I did a fallback to the original source, without sucess. I still have massive 
timeouts.  So far I have no idea,  how to go on.

ps. what lenght of the carrier codes would be ok ? 3...10 digits, additional 
characters needed like  A,B,C,D,E,F?

regards,

Thomas


Hi Henning,

this change was done at pdbt.c:

$ diff pdbt.c pdbt_changed.c
245c245
bufsize = slen + 1 + 1 + 3 + 1 + 1; // line 
buff
er (telephone number + colon + white space + carrier ID + newline + \0)
---
   

   bufsize = slen + 1 + 1 + 4 + 1 + 1; // line buff
 

er (telephone number + colon + white space + carrier ID + newline + \0)
257,258c257,258
ret = snprintf(p, 5, %d\n, node-carrier);
if (ret  1 || ret  4) {
---
   

   ret = snprintf(p, 6, %d\n, node-carrier);
if (ret  1 || ret  5) {
 

If I run querys in filemode against the server, where is no timeout.

pdbt query -f /tmp/numbers3 -r 10.12.18.21:10001 -q 1 | grep answer

regards,

Thomas

-Ursprüngliche Nachricht-
Von: Henning Westerholthenning.westerh...@1und1.de
Gesendet: 11.02.2011 09:33:05
An: sr-users@lists.sip-router.org
Betreff: Re: [SR-Users] pdb module timeouts

On Wednesday 09 February 2011, Thomas Baumann wrote:
   

I am using the PDB module and server components for number portability. 2
instances of PDB Server runs on (10.12.19.51/10001/10002), Kamailio on
(10.12.19.21). With a small amount of traffic (-cmax 150 -cps 10
-callduration 3), where are timeouts: WARNING: pdb [pdb.c:260]: exceeded
timeout while waiting for response.

One requested number was 307111094, where the module prints out a timeout.

The funny part is, that I can see the responses at least arriving at the
10.12.19.21 interface on time.

Request send: 0,200855 s
Answer received: 0,201027 s

That are 0,172 ms and far away from a timeout.

What could be the reason ?
 

Hi Thomas,

a bit difficult to say on a first sight.. Maybe some scheduling or load issues
on the local machine? I've just checked two production server here, i don't
see it so far in the available logs.

How much load do you've on the machine? And what kind of timeout value do you
specified?

   

ps. A small change on the server part was done: handle 4 digit carrier
codes. 
 

Ah, i see. I guess its not a big change?

Regards,

Henning

___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

___
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] Kamailio 1.5.4 and beyond - mhomed issue under Linux

2011-02-14 Thread marius zbihlei

On 02/11/2011 09:14 PM, Sean O'Donnell wrote:

Hi all,
   

Hello Sean,

I checked the GIT repository and noticed that there was a patch in forward.c for
this issue.  Looks like it was done 11/4/2010.  Two questions:

1) Is there any reason that patch didn't make it into Kamailio 3.1.2 ?
   


Indeed, there is no reason. Actually I have cherry-picked the patches 
into the 3.1 branch (commit_notice 3.1 3ec1e9  and 9ef0a1e). Thanks for 
noticing.



2) Any reason I shouldn't apply that patck to my 1.5.4 release?
   
The patch was already applied to the svn 1.5 branch (don't know if the 
latest 1.5.5 tar ball has it) but you can install it from svn and you 
can find it there (commit 6050)


Cheers
Marius

Thanks,
Sean O'Donnell
Senior Engineer
uReach Technologies, Inc.





 On Thu, 10 Feb 2011, Sean O'Donnell (skodonn...@ureach.com) wrote:

Hi all,

I just started deploying Kamailio release 1.5.4, and I think there's an issue
with how Kamailio identifies an outgoing interface when mhomed is enabled under
Linux.

I use Kamailio as a call distributor/proxy between a soft-switch/SBC and a
voicemail platform.  It
runs on a CentOS 5.3 (Linux 2.6 kernel) host with two network interfaces and is
configured such that it listens on both interfaces.  One interface (public
interface) handles traffic with the SBC, the other (private interface) handles
with the VM platform. The 'mhomed' option is enabled.

After upgrading from 1.5.3 to 1.5.4, I started noticing problems with UDP
packets coming out of the public interface.  After looking at some ngrep
captures on that interface, I noticed that some packets had the source IP
address of the private interface and also had Record-Route and Via headers for
the private interface only - no headers for the public interface were there.

Usually when I see the wrong source IP in a UDP packet, it's an issue with how
routes are set up on the host.  However, I had our network engineer double check
them, and they seem fine (no ambiguous routes).  The fact that I captured these
messages on the public interface also indicates to me that the kernel is routing
the message correctly.  The missing Record-Route and Via for the public
interface, however, lead me to believe that the proxy didn't correctly identify
the outgoing interface in the first place.

After looking at the ChangeLog for 1.5.4, I noticed that the some new logic was
put in to improve performance when mhomed is enabled (r5971) in forward.c, and I
think this is the issue.

As I understand it, prior to 1.5.4, when mhomed was enabled, Kamailio determined
the outgoing interface by creating a temporary UDP socket, invoking connect() on
the socket with the packet destination, then checking the source IP of the
socket that the kernel assigned using getsockname().  After the source address
was determined, the temp socket was closed closed. As of 1.5.4, this was
modified to reuse the temporary socket and just re-invoking connect() with a new
destination address.

The problem with the enhancement is that Linux (again, at least in the 2.6
kernels I'm using)
doesn't seem to rebind a new source address to the socket when connect() is
called more than once on
a UDP socket.  Instead, it keeps the original one, and thus the wrong interface
is assumed.

I wrote a small program to confirm this - basically creates a UDP socket, calls
connect()/getsockname()
multiple times using different destination addresses.  I ran it on several 2.6
kernels, including
Centos4.x and Centos5.  The result was always that the source address of the
socket wasn't changed after the first connect(), regardless of the destination
address.  The only way I could get it work as
required was to first do a connect() using a zero'd out AF_UNSPEC address before
doing the
connect() to the remote address.  I also ran it on Solaris and it worked.  Go
figure.

I've downloaded the latest stable release (3.1.2) but I think the issue is still
there, and I don't see
anything in the user groups that addresses this.

Any help would be appreciated.

Thanks,

Sean


___
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] Redundancy between 2 Kamailio servers

2011-02-02 Thread marius zbihlei

On 02/02/2011 12:20 PM, Danny Dias wrote:

Hello,

I was thinking that if i store the contacts that are registered into 
my proxy in a database, like this:


.
.

# - usrloc params -
modparam(usrloc, db_mode,   3)
.
.
if (is_method(REGISTER))
{
if (!save(location))
sl_reply_error();
exit;
  }
.
.

This way i would store the contacts in table location, and then i 
could make a backup of the DB and restore on the other server...is 
that ok? or i'm missing something?


Or you can use the p_usrloc module that does automatically the db 
replication and failover + data partitioning (or you can combine them to 
suite your needs). New in master branch (/shameless advertisement)


But seriously, we might want to give it a try. The config syntax remains 
the same as above you just need to load p_usrloc instead of usrloc and 
setup the databases.


Marius


Thanks in advance for your help!



2011/1/27 Iñaki Baz Castillo i...@aliax.net mailto:i...@aliax.net

2011/1/27 Danny Dias ing.diasda...@gmail.com
mailto:ing.diasda...@gmail.com:
 Two Kamailios in a HeartBeat cluster which manages the kamailio
 service along with a virtual IP in which kamailios are supposed to
 listen. Just one kamailio is running (HA manages them).


 So, the heartbeat cluster shall manage that both are ok and also
check that
 the virtual ip and the kamailio service in the primary server is
OKif
 something fails it will activate the virtual IP address and the
kamailio
 process in the other server? so this heartbeat cluster is
installed in both
 kamailio servers?
 which HA software do you recommend?

As I said at the top of my previous mail: HeartBeat (as it is the only
I'm used to).


 Regsitration can be done in a shared database with db_mode=3
(or 2) so
 no locations are lost when HA stops the running instance of
kamailio
 (or the server is down) and starts kamailio in the other
cluster node.


 So, the database of the kamailios should be dedicated and
externalised
 server?

Could be, or not. It doesn't matter too much.


--
Iñaki Baz Castillo
i...@aliax.net mailto:i...@aliax.net




___
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] Redundancy between 2 Kamailio servers

2011-01-27 Thread marius zbihlei

On 01/27/2011 04:15 PM, Danny Dias wrote:

Thanks Alex...

2011/1/27 Alex Hermann a...@speakup.nl mailto:a...@speakup.nl

On Thursday 27 January 2011, Klaus Darilion wrote:
 Am 27.01.2011 11:21, schrieb Danny Dias:
  I've read some difficulty in the synchronisation of
registrations because
  Kamailio works best when it stores registrations in memory and
  registrations are constantly changing - they expire and are
renewed, as
  well as new ones joining and old ones leaving. To make the
failover
  solution function seamlessly, it is necessary to synchronise the
  in-memory registrations between the primary and the backup
server . This
  can be done by forking a copy of the registration request to
the backup
  server, but there are some practical problems in doing this,
has anyone
  do something with this?

What problems are you referring to? I use this for some years now
without any
problems.



I checked for some problems here:

http://www.smartvox.co.uk/astfaq_ha_failover_ideas.htm

 Yes - the problem with SIP based replication is that both
proxies must
 be running. This is a problem as Kamailio binds to the virtual IP at
 start up - thus adding the virtual IP address to the backup
server does
 not make Backup-Kamailio listening to the new IP address - you would
 have to restart the backup Kamailio.

Just bind kamailio to the HA IP on both servers and do REGISTER
replication
between the two (on SIP level). Then if the IP migrates to the
other server,
it will take over the rgistrar function with no loss of records.
No restart
needed.


Do you mean that both Kamailio-1 and Kamailio-2 will be as primary 
server? and the clients will register in the 2 machines? and also they 
will bind to the ip of the HA? sorry my friend but i do not understand 
very well, i'm quite new with redundant systems, could you please 
explain a little?


Hello

This week, I have added the p_usrloc module to K master branch, that 
allows partitioned user location service for Kamailio. This has the 
benefits of redundancy, failover and load balancing to user location 
service for K. Along with Henning Westerholt, we will also present some 
strategies for partioned user location to the upcoming FOSDEM meeting in 
Brussels.(more info here 
http://www.fosdem.org/2011/schedule/event/kamailiolocationservices)


You can check the README of the module (master branch 
modules_k/p_usrloc) for  some strategies for partitioned user location.


Marius







 I think most people either have a database (which is
highly-available by
 itself) which is used by both proxies, or every proxy has a local
 database and the synchronization is on DB level (e.g. master-slave
 replication, btw: does somebody know if usrloc DB queries are
suitable
 for master-master replication?)

Last time i tried, they are not, at least not in writeback mode.
One proxy is
expiring records from the DB which the other proxy is trying to
update. Maybe
DB-only mode will work, but that has some practical (performcance)
problems.
--
Greetings,

Alex Hermann


___
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




--
Ing. Danny Dias
www.DannTEL.net http://www.DannTEL.net


___
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] SIP Router 3.03 topoh

2011-01-13 Thread marius zbihlei

On 01/13/2011 02:51 AM, dotnetdub wrote:



On 29 November 2010 09:33, marius zbihlei marius.zbih...@1and1.ro 
mailto:marius.zbih...@1and1.ro wrote:


On 11/26/2010 12:38 AM, dotne


Hi Marius,

Will apply tomorrow and recompile.. I don't have a dump of the
attack traffic but I'm sure it won't take long . . .

Thanks for your assistance.

Regards
Brian

Hello,

Please check commit 29990057d8b17cf0ded395438465c6cb2c38207f on
the 3.0 branch.(patch cherry-picked to 3.1 and master branch)

Marius



Hello,

Did this fix make it to the main 3.1 - I did install 3.1 last week and 
just checked the source..


int th_skip_msg(sip_msg_t *msg)
{
if (!get_cseq(msg)) {
LM_WARN(Invalid/Unparsed CSeq in message. Skipping.);
return 1;
}

if((get_cseq(msg)-method_id)(METHOD_REGISTER|METHOD_PUBLISH))
return 1;

return 0;


Regards,
Brian

Hello Brian,

Module: sip-router
Branch: 3.1
Commit: a72e59d23d4b104af6d7f30d1dc02a5fe175f3af

Also master and 3.0 are checked. the patch is this simple check for 
messages that don't have a correct CSeq header.


Marius
___
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] Recursive failure_route after CFNA

2010-12-21 Thread marius zbihlei

On 12/21/2010 03:22 PM, Igor Potjevlesch wrote:


Hello all,

I have setup a mechanism  to forward outgoing calls to another gateway 
if the first one replies with 5xx. I have simply used ‘t_check_status’ 
in the failure_route. This works.


But, with a CFNA it doesn’t work : the incoming call is treated by SER 
(0.9.9). After the timer has expired the call goes to ‘failure_route’ 
for the first time to setup the CFNA with, finally, an 
‘append_branch’. At this moment, the first gateway replies with 5xx 
and the call never goes to ‘failure_route’. I can match the 5xx within 
the ‘onreply_route’, but that’s all. So, instead of trying another 
gateway, the initial incoming calls terminate on the voicemail.


Can anyone help me?



Hello,

Have you loaded the/another failure route for the second time in the 
CFNA failure route handler?


Marius


Regards,

Igor.



___
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 3.1 compile issue on Sparc Solaris 10

2010-12-09 Thread marius zbihlei
On 10/22/2010 07:15 AM, KevinJin wrote:

 AppSer01:root@/usr/local/src/kamailio-3.1.0/kamailio$ gmake Q=0 all
 Makefile.defs defs skipped

 Makefile.defs defs skipped
 gmake[1]: Entering directory
 `/usr/local/src/kamailio-3.1.0/kamailio/modules/db_mysql'
 gcc -fPIC -DPIC -g -O9 -funroll-loops -mcpu=ultrasparc
 -mtune=ultrasparc -Wall -m64 -DNAME='kamailio' -DVERSION='3.1.0'
 -DARCH='sparc64' -DOS='solaris_' -DOS_QUOTED='solaris'
 -DCOMPILER='gcc 3.4.6' -D__CPU_sparc64 -D__OS_solaris
 -DSER_VER=3001000 -DCFG_DIR='/usr/local/kamailio-3.1/etc/kamailio/'
 -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_IPV6 -DUSE_MCAST
 -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE
 -DUSE_DNS_FAILOVER -DUSE_DST_BLACKLIST -DUSE_NAPTR -DDBG_QM_MALLOC
 -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 -DSPARC64_MODE
 -DHAVE_GETIPNODEBYNAME -DHAVE_SYS_SOCKIO_H -DHAVE_SCHED_YIELD
 -DHAVE_ALLOCA_H -DUSE_SIGACTION -DHAVE_DEVPOLL -DHAVE_SELECT
 -DHAVE_FILIO_H -DSER_MOD_INTERFACE -I/usr/local/include
 -I/usr/local/include/mysql -I/usr/local/mysql/include
 -I/usr/include/mysql -DMOD_NAME='db_mysql' -c my_cmd.c -o my_cmd.o
 -MMD -MP
 In file included from ../../globals.h:37,
 from ../../pt.h:42,
 from ../../counters.h:43,
 from mysql_mod.h:39,
 from my_cmd.c:40:
 ../../ip_addr.h:86: error: field `sin6' has incomplete type
 ../../ip_addr.h: In function `ip_addr_loopback':
 ../../ip_addr.h:283: warning: implicit declaration of function `htonl'
 ../../ip_addr.h:286: warning: implicit declaration of function
 `IN6_IS_ADDR_LOOPBACK'
 ../../ip_addr.h: In function `sockaddr2ip_addr':
 ../../ip_addr.h:353: error: dereferencing pointer to incomplete type
 ../../ip_addr.h: In function `su_getport':
 ../../ip_addr.h:399: warning: implicit declaration of function `ntohs'
 ../../ip_addr.h: In function `su_setport':
 ../../ip_addr.h:418: warning: implicit declaration of function `htons'
 gmake[1]: *** [my_cmd.o] Error 1
 gmake[1]: Leaving directory
 `/usr/local/src/kamailio-3.1.0/kamailio/modules/db_mysql'
 gmake: *** [modules] Error 1


 Thanks,
 Kevin

Hello Kevin,

If you don't use IPv6 you can disable it at compile time. make distclean
 make cfg and then edit config.mak and delete from CDEFS the
-DUSE_IPV6 define.

You should not have problems with this.

Marius

___
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] Store Source IP in DB

2010-12-07 Thread marius zbihlei

On 12/07/2010 04:20 PM, Bernhard Suttner wrote:

Hi,

I am using Kamailio with usrloc, nathelper and register module (and some 
other). All the data will be stored within a MySQL database. The contact 
address will be stored within the database. Is it somehow possible to store the 
SOURCE-IP of a incoming REGISTER from a phone to Kamailio somewhere in the 
database? It's just for debugging purposes.

Best regards,
Bernhard



___
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

   

Hello

You can try $si and the sqlops module.Don't know if it works with 
NAT(depends on topology)


Cheers

___
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] Error opening Kamailio's FIFO

2010-12-06 Thread marius zbihlei

On 12/06/2010 01:40 AM, Kurt Mullen wrote:

Hello,


I am getting this error when I try to run kamctl:

ERROR: Error opening Kamailio's FIFO FIFO

ERROR: Make sure you have the line 'modparam(mi_fifo, fifo_name, 
FIFO)' in your config


ERROR: and also have loaded the mi_fifo module.

I am able to start Kamailio with  Kamailio start

I have poured over all the responses on Google for two days trying to 
fix this error.  I have tried everything I know of.


I have tried each example.

kamctlrc

DB Path is correct:

# database path used by dbtext or db_berkeley

DB_PATH=/usr/share/kamailio/dbtext

## control engine: FIFO or UNIXSOCK

## - default FIFO

CTLENGINE=FIFO

## path to FIFO file

OSER_FIFO=FIFO  (I have already tried commenting this out)



This should be a UNIX style path e.g. /tmp/kamailio.fifo The directory 
where the fifo is must be writable by the kamailio user.


Marius


kamailio.cfg

loadmodule mi_fifo.so

Path to modules is correct:

mpath=modules_k:modules

#!else

mpath=/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/

#!endif

# - mi_fifo params -

modparam(mi_fifo, fifo_name, /tmp/kamailio.fifo)

modparam(mi_fifo, fifo_mode,0666)

This is installed on Ubuntu Server 10.10  64 bit Intel .

Can someone please help?

*Kurt A. Mullen*

Practical PC, LLC

(O) 830.542.4102 x204

(F) 210.767.3912



___
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] When too many calls, calls does not complete, too much delay when placing calls

2010-12-02 Thread marius zbihlei

On 12/01/2010 10:33 PM, Vic Jolin wrote:

Hi all,

Just want to ask if anybody here has come across this problem of mine, 
when single call proxy is ok, but when you send more traffic to it, 
calls somehow get stuck, trying to make a new call it takes a lot of 
time and so it times out.


Does anybody know what could be the problem?

Thanks!

Hello,

How many worker children does Kamailio have? How are your CPU stats (at 
this load you should have only idle CPU, anything else looks like a bug).

What process eat most CPU?

Marius

___
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] VIA header x-route-tag

2010-12-01 Thread Marius Zbihlei
Hello Alex,

Can't test it right now, but it should work better with this :

$var(s:xroutetag) = $(hdr(Via){re.subst,/^.*;x-route-tag=(.*)/\1/})

You want to substitute (only affects $var) the whole via header with the regex 
found between () and referenced by \1. Keep in mind that Daniel's solution is 
more elegant and should work for you.

Marius


From: alex pappas [rebel.pap...@gmail.com]
Sent: Wednesday, December 01, 2010 9:15 AM
To: Marius Zbihlei
Cc: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] VIA header x-route-tag

Marius hi,

Thank you for your replay.
With the regular expression you provided me I get SIP/2.0/UDP  
172.16.0.13:5060;tgrp:TNDEM-ACR

Can I isolate only tgrp:TNDEM-ACR ?

Thank you
Alex


On Tue, Nov 30, 2010 at 5:07 PM, marius zbihlei 
marius.zbih...@1and1.romailto:marius.zbih...@1and1.ro wrote:
On 11/30/2010 01:58 PM, alex pappas wrote:
Dear All,

We have some cisco gw that they send to the Kamailio in the first invite and 
inside the VIA header an x-route-tag=The Gateway that the call entered.

I'm trying to add this to the acc module in order to have it recorded but 
without sucess.
My config is this:

if (search(x-route-tag))
{
avp(s:xroutetag) = $sel(@via);
xlog(- We have a x-route-tag in the SIP msg avp: 
$avp(s:xroutetag) -);
};

I'm trying to add the VIA header to an avp so I could manipulate the string but 
i cannot implement this.

Does anyone can suggest a way to add the x-route-tag value to an AVP?

Thank you in advance

Alex

sample VIA header:  Via: SIP/2.0/UDP  
10.0.0.15:5060http://10.0.0.15:5060;x-route-tag=tgrp:TANDEM-KOR

Hello,

You can use transformations 
http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x . This should to 
the trick: (careful on needed modules)


$var(s:xroutetag) = $(hdr(Via){re.subst,/x-route-tag=(.*)/\1/});




Cheers,
Marius






___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.orgmailto: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] VIA header x-route-tag

2010-12-01 Thread Marius Zbihlei
Hello 

I think you should try:

$sel(@via[1].params[x-route-tag])

Marius

From: alex pappas [rebel.pap...@gmail.com]
Sent: Wednesday, December 01, 2010 9:09 AM
To: Daniel-Constantin Mierla
Cc: Marius Zbihlei; sr-users@lists.sip-router.org
Subject: Re: [SR-Users] VIA header x-route-tag

Daniel hi,

When I'm trying the bellow I get the following error:

Dec  1 10:06:17 opensips1 kamailio: ERROR: core [select.c:149]: parse_select: 
invalid index, no closing ]
Dec  1 10:06:17 opensips1 kamailio: ERROR: pv [pv_select.c:45]: invalid select 
name [...@via.params[x-route-tag]]
Dec  1 10:06:17 opensips1 kamailio: ERROR: core [pvapi.c:550]: pvar sel has 
an invalid name param [...@via.params[x-route-tag]]
Dec  1 10:06:17 opensips1 kamailio: ERROR: core [pvapi.c:705]: wrong char 
[)/41] in [$sel(@via.params[x-route-tag])] at [29 (5)]
Dec  1 10:06:17 opensips1 kamailio: : core [cfg.y:3328]: parse error in 
config file /usr/local/etc/kamailio/kamailio.cfg, line 705, column 23-52: 
unknown script pseudo variable $sel(@via.params[x-route-tag])

I also added an @ before the via

if (search(x-route-tag))
{
$avp(s:xroutetag) = $sel(@via.params[x-route-tag]);
xlog(- We have a x-route-tag in the SIP msg avp: 
$avp(s:xroutetag) -);
};


Thank you
Alex


On Tue, Nov 30, 2010 at 10:47 PM, Daniel-Constantin Mierla 
mico...@gmail.commailto:mico...@gmail.com wrote:


On 11/30/10 4:07 PM, marius zbihlei wrote:
On 11/30/2010 01:58 PM, alex pappas wrote:
Dear All,

We have some cisco gw that they send to the Kamailio in the first invite and 
inside the VIA header an x-route-tag=The Gateway that the call entered.

I'm trying to add this to the acc module in order to have it recorded but 
without sucess.
My config is this:

if (search(x-route-tag))
{
avp(s:xroutetag) = $sel(@via);
xlog(- We have a x-route-tag in the SIP msg avp: 
$avp(s:xroutetag) -);
};

I'm trying to add the VIA header to an avp so I could manipulate the string but 
i cannot implement this.

Does anyone can suggest a way to add the x-route-tag value to an AVP?

Thank you in advance

Alex

sample VIA header:  Via: SIP/2.0/UDP  
10.0.0.15:5060http://10.0.0.15:5060;x-route-tag=tgrp:TANDEM-KOR

Hello,

You can use transformations 
http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x . This should to 
the trick: (careful on needed modules)


$var(s:xroutetag) = $(hdr(Via){re.subst,/x-route-tag=(.*)/\1/});




just as alternative, in this case it should works also with selects variables, 
you can try:

$sel(via.params[x-route-tag])

Cheers,
Daniel

--
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com

___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.orgmailto: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] VIA header x-route-tag

2010-11-30 Thread marius zbihlei

On 11/30/2010 01:58 PM, alex pappas wrote:

Dear All,

We have some cisco gw that they send to the Kamailio in the first 
invite and inside the VIA header an x-route-tag=The Gateway that the 
call entered.


I'm trying to add this to the acc module in order to have it recorded 
but without sucess.

My config is this:

if (search(x-route-tag))
{
avp(s:xroutetag) = $sel(@via);
xlog(- We have a x-route-tag in the SIP msg avp: 
$avp(s:xroutetag) -);

};

I'm trying to add the VIA header to an avp so I could manipulate the 
string but i cannot implement this.


Does anyone can suggest a way to add the *x-route-tag* value to an AVP?

Thank you in advance

Alex

sample VIA header:  Via: SIP/2.0/UDP 10.0.0.15:5060 
http://10.0.0.15:5060;*x-route-tag=tgrp:TANDEM-KOR*



Hello,

You can use transformations 
http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x . This 
should to the trick: (careful on needed modules)


$var(s:xroutetag)  =  $(hdr(Via){re.subst,/x-route-tag=(.*)/\1/});



Cheers,
Marius




___
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] Failover with SRV records

2010-11-29 Thread marius zbihlei

On 11/29/2010 06:03 AM, Eric Hiller wrote:
Sorry all for the second question of the night as I go through working 
out bugs in my setup. I want to use SRV records to loadbalance across 
hosts. This works great, when all the hosts listed in the SRV are up. 
However, I want kamailio to use the next host if the current hosts 
fails. I tried just setting up a new branch, but kamailio keeps using 
the same SRV entry over and over on that transaction, only a new 
transaction seems to give kamailio a chance to use a different SRV 
entry. Any ideas as to how I can force kamailio to try the next SRV 
entry if the first one fails?


For example I t_relay to 2.domain.com which has a 
_sip._udp.2.domain.com entry for hostA and hostB. If hostB is down, 
but kamialio decides to send to hostB it just keeps doing so even 
though hostA is perfectly up it doesn't try for it. Is there a way to 
remove hostB from the kamailio try list? Or as an alternative to do a 
manual SRV lookup on 2.domain.com and then put then in a variable and 
go through them one by one manually?


Ideas? Thanks
-Eric

Hello,

Kamailio does not use ICMP replies to check if a host is reachable on a 
UDP sendto(). This means that ICMP port unreachable errors are not 
handled by K and so the same host is retried on TM retransmits. Host 
selection of both A records and SRV records is done based on weights 
returned from the DNS query(so it is balanced)


For a INVITE you can use  fr_timer to very low values (5 seconds) and 
fr_inv_timer to larger value. If no 100 is received than the fr_timer 
kicks in and depending on the disable_dns_failover core parameter 
another host is tried. The order of retry is this: Regardless of 
disable_dns_failover param, other A records are tried (if no 0x4 flag is 
given to t_relay (at least in K1.5)), then , is dns_failover is active, 
other SRV records, then NAPTR.


Check the TM documentation for more info.

Marius

P.S. This is on K 1.5 . I hope 3.0/3.1 still has this . I think dns 
caching has changed so you need to recheck the parameters I gave.



___
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] Failover with SRV records

2010-11-29 Thread marius zbihlei

On 11/29/2010 02:16 PM, Iñaki Baz Castillo wrote:

2010/11/29 marius zbihleimarius.zbih...@1and1.ro:
   

Kamailio does not use ICMP replies to check if a host is reachable on a UDP
sendto(). This means that ICMP port unreachable errors are not handled by K
and so the same host is retried on TM retransmits.
 

AFAIR using raw sockets checking ICMP notifications would be possible
(not yet implemented, but possible as I remember from a thread with
Andrei).
   
Possible, but not easily implementable, as ICMP Host unreachable are 
sent asynchronously from the kernel. Also the current sendto() call does 
not guarantee delivery on all Unixes (Linux should be fine),  connected 
UDP sockets are to be used instead.

IMHO this would be very useful because if a UDP port is unreachable
and there is a ICMP notification about it, the proxy should generate
an internal 503 (transport error) rather than a 408 (fr_timer
timeout).

   
Well, this means that we should disable dns_failover (or equivalents) 
completely and handle ICMP errors in failure_route blocks(just test if 
the transaction issued a 503). If I recall RFC 3263 , this would mean 
another server discovery (as the new request generates a new 
transaction) so again there is the possibility that the broken host is 
selected. If we use this dns fallback(IMHO this is a nice feature- I 
personally rely on this) how do we decide to generate a 503 ?


If the host is already a IP address, that it would be ok to send a 503, 
as no DNS failover is possible.


Ideas?

Marius

___
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] SIP Router 3.03 topoh

2010-11-25 Thread marius zbihlei

On 11/25/2010 12:00 PM, dotnetdub wrote:



On 24 November 2010 07:10, Daniel-Constantin Mierla mico...@gmail.com 
mailto:mico...@gmail.com wrote:


If you don't have the mask ip to your host ip (kamailio listening
ip) like Alex pointed, do you have a core dump from where you can
send the backtrace?

Cheers,
Daniel



Hi Alex/Daniel,

so THe IP of this SIP proxy is x.x.x.11 and I am using x.x.x.10 for 
the Mask IP.


I see the coredump in the root of the server..

ls /core -lah
-rw--- 1 root root 134M 2010-11-20 19:48 /core

which is the date it crashed.

gdb /sbin/kamailio /core

This GDB was configured as i486-linux-gnu...
Cannot access memory at address 0xb75f3fb0


I am running gdb from debian repo on 5.04 maybe I need to compile gdb?


Hello,

No, the problem is with the coredump AFAIK. Try looking thru 
/var/log/messages and dmesg for any indication of a coredump and the 
module that generated it. Please email those lines as well.


Marius

Thanks
Brian







___
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] SIP Router 3.03 topoh

2010-11-25 Thread marius zbihlei

On 11/25/2010 12:07 PM, marius zbihlei wrote:

On 11/25/2010 12:00 PM, dotnetdub wrote:



On 24 November 2010 07:10, Daniel-Constantin Mierla 
mico...@gmail.com mailto:mico...@gmail.com wrote:


If you don't have the mask ip to your host ip (kamailio listening
ip) like Alex pointed, do you have a core dump from where you can
send the backtrace?

Cheers,
Daniel



Hi Alex/Daniel,

so THe IP of this SIP proxy is x.x.x.11 and I am using x.x.x.10 for 
the Mask IP.


I see the coredump in the root of the server..

ls /core -lah
-rw--- 1 root root 134M 2010-11-20 19:48 /core

which is the date it crashed.

gdb /sbin/kamailio /core

This GDB was configured as i486-linux-gnu...
Cannot access memory at address 0xb75f3fb0


I am running gdb from debian repo on 5.04 maybe I need to compile gdb?


Hello,

No, the problem is with the coredump AFAIK. Try looking thru 
/var/log/messages and dmesg for any indication of a coredump and the 
module that generated it. Please email those lines as well.


Hello
I see that the interesting line is already in the first mail . Please 
try this


readelf -S /path/to/topoh.so

You should have somethink like this

  [Nr] Name  TypeAddr OffSize   ES Flg 
Lk Inf Al
  [ 0]   NULL 00 00 00  
0   0  0

.
  [10] .init PROGBITS1914 001914 30 00  AX  
0   0  4
  [11] .plt  PROGBITS1944 001944 000430 04  AX  
0   0  4
  [12] .text PROGBITS1d80 001d80 008008 00  AX  
0   0 16


Note the address of the .text segment (in my case is 0x1d80)

Then

gdb /path/to/kamailio core.dump

in the gdb console load the topoh.so

add-symbol-file /path/to/topoh.so 0xb7004000 + 0xoffset of .text 
segment found as above


then check the value of the Instruction pointer IP (0xb70070d9) Still in 
the gdb console


x/s 0xb70070d9

You will get an offset relative to a function where the crashed 
happened. This would be very helpful so please share the finding. Also 
do a info registers (in the gdb console) and paste the content of the 
registers as well.


Marius


Marius

Thanks
Brian









___
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] SIP Router 3.03 topoh

2010-11-25 Thread marius zbihlei

On 11/25/2010 01:31 PM, dotnetdub wrote:


There are 36 section headers, starting at offset 0x17b34:

Section Headers:
  [Nr] Name  TypeAddr OffSize   ES Flg 
Lk Inf Al
  [ 0]   NULL 00 00 00 
 0   0  0
  [ 1] .hash HASH00b4 b4 000498 04   A 
 3   0  4
  [ 2] .gnu.hash GNU_HASH054c 00054c 0002d8 04   A 
 3   0  4
  [ 3] .dynsym   DYNSYM  0824 000824 000650 10   A 
 4   1  4
  [ 4] .dynstr   STRTAB  0e74 000e74 000581 00   A 
 0   0  1
  [ 5] .gnu.version  VERSYM  13f6 0013f6 ca 02   A 
 3   0  2
  [ 6] .gnu.version_rVERNEED 14c0 0014c0 30 00   A 
 4   1  4
  [ 7] .rel.dyn  REL 14f0 0014f0 0001d0 08   A 
 3   0  4
  [ 8] .rel.plt  REL 16c0 0016c0 000210 08   A 
 3  10  4
  [ 9] .init PROGBITS18d0 0018d0 30 00  AX 
 0   0  4
  [10] .plt  PROGBITS1900 001900 000430 04  AX 
 0   0  4
  [11] .text PROGBITS1d30 001d30 0080d8 00  AX 
 0   0 16
  [12] .fini PROGBITS9e08 009e08 1c 00  AX 
 0   0  4
  [13] .rodata   PROGBITS9e24 009e24 001618 01 AMS 
 0   0  4
  [14] .eh_frame PROGBITSb43c 00b43c 04 00   A 
 0   0  4
  [15] .ctorsPROGBITSc440 00b440 08 00  WA 
 0   0  4
  [16] .dtorsPROGBITSc448 00b448 08 00  WA 
 0   0  4
  [17] .jcr  PROGBITSc450 00b450 04 00  WA 
 0   0  4
  [18] .dynamic  DYNAMIC c454 00b454 c8 08  WA 
 4   0  4
  [19] .got  PROGBITSc51c 00b51c 6c 04  WA 
 0   0  4
  [20] .got.plt  PROGBITSc588 00b588 000114 04  WA 
 0   0  4
  [21] .data PROGBITSc6a0 00b6a0 00012c 00  WA 
 0   0 32
  [22] .bss  NOBITS  c7e0 00b7cc 0004a0 00  WA 
 0   0 32
  [23] .comment  PROGBITS 00b7cc d9 00 
 0   0  1
  [24] .debug_arangesPROGBITS 00b8a8 b0 00 
 0   0  8
  [25] .debug_pubnames   PROGBITS 00b958 000448 00 
 0   0  1
  [26] .debug_info   PROGBITS 00bda0 005dd1 00 
 0   0  1
  [27] .debug_abbrev PROGBITS 011b71 0007a8 00 
 0   0  1
  [28] .debug_line   PROGBITS 012319 0014b9 00 
 0   0  1
  [29] .debug_frame  PROGBITS 0137d4 0004b0 00 
 0   0  4
  [30] .debug_strPROGBITS 013c84 001d76 01  MS 
 0   0  1
  [31] .debug_locPROGBITS 0159fa 001ebe 00 
 0   0  1
  [32] .debug_ranges PROGBITS 0178b8 000140 00 
 0   0  8
  [33] .shstrtab STRTAB   0179f8 00013b 00 
 0   0  1
  [34] .symtab   SYMTAB   0180d4 0009e0 10 
35  58  4
  [35] .strtab   STRTAB   018ab4 0006ec 00 
 0   0  1

Key to Flags:
  W (write), A (alloc), X (execute), M (merge), S (strings)
  I (info), L (link order), G (group), x (unknown)
  O (extra OS processing required) o (OS specific), p (processor specific)


in the gdb console load the topoh.so

add-symbol-file /path/to/topoh.so 0xb7004000 + 0xoffset of .text
segment found as above


Ok.


Hello

Did you give gdb the command
add-symbol-file /path/to/topoh.so 0xb7004000+0x1d30

Gdb should inquire you if you want to lead topoh.so at offset 0xb7005d30 
(press 'y'). Then the IP should not be out of bounds ... it should be 
mapped to the topoh.so text segment. Ah, I have made a mistake, there 
should be no spaces between the address and the offset (as seen above)


Anyway you should get something like this (on my machine - on your use 
the offsets from above)

(gdb) add-symbol-file modules/topoh/topoh.so 0xb7004000+0x1d80
add symbol table from file modules/topoh/topoh.so at
.text_addr = 0xb7005d80
(y or n) y
Reading symbols from 
/home/marius/dev/sip-router/modules/topoh/topoh.so...done.


Then
(gdb) x/s 0xb70070d9
!!0xb70070d9 th_get_hdr_cookie+25: Address 0xb70070d9 
out of bounds!


The line between all the !! is the line I care about


Also don't forget
(gdb)info registers

Thank you
Marius



___
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] SIP Router 3.03 topoh

2010-11-25 Thread marius zbihlei




Also don't forget
(gdb)info registers

Thank you
Marius


Hi Marius,

I hope this is what your after!

(gdb) add-symbol-file /lib/kamailio/modules/topoh.so 0xb7004000+0x1d30
add symbol table from file /lib/kamailio/modules/topoh.so at
.text_addr = 0xb7005d30
(y or n) y
Reading symbols from /lib/kamailio/modules/topoh.so...done.
(gdb) x/s 0xb70070d9
0xb70070d9 th_skip_msg+9: Address 0xb70070d9 out of bounds
(gdb) info registers



Yes I think it is

Looking at the debug messages I see the CSeq is wrong.

But :

int th_skip_msg(sip_msg_t *msg)
{
if((get_cseq(msg)-method_id)(METHOD_REGISTER|METHOD_PUBLISH))
return 1;

return 0;
}

As the cseq is wrong the get_cseq macro probably returns a NULL Pointer 
who gets dereferenced (BANG the crash). Any other Ideas ?!


The patch is trivial ( if(!get_cseq(msg))) parse_cseq() ) something 
in this line. Daniel, What do you think ?


Marius

___
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] SIP Scanning Attacks Experiences

2010-11-18 Thread marius zbihlei

On 11/18/2010 03:59 PM, Fred Posner wrote:

On Nov 18, 2010, at 8:49 AM, marius zbihlei wrote:

   

On 11/18/2010 01:58 PM, Daniel-Constantin Mierla wrote:
 

Hello,

during the testing period of Kamailio 3.1.0, while running it at
voipuser.org, I had the chance to watch live and analyze a SIP scanning
attack. Yesterday I noticed another one by looking at Siremis 2.0
charts, therefore I wrote an article with some hints about what you can
use to protect your SIP services within Kamailio configuration file.

You can read it at:
* http://asipto.com/u/i

Hope is going to be useful for many of you!

Cheers,
Daniel


   

Hello Daniel,

Nice read, thanks for sharing. This friendly-scanner messages has really gotten out of 
hand lately. FYI, they are generated by a python suite called SIPVicious (ha ha nice 
pun)(http://code.google.com/p/sipvicious/) . More on this http://blog.sipvicious.org/. The suite 
was developed (really really extended the sense of the word developed here - as the 
scripts are really basic) by a security company who trails over Europe giving lectures on Voip 
security. :)

Cheers,
Marius
 

SIP Vicious does have a kill command... I've tried launching that on detection 
with mixed results. Triggering it from a hash count might prove better.


   
The kill command (actually a bug that caused a Python exception to be 
raised) was fixed in a later commit :)


Marius

With best regards,

Fred
http://qxork.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] DoS on Kamailio

2010-11-03 Thread marius zbihlei

On 11/03/2010 02:57 PM, Bernhard Suttner wrote:

Hi,

is there a Kamailio module to prevent DoS Attacks like SIP Register Scanners? I know, 
that there is a way to implement that with Fail2Ban and xlog but it would be nice to have 
a pure Kamailio solution for that?

Any idea is appreciated.

Best regards,
Bernhard Suttner


___
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

   

Hello

You can use pike module or Dictionary Attack prevention using htable (in 
the 3.1 cfg just have to enable)


Marius

___
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] checking if calls are still active

2010-11-01 Thread marius zbihlei

On 11/01/2010 05:13 PM, Vic Jolin wrote:

Hi,

Just want to ask what is the best way to check if calls are still 
active especially when we are not handling media?


Thanks

Hello

There is SST (Sip Session Timers RFC 4028), which is implemented in the 
SST module, but at least 1 UA must know the extension. Also I have been 
working on a IETF draft  to use end-to-end OPTIONS ping to determine the 
operational status of a UA.(it works well with B2BUA, relatively well 
with stateful proxies). If you are interested I can talk more about the 
draft and how I propose using OPTIONS requests for this.(no changes on 
UAs are necessary)


Marius.

___
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] checking if calls are still active

2010-11-01 Thread marius zbihlei

On 11/01/2010 05:24 PM, Vic Jolin wrote:

That's interesting, can you tell me more about that draft?


Hello

I have attached the draft.
There are 2 setups for using end-to-end OPTIONS ping

1. In Dialog... if one of the endpoints is a B2BUA, it can send at 
specific interval in-dialog OPTIONS ping (OPTIONS request, increasing 
cseq) to the other endpoint. Most well-behaved UAS will respond with a 
481 if the dialog not longer exists as per RFC 3261 .


 The response to an OPTIONS is
   constructed using the standard rules for a SIP response as discussed
   in Section 8.2.6.  The response code chosen MUST be the same that
   would have been chosen had the request been an INVITE.

Other error conditions are on a  408 , 404 etc (as any in-dialog request 
is not guaranteed to succeed).


This is already used some production environments.

2. Out of dialog. A proxy keeps sending OPTIONS request (no dialog 
involved here) to one of the UA as long as one of these 2 conditions exist:

a. the dialog has not ended via a method specific mean (BYE for INVITE etc)
b. a 408 (or other error codes) was received when generating a BYE.

These where the big two points of the draft.

Marius
On Mon, Nov 1, 2010 at 11:18 PM, marius zbihlei 
marius.zbih...@1and1.ro mailto:marius.zbih...@1and1.ro wrote:


On 11/01/2010 05:13 PM, Vic Jolin wrote:

Hi,

Just want to ask what is the best way to check if calls are
still active especially when we are not handling media?

Thanks

Hello

There is SST (Sip Session Timers RFC 4028), which is implemented
in the SST module, but at least 1 UA must know the extension. Also
I have been working on a IETF draft  to use end-to-end OPTIONS
ping to determine the operational status of a UA.(it works well
with B2BUA, relatively well with stateful proxies). If you are
interested I can talk more about the draft and how I propose using
OPTIONS requests for this.(no changes on UAs are necessary)

Marius.


___
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







Network Working Group M. Zbihlei
Internet-Draft 1and1 Internet AG
Expires: February 2, 2011August 2010



   Draft-mzbihlei-end-to-end-OPTIONS-ping-01

Abstract

   For VoIP providers, a common problem is related with finding the
   state of a dialog in certain error conditions that are caused by
   network problems, User Agent(UA) crashes etc.  This document
   describes a procedure for using the Session Initiation Protocol (SIP)
   OPTIONS method in order to allow a SIP entity to discover the status
   of a UA and decide the state of the dialog.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as work in progress.

   This Internet-Draft will expire on February 2, 2011.

Copyright Notice

   Copyright (c) 2010 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.



Zbihlei Expires February 2, 2011[Page 1]

Internet-Draft End-to-end SIP OPTIONS Ping   August 2010


1.  Introduction

   Given the multitude of parties involved in a SIP Call, a common
   problem for providers is determining the status of the caller/callee
   during a dialog.  There are methods for making SIP enabled networks
   robust and efficient by providing redundancy at hardware or service
   level, but this is not the case for most UAs.  Hardware problems,
   software crashes, power failures are factors in the way a UA behaves,
   affecting

Re: [SR-Users] Drouting usage

2010-10-25 Thread marius zbihlei

On 10/25/2010 04:16 PM, Javier Gallart wrote:

Hello

sorry if this sounds too newbie. I'm interested in the drouting 
module. The first INVITE is correctly forwarded to the gw foudn in the 
drouting table:

if (is_method(INVITE)  !has_totag()) {
do_routing(0);
record_route();
}
However for subsequent messages (ACK, BYE) in the dialog I don't know 
how to keep track of the ip resolved by the drouting logic so the 
messages are correctly forwarded to the same gw. I've made some tests 
using the dialog module with no success. Any hint?


Thanks in advance

Javier

Hello

You might want to use loose_route() to perform loose routing (defined in 
RFC 3261) of in-dialog requests. (Loose_route also performs strict routing)


if (has_totag()){
loose_route();
t_relay();
exit;
}

Marius

___
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] Reverse Filterlists idea

2010-10-20 Thread marius zbihlei

On 10/18/2010 07:09 PM, Nicolas Rüger wrote:

Hello,

Marius Zbihlei has patched the userblacklist module, so that it can handle 
characters as well (NOT in main release 3.1 yet). Thanks Marius.

Therefore it might now be possible to filter general SIP-URIs!??



My idea is simple and described here. Please give some Feedback!!!



As the prefix-functionality up to now was referring to SIP-URIs consisting of 
digits (=real telephon numbers) like

  004930123...@1and1.de

the general URI might be something like

   user_...@server.domain.de

So far the prefix-functionality works because usernames that are real 
telephone numbers, that always start with country-code, followed by town- or 
regional-code and end with a unique number of the user (in this example 0049=Germany, 
(0)30=Berlin, 123456=user's unique number).

To use prefix-functionality with general (including non-digits) URIs it must 
be evaluated reverse (from back to front) as the domain ends with the country- or 
top-level-domain and becomes more detailed the reverse way.

   


Hello,

I understand your need, and it seems a fairly good feature request. I 
have a few worries. I don't agree with evaluating everything in reverse. 
I think usernames are to be evaluated in normal order, and only 
domain(DNS part), if present should be evaluated in reverse. So when 
trying to match user_...@server.domain.de (as prefix field) it should be 
matched by either user_12 or  .domain.de . Wouldn't this make more sense?

What do you think?

So the IDEA is:

Insert the domain as prefix in userblacklist-table in reverse, to use the 
functionality.

I would use a perl-script to reverse the SIP-URI of the calling party in 
routing logic and then check it against the already reverted domain in the 
userblacklist-table.

Do you think this is a good/well-working idea???
   


This looks to me like a hack. I was thinking that the userblacklist 
module should better provide this match instead of the script writer 
hacking with some perl. I direction parameter might do the trick, but 
this will require some big changes to this and dtrie. This also affects 
every module that uses dtrie in its implementation like carrierroute and 
so on(They all do prefix matching).


As Henning W. already said in the previous thread, until now there 
wasn't  much need for doing this, as interoperability with PSTN caused 
using a user scheme resembling classic telephony.


Marius


Any concerns or suggestions are appreciated...

Regards,

Nicolas

   



___
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] set cfg variables via sercmd

2010-10-19 Thread marius zbihlei

On 10/19/2010 05:12 PM, Morten Isaksen wrote:

Kamailio 3.0.3.

I am trying to change a variable (in the cfg variable framwork) from
sercmd, but I get an error

[r...@sip-core-1 ~]# sercmd cfg.set_now_int recording enabled 1
error: 500 - command cfg.set_now_int not found

I have installed readline and ncurses which seems to be needed by
looking at sercmd.c.

Any ideas what I am missing?

   

Hello

Have you loaded the ctl and cfg_rpc modules via loadmodule?!

Marius

___
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] userblacklist error using characters

2010-10-14 Thread marius zbihlei

On 10/13/2010 09:57 PM, Nicolas Rüger wrote:

Hey Marius,

thnaks again. I now did the following:

  git clone git://git.sip-router.org/sip-router kamailio
  cd kamailio
  git checkout -b 3.1 origin/3.1

  git cherry-pick 2f8f8e58

  make FLAVOUR=kamailio  include_modules=db_mysql perl cfg
  make all
  make install

Picking the cherry worked without the -depth 1. :)


BUT I still get an error when using userblacklistmodule:


  ERROR:core  [dtrie.c:132]: cannot insert non-numerical character
  ERROR: userblacklist [db.c:91]: could not insert values into trie.


   

Hello,

Are you sure that you rebuilt userblacklist module after the patch (you 
can go to modules_k/userblacklist and run make from there)? Did the 
patch applied without error? Also, have you explicitly enabled the alpha 
numerical match mode


modparam(userblacklist, match_mode, 128)

in you cfg file?

Cheers
Marius


The username I use in userblacklist-table is user04 and the prefix is 
user03. Domain column is empty.

Any ideas why it's not working???


Thank you!!

Regards,

Nicolas






 Original-Nachricht 
   

Datum: Wed, 13 Oct 2010 19:16:21 +0200
Von: Marius Zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters
 
   

Hello,
Sorry for the advice,  -depth 1 means no commit history which is fine :D
The patch I was referring is here
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=2f8f8e58a922adec440d47592d1ca24dbf05f29c
You can save it into a file (starting with the line diff --git
a/modules_k/userblacklist/README b/modules_k/userblacklist/README) and use the 
patch
utility to patch the module.
Then compile.
Marius


From: Nicolas Rüger [nicolasrue...@gmx.de]
Sent: Wednesday, October 13, 2010 5:46 PM
To: Marius Zbihlei
Cc: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] userblacklist error using characters

Hey Marius,

thanks for the detailed answer but after

   git cherry-pick 2f8f8e58

I get the error:

   fatal: Cannot find '2f8f8e58'

Any ideas???

Thank you.

Regards,

Nicolas


 

patch from the master branch to 3.1 (local so don't worry) using

cd /usr/local/src/kamailio-3.1.0
rm -rf kamailio #start with a new fresh clone
git clone --depth 1 git://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 3.1 origin/3.1
#this is the new step
git cherry-pick 2f8f8e58


You should then see something like

Finished one cherry-pick.
[3.1 e4f7cd8] modules_k/userblacklist : extended userblacklist module so
also alphanumerical matches are possible
   5 files changed, 86 insertions(+), 27 deletions(-)


   

--
GRATIS! Movie-FLAT mit über 300 Videos.
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome

___
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] userblacklist error using characters

2010-10-14 Thread marius zbihlei

On 10/14/2010 11:36 AM, Nicolas Rüger wrote:

Hello Marius,

thanks for the advice. I forgot about the modparam. It seems working now as I 
don't get the error any more :)

BUT blacklisting does not work for mesee:

In kamailio.cfg I added the following in routing logic:

  if (is_method(INVITE)) {

if (!check_user_blacklist($rU, $rd,$fU)){
sl_send_reply(403, Forbidden);
exit;
}

  }

Im my case $rU is user04 , $rd is mykamailio.de and $fU is user03.

...means use...@mykamailio.de is calling use...@mykamailio.de

Table userblacklist looks like this:

   


Hello

You are right, I have never tested with $fU given so I was a bug in the 
code. It should be fixed by commit
d128ac966beeb2ddfd3332a20fdd93ae292d81b1. The bug affected alphanum 
match mode only if the $fU had trailing non-digit chars.

Can you check if it works...

Thank you.

Marius

  id  | username |domain | prefix | whitelist
  
  15  | user04   | mykamailio.de | user03 |0


In this scenario user03 should be blacklisted by user04, right!? But it's 
not...

Any ideas why???


Thank you.

Regards,

Nicolas








 Original-Nachricht 
   

Datum: Thu, 14 Oct 2010 11:12:33 +0300
Von: marius zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters
 
   

On 10/13/2010 09:57 PM, Nicolas Rüger wrote:
 

Hey Marius,

thnaks again. I now did the following:

   git clone git://git.sip-router.org/sip-router kamailio
   cd kamailio
   git checkout -b 3.1 origin/3.1

   git cherry-pick 2f8f8e58

   make FLAVOUR=kamailio  include_modules=db_mysql perl cfg
   make all
   make install

Picking the cherry worked without the -depth 1. :)


BUT I still get an error when using userblacklistmodule:


   ERROR:core   [dtrie.c:132]: cannot insert non-numerical character
   ERROR: userblacklist [db.c:91]: could not insert values into trie.



   

Hello,

Are you sure that you rebuilt userblacklist module after the patch (you
can go to modules_k/userblacklist and run make from there)? Did the
patch applied without error? Also, have you explicitly enabled the alpha
numerical match mode

modparam(userblacklist, match_mode, 128)

in you cfg file?

Cheers
Marius

 

The username I use in userblacklist-table is user04 and the prefix is
   

user03. Domain column is empty.
 

Any ideas why it's not working???


Thank you!!

Regards,

Nicolas






 Original-Nachricht 

   

Datum: Wed, 13 Oct 2010 19:16:21 +0200
Von: Marius Zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters

 


   

Hello,
Sorry for the advice,  -depth 1 means no commit history which is fine
 

:D
 

The patch I was referring is here

 

http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=2f8f8e58a922adec440d47592d1ca24dbf05f29c
 

You can save it into a file (starting with the line diff --git
a/modules_k/userblacklist/README b/modules_k/userblacklist/README) and
 

use the patch
 

utility to patch the module.
Then compile.
Marius


From: Nicolas Rüger [nicolasrue...@gmx.de]
Sent: Wednesday, October 13, 2010 5:46 PM
To: Marius Zbihlei
Cc: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] userblacklist error using characters

Hey Marius,

thanks for the detailed answer but after

git cherry-pick 2f8f8e58

I get the error:

fatal: Cannot find '2f8f8e58'

Any ideas???

Thank you.

Regards,

Nicolas



 

patch from the master branch to 3.1 (local so don't worry) using

cd /usr/local/src/kamailio-3.1.0
rm -rf kamailio #start with a new fresh clone
git clone --depth 1 git://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 3.1 origin/3.1
#this is the new step
git cherry-pick 2f8f8e58


You should then see something like

Finished one cherry-pick.
[3.1 e4f7cd8] modules_k/userblacklist : extended userblacklist module
   

so
 

also alphanumerical matches are possible
5 files changed, 86 insertions(+), 27 deletions(-)



   

--
GRATIS! Movie-FLAT mit über 300 Videos.
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome

___
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] userblacklist error using characters

2010-10-14 Thread marius zbihlei

On 10/14/2010 12:34 PM, Nicolas Rüger wrote:

Hello,

thank you, but make all reports an error this time:


  userblacklist.c: In function ‘check_user_list’:
  userblacklist.c:290: error: ‘match_mode’ undeclared (first use in this 
function)
  userblacklist.c:290: error: (Each undeclared identifier is reported only once
  userblacklist.c:290: error: for each function it appears in.)
  make[1]: *** [userblacklist.o] Error 1
  make: *** [modules_k] Error 1


   

Hello
You have to apply both patches , the original one (that introduced the 
new feature) and the bugfix.


Marius

Can you fix that, please?


Thank you.

Regards,

Nicolas




 Original-Nachricht 
   

Datum: Thu, 14 Oct 2010 11:57:19 +0300
Von: marius zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters
 
   

On 10/14/2010 11:36 AM, Nicolas Rüger wrote:
 

Hello Marius,

thanks for the advice. I forgot about the modparam. It seems working now
   

as I don't get the error any more :)
 

BUT blacklisting does not work for mesee:

In kamailio.cfg I added the following in routing logic:

   if (is_method(INVITE)) {

 if (!check_user_blacklist($rU, $rd,$fU)){
 sl_send_reply(403, Forbidden);
 exit;
 }

   }

Im my case $rU is user04 , $rd is mykamailio.de and $fU is user03.

...means use...@mykamailio.de is calling use...@mykamailio.de

Table userblacklist looks like this:


   

Hello

You are right, I have never tested with $fU given so I was a bug in the
code. It should be fixed by commit
d128ac966beeb2ddfd3332a20fdd93ae292d81b1. The bug affected alphanum
match mode only if the $fU had trailing non-digit chars.
Can you check if it works...

Thank you.

Marius
 

   id  | username |domain | prefix | whitelist
   
   15  | user04   | mykamailio.de | user03 |0


In this scenario user03 should be blacklisted by user04, right!? But
   

it's not...
 

Any ideas why???


Thank you.

Regards,

Nicolas








 Original-Nachricht 

   

Datum: Thu, 14 Oct 2010 11:12:33 +0300
Von: marius zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters

 


   

On 10/13/2010 09:57 PM, Nicolas Rüger wrote:

 

Hey Marius,

thnaks again. I now did the following:

git clone git://git.sip-router.org/sip-router kamailio
cd kamailio
git checkout -b 3.1 origin/3.1

git cherry-pick 2f8f8e58

make FLAVOUR=kamailio  include_modules=db_mysql perl cfg
make all
make install

Picking the cherry worked without the -depth 1. :)


BUT I still get an error when using userblacklistmodule:


ERROR:core[dtrie.c:132]: cannot insert non-numerical character
ERROR: userblacklist [db.c:91]: could not insert values into trie.




   

Hello,

Are you sure that you rebuilt userblacklist module after the patch (you
can go to modules_k/userblacklist and run make from there)? Did the
patch applied without error? Also, have you explicitly enabled the
 

alpha
 

numerical match mode

modparam(userblacklist, match_mode, 128)

in you cfg file?

Cheers
Marius


 

The username I use in userblacklist-table is user04 and the prefix
   

is
 


   

user03. Domain column is empty.

 

Any ideas why it's not working???


Thank you!!

Regards,

Nicolas






 Original-Nachricht 


   

Datum: Wed, 13 Oct 2010 19:16:21 +0200
Von: Marius Zbihleimarius.zbih...@1and1.ro
An: Nicolas Rügernicolasrue...@gmx.de
CC: sr-users@lists.sip-router.orgsr-users@lists.sip-router.org
Betreff: Re: [SR-Users] userblacklist error using characters


 


   

Hello,
Sorry for the advice,  -depth 1 means no commit history which is fine

 

:D

 

The patch I was referring is here


 
 

http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=2f8f8e58a922adec440d47592d1ca24dbf05f29c
 


 

You can save it into a file (starting with the line diff --git
a/modules_k/userblacklist/README b/modules_k/userblacklist/README)
 

and
 


 

use the patch

 

utility to patch the module.
Then compile.
Marius


From: Nicolas Rüger [nicolasrue...@gmx.de]
Sent: Wednesday, October 13, 2010 5:46 PM
To: Marius Zbihlei
Cc: sr-users@lists.sip-router.org
Subject: Re: [SR-Users] userblacklist error using characters

Hey Marius,

thanks for the detailed answer but after

 git cherry-pick 2f8f8e58

I get the error:

 fatal: Cannot find '2f8f8e58'

Any ideas???

Thank you.

Regards,

Nicolas

Re: [SR-Users] kamailio error in parse message

2010-10-12 Thread marius zbihlei

On 10/12/2010 11:56 AM, hala alramli wrote:
Oct 12 09:15:50 localhost 
/usr/local/kamailio-1.4-pp/sbin/kamailio[3178]: 
ERROR:core:parse_method: invalid character ø
Oct 12 09:15:50 localhost 
/usr/local/kamailio-1.4-pp/sbin/kamailio[3178]: 
INFO:core:parse_first_line: failed to parse the method
Oct 12 09:15:50 localhost 
/usr/local/kamailio-1.4-pp/sbin/kamailio[3178]: 
INFO:core:parse_first_line: bad message
Oct 12 09:15:50 localhost 
/usr/local/kamailio-1.4-pp/sbin/kamailio[3178]: ERROR:core:parse_msg: 
message=ø^S1^\^B }^S ¡6 } \216^F^A^O\206^D¡½
Oct 12 09:15:50 localhost 
/usr/local/kamailio-1.4-pp/sbin/kamailio[3178]: 
ERROR:core:receive_msg: parse_msg failed


this error keeping appear in my log file ,what is the reason of that ? 
or what is cussing that?

how can i  fix that ?
thanks for any help



Hello

It seems that somewhone is sending you bogus data on your port (UDP). 
Kamailio tries to parse the first line of the message, which is the 
request line of the type  METHOD RURI SIP/2.0, but it can't understand 
the data it receives. It the data is sent from one (broken) host, you 
might want to block this at a firewall level.


Perform a tcpdump on port 5060 (or the port k is using) and check if 
this applies.


Marius.
___
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] userblacklist error using characters

2010-10-11 Thread marius zbihlei

On 10/11/2010 12:31 PM, Henning Westerholt wrote:

On Monday 11 October 2010, marius zbihlei wrote:
   

HOW can I configure userblacklist module to accept the matching of
characters as well???
   

It seems that userblacklist module doesn't support non-numberic values.
(The only way to match via  dtrie is 10, which is numerical only).
[..]
 

Hello Nicolas,

one reason that the userblacklist module don't support this matching type was
a lack of interest so far. I haven't looked to the code for some time, but it
should be not that difficult to implement, as the used dtrie implementation
supports it, as you already found out.

Cheers,

Henning

   

Hello

I will add a patch later today(to master branch). Still some tests and 
documentation to write.


Marius

___
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] userblacklist error using characters

2010-10-11 Thread marius zbihlei

On 10/11/2010 12:32 PM, marius zbihlei wrote:

On 10/11/2010 12:31 PM, Henning Westerholt wrote:
   

On Monday 11 October 2010, marius zbihlei wrote:

 

HOW can I configure userblacklist module to accept the matching of
characters as well???

 

It seems that userblacklist module doesn't support non-numberic values.
(The only way to match via  dtrie is 10, which is numerical only).
[..]

   

Hello Nicolas,

one reason that the userblacklist module don't support this matching type was
a lack of interest so far. I haven't looked to the code for some time, but it
should be not that difficult to implement, as the used dtrie implementation
supports it, as you already found out.

Cheers,

Henning


 

Hello

I will add a patch later today(to master branch). Still some tests and
documentation to write.

   


Hello

I have implemented and tested the functionality in commit 
2f8f8e58a922adec440d47592d1ca24dbf05f29c, applied to master branch(So 
you need to compile sip-router from git as I haven't yet ported the 
commit to any kamailio releases).


Marius


Marius

___
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

2010-09-22 Thread marius zbihlei

On 09/22/2010 06:21 PM, marius zbihlei wrote:

On 09/22/2010 06:08 PM, Klaus Darilion wrote:
   

Am 22.09.2010 15:31, schrieb Santiago Soares:

 

Thank's for the answers.
Based on your explanation, I think that the problem is an external library.
The kamailio process is taking all the system memory.
When the system runs out of memory, it kills kamailio.
But how can I find out what is the library?

   

This means that either the library is buggy, or the library is used
wrongly (e.g. not releasing buffers ...). Let's take a look at your modules:

loadmodule maxfwd.so
loadmodule exec.so
loadmodule tm.so
loadmodule sl.so
loadmodule dispatcher.so
loadmodule textops.so
loadmodule xlog.so
loadmodule mi_fifo.so
loadmodule pv.so

I think they do not use any external libraries

loadmodule regex.so

This one uses libpcre. Maybe there is a problem with the regular
expressions?


 
   


Hello again,

There seems to be a  memory leak in w_pcre_match . I have fixed it in 
commit 61f4d7f. Please compile with this patch and test (applied to git 
kamailio_3.0 branch)


Marius

Hello
I have some suggestions

  # excessively long display name
  if (!pcre_match($fn,^.{0,62}$$)) {
  sl_send_reply(403, Forbidden - Display Name Max Size
Exceeded);
  exit;
  };


this will be much better handled by a transformation

if ( $(fn{s.len})  62 ) {...}

Make this change and see if you still have problems with OOM Killer

Marius

   

regards
Klaus

___
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

2010-09-21 Thread Marius Zbihlei
Hello

Can you give us more information on the modules you are loading/ your specific 
config ?

Marius

From: sr-users-boun...@lists.sip-router.org 
[sr-users-boun...@lists.sip-router.org] On Behalf Of Santiago Soares 
[santiagosoa...@gmail.com]
Sent: Monday, September 20, 2010 9:21 PM
To: SR-Users; us...@lists.kamailio.org
Subject: [SR-Users] Memory leak

Hello,

We use Kamailio as a stateless load balancer.
It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak.
The kamailio processes consume all available memory, until Kamailio crashes and 
restart.
This occurs about once a day.
Since it's stateless, and the restart is very fast, it's not a big deal, but 
I'd like to fix it.
The strange thing is that I updated kamailio from 1.5.3 to 3.0.3 and the 
problem still ocurrs.
I followed the instructions on 
http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory in order to 
determine the cause, and stopped the traffic on the proxy. The allocated memory 
were not freed, after 1 hour the amount of free memory is still the same.
Anybody has an ideia about what's happening, or how can I debug it?

Thank you!

Santiago Soares


___
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

2010-09-21 Thread marius zbihlei

On 09/21/2010 09:18 AM, Marius Zbihlei wrote:

Hello

Can you give us more information on the modules you are loading/ your specific 
config ?

Marius
   


Also, is it shared memory or private memory? If you have a dump of the 
memory distribution, can you spot anything out of the ordinary. As a tip 
look for functions in the ending part of the dump that repeat for 
multiple times. The lower offset is usually alloc'ed during module 
initialization so any big leak will happen at higher offsets (I don't 
know if this is the rule but this is what I observed).


Have you tried increasing the memory pool?

Cheers
Marius


From: sr-users-boun...@lists.sip-router.org 
[sr-users-boun...@lists.sip-router.org] On Behalf Of Santiago Soares 
[santiagosoa...@gmail.com]
Sent: Monday, September 20, 2010 9:21 PM
To: SR-Users; us...@lists.kamailio.org
Subject: [SR-Users] Memory leak

Hello,

We use Kamailio as a stateless load balancer.
It runs on a VM, with 512 MB RAM, and it seems to have some kind of memory leak.
The kamailio processes consume all available memory, until Kamailio crashes and 
restart.
This occurs about once a day.
Since it's stateless, and the restart is very fast, it's not a big deal, but 
I'd like to fix it.
The strange thing is that I updated kamailio from 1.5.3 to 3.0.3 and the 
problem still ocurrs.
I followed the instructions on 
http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:memory in order to 
determine the cause, and stopped the traffic on the proxy. The allocated memory 
were not freed, after 1 hour the amount of free memory is still the same.
Anybody has an ideia about what's happening, or how can I debug it?

Thank you!

Santiago Soares


___
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] error when install kamailio with TLS module.

2010-09-03 Thread marius zbihlei

peter_green lion wrote:



 From: henning.westerh...@1und1.de
 To: sr-users@lists.sip-router.org
 Subject: Re: [SR-Users] error when install kamailio with TLS module.
 Date: Fri, 3 Sep 2010 09:47:15 +0200
 CC: betergr...@live.com

 On Friday 03 September 2010, peter_green lion wrote:
  I try to install kamailio with enable TLS module, but it raise error.
  when i enable module TLS and run command make all,make install, 
the error

  is :
 
  #make install
 
  Makefile.defs defs skipped
  make[1]: Entering directory `/usr/src/kamailio-3.0.1/modules/tls'
  MAIN_NAME=kamailio ./sip-router_cert.sh -d /usr/local/etc/kamailio/
  hostname: Unknown host
  ./sip-router_cert.sh: line 142: which: command not found
  Could not find openssl command
  Set OPENSSL environment variable properly (see -h for more info)
  [..]
  please help me find and fix this problem,

 Hi Peter,

 you don't have openssl installed on the machine, or its not in the 
default
 path. Either install it, or set the OPENSSL variable to the proper 
location of

 the binary. Just run this command to get more informations:

 ~/projects/sip-router/modules/tls$ ./sip-router_cert.sh -h
 NAME
 sip-router_cert.sh - Generate a self-signed TLS/SSL certificate for 
use with

 sip-router.
 ...

 Cheers,

 Henning

hi Henning,
i have run command to check:
yum install openssl
Setting up Install Process
Parsing package install arguments
Package openssl - 0.9.8e-12.el5_4.6.i686 is already installed.
Nothing to do



[r...@appliance kamailio-3.0.2]# yum install openssl-dev
Loading fastestmirror plugin
Loading mirror speeds from cached hostfile
 * base: mirror-fpt-telecom.fpt.net
 * updates: mirror-fpt-telecom.fpt.net
 * addons: mirror-fpt-telecom.fpt.net
 * extras: mirror-fpt-telecom.fpt.net
Setting up Install Process
Parsing package install arguments
No package openssl-dev available.

and :

[r...@appliance tls]# ./sip-router_cert.sh -h
NAME
  sip-router_cert.sh - Generate a self-signed TLS/SSL certificate for 
use with sip-router.


SYNOPSIS
  sip-router_cert.sh [options]


i run command again : make install

make[1]: Entering directory `/usr/src/kamailio-3.0.2/modules/tls'
MAIN_NAME=kamailio ./sip-router_cert.sh -d /usr/local/etc/kamailio/
./sip-router_cert.sh: line 142: which: command not found


Hello

It seems you don't have the which command. Please check the $PATH 
environment variable includes the common directories (/usr/bin for which 
on my system). Please check that which is installed (yum install which).


After that rerun the script. Openssl looks to be installed .

Cheers
Marius

Could not find openssl command
Set OPENSSL environment variable properly (see -h for more info)
make[1]: *** [install-tls-cert] Error 1
make[1]: Leaving directory `/usr/src/kamailio-3.0.2/modules/tls'
make: *** [install-modules] Error 1

so, please suggest me to fix it.


thanks.
peter green








___
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] [sr-dev] Table version problems

2010-09-02 Thread marius zbihlei

Raúl Alexis Betancor Santana wrote:

Hi ... jus trying Kam 3.0.3 ... I get blocked on this error:

ERROR: core [db.c:408]: invalid version 0 for table 0 found, expected 6 
(check table structure and table version)

ERROR: auth_db [authdb_mod.c:250]: error during table version check.

It should be checking agains subscriber table version ... but I don't know why 
it try to found '0' table ... 


if I do a:

insert into version (table_name,table_version) values('0','6');

It get solved ... but thats only a trick.

  


Hello,

The check is done once (at fixup time) for the www_authorize and 
proxy_authorize calls. The table name is the second parameter given to 
those calls.


Be sure to use www_authorize(explample.com, subscriber);

Cheers
Marius




___
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] [sr-dev] Table version problems

2010-09-02 Thread marius zbihlei

Raúl Alexis Betancor Santana wrote:

On Jueves 02 Septiembre 2010 13:50:24 Raúl Alexis Betancor Santana escribió:
  

On Jueves 02 Septiembre 2010 08:59:17 marius zbihlei escribió:


Raúl Alexis Betancor Santana wrote:
  

Hi ... jus trying Kam 3.0.3 ... I get blocked on this error:

ERROR: core [db.c:408]: invalid version 0 for table 0 found, expected
6 (check table structure and table version)
ERROR: auth_db [authdb_mod.c:250]: error during table version check.

It should be checking agains subscriber table version ... but I don't
know why it try to found '0' table ...

if I do a:

insert into version (table_name,table_version) values('0','6');

It get solved ... but thats only a trick.


Hello,

The check is done once (at fixup time) for the www_authorize and
proxy_authorize calls. The table name is the second parameter given to
those calls.

Be sure to use www_authorize(explample.com, subscriber);
  

I know ...

if(is_method(REGISTER)) {
  # authenticate the REGISTER requests
  if(!www_authorize(,subscriber)) {
 xlog(L_ALERT, REGISTER ($fU)($ru) no autorizado - Return Code
($rc) IP=$si\n);
 www_challenge(,0);
 ^  Upsss ... X

Thanks



This was ok ... but I don't know why it try to check version of table '0' ... 
:-(


Best regards
  

Hello,
Please grep for any usage of www_authorize and proxy_authorize in the 
kamailio.cfg configuration file. You still might have something lurking 
there..

Marius

___
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


  1   2   >