Re: [SR-Users] TLS Certificate Verification Issue

2012-10-29 Thread Klaus Darilion
See also: 
http://www.kamailio.org/dokuwiki/doku.php/troubleshooting:corefiles



On 26.10.2012 11:39, Kamal Palei wrote:

Dear Klaus
I am little bit new to linux debugging. Please let me know below stuff.

1. Whats the extension of core file.
The core file does not have an extension, it is usally just called 
"core." with XXX is the process id of the crashed Kamailio process. 
It will reside in the current working directory.



2. Will the core files be generated in /home/user path or some other
default path


In the /etc/init.d/kamailio startup file you can configure the core 
pattern to be set before Kamailio is started. Then the core files will 
use the defined naming.


On Debian also activate core dumps by editing /etc/default/kamailio


3. Do I need to recompile Kamailio source with -g option , or by default
it is compiled with -g option


From your log file:
 0(9548) ALERT:  [main.c:745]: core was generated

You see, your binaries already generate core files. Thus, there is no 
need to rebuild Kamailio.



4. I hope we need to run "ulimit" before we start the program or it is
not required.


Usually you run "ulimit -c unlimited" before starting the Kamailio 
process to be sure that the core will not be truncated.



My observation is if I run directly kamailio it is crashing, if I run
with gdb it is not crashing, not sure why this happens.


Strange. But once you have a core file, you can analyze it and generate 
the backtrace.


Also make sure to not mix openssl libraries - this is often a a problem.

regards
Klaus



Best Regards
kamal



On Thu, Oct 25, 2012 at 8:01 PM, Klaus Darilion
mailto:klaus.mailingli...@pernau.at>> wrote:

SIGABRT  6   CoreAbort signal from abort(3)

This means that there was an error condition detected in the
Kamailio code and the abort(3) function was called. As you see in
the logs a core file was generated. Find the core file and load it
into gdb and execute "backtrace". It will show you were the problem
happened and post it here.

regards
Klaus


On 25.10.2012 16:23, Kamal Palei wrote:

Dear Klaus
The certificate verification I have disabled.

Facing a new problem.
When there is a connection reset, that time Kamailio is crashing.
During crash, I get below logs. Any idea why it is crashing and
how can
I avoid it.

/oot@B2BUA:/usr/local/src/__scripts#  9(9557) : 

[mem/q_malloc.c:431]: BUG: qm_free: bad pointer (nil) (out of memory
block!) - aborting
   0(9548) ALERT:  [main.c:742]: child process 9557 exited
by a
signal 6
   0(9548) ALERT:  [main.c:745]: core was generated
   0(9548) INFO:  [main.c:757]: INFO: terminating due to
SIGCHLD
   6(9554) INFO:  [main.c:808]: INFO: signal 15 received
   8(9556) INFO:  [main.c:808]: INFO: signal 15 received
   4(9552) INFO:  [main.c:808]: INFO: signal 15 received
   5(9553) INFO:  [main.c:808]: INFO: signal 15 received
   3(9551) INFO:  [main.c:808]: INFO: signal 15 received
   7(9555) INFO:  [main.c:808]: INFO: signal 15 received
   1(9549) INFO:  [main.c:808]: INFO: signal 15 received
   2(9550) INFO:  [main.c:808]: INFO: signal 15 received
   0(9548) :  [mem/q_malloc.c:431]: BUG: qm_free: bad
pointer (nil)
(out of memory block!) - aborting


THANKS
kamal
/
On Thu, Oct 25, 2012 at 7:43 PM, Klaus Darilion
mailto:klaus.mailingli...@pernau.at>
>> wrote:

 Hi Kamal!

 Are you familiar with SSL/TLS and certificates? With TLS
the trust
 between TLS server and TLS client is usually via a trusted
 certification authority (CA). For example, if the
intermediate proxy
 uses a certificate which is issued by CA FOOBAR-XYZ, the
you have to
 configure Kamailio to accept certificates singed by
FOOBAR-XYZ. This
 is done by copying the public root certificate of
FOOBAR-XYZ to the
 Kamailio server and configure Kamailio to use the FOOBAR-XYZ
 certificate as trusted CA. Of course then you automatically
also
 trust all others certificates issued by FOOBAR-XYZ.

 To configure the trusted CAs use:
http://kamailio.org/docs/modules/3.3.x/modules/tls.html#ca_list



>

 You could also disable the certificate validation with:

http://kamailio.org/docs/modules/3.3.x/modules/tls.html#verify_certificate

<

Re: [SR-Users] TLS Certificate Verification Issue

2012-10-29 Thread Kamal Palei
Dear Klaus
Forgot to write you back otherday. I was able to trace the code that was
crashing. It was trying to free a pointer that was null. I just added a
null check. With this change, I am able to keep Kamailio up for longer
duration, did not see the crash.

Thanks Klaus for your support.
kamal



On Mon, Oct 29, 2012 at 3:14 PM, Klaus Darilion <
klaus.mailingli...@pernau.at> wrote:

> See also: http://www.kamailio.org/**dokuwiki/doku.php/**
> troubleshooting:corefiles
>
>
>
> On 26.10.2012 11:39, Kamal Palei wrote:
>
>> Dear Klaus
>>
>> I am little bit new to linux debugging. Please let me know below stuff.
>>
>> 1. Whats the extension of core file.
>>
> The core file does not have an extension, it is usally just called
> "core." with XXX is the process id of the crashed Kamailio process. It
> will reside in the current working directory.
>
>
> 2. Will the core files be generated in /home/user path or some other
>> default path
>>
>
> In the /etc/init.d/kamailio startup file you can configure the core
> pattern to be set before Kamailio is started. Then the core files will use
> the defined naming.
>
> On Debian also activate core dumps by editing /etc/default/kamailio
>
>
> 3. Do I need to recompile Kamailio source with -g option , or by default
>> it is compiled with -g option
>>
>
> From your log file:
>
>  0(9548) ALERT:  [main.c:745]: core was generated
>
> You see, your binaries already generate core files. Thus, there is no need
> to rebuild Kamailio.
>
>
> 4. I hope we need to run "ulimit" before we start the program or it is
>> not required.
>>
>
> Usually you run "ulimit -c unlimited" before starting the Kamailio process
> to be sure that the core will not be truncated.
>
>
> My observation is if I run directly kamailio it is crashing, if I run
>> with gdb it is not crashing, not sure why this happens.
>>
>
> Strange. But once you have a core file, you can analyze it and generate
> the backtrace.
>
> Also make sure to not mix openssl libraries - this is often a a problem.
>
> regards
> Klaus
>
>
>> Best Regards
>> kamal
>>
>>
>>
>> On Thu, Oct 25, 2012 at 8:01 PM, Klaus Darilion
>> > >
>> wrote:
>>
>> SIGABRT  6   CoreAbort signal from abort(3)
>>
>> This means that there was an error condition detected in the
>> Kamailio code and the abort(3) function was called. As you see in
>> the logs a core file was generated. Find the core file and load it
>> into gdb and execute "backtrace". It will show you were the problem
>> happened and post it here.
>>
>> regards
>> Klaus
>>
>>
>> On 25.10.2012 16:23, Kamal Palei wrote:
>>
>> Dear Klaus
>> The certificate verification I have disabled.
>>
>> Facing a new problem.
>> When there is a connection reset, that time Kamailio is crashing.
>> During crash, I get below logs. Any idea why it is crashing and
>> how can
>> I avoid it.
>>
>> /oot@B2BUA:/usr/local/src/__**scripts#  9(9557) : 
>>
>>
>> [mem/q_malloc.c:431]: BUG: qm_free: bad pointer (nil) (out of
>> memory
>> block!) - aborting
>>0(9548) ALERT:  [main.c:742]: child process 9557 exited
>> by a
>> signal 6
>>0(9548) ALERT:  [main.c:745]: core was generated
>>0(9548) INFO:  [main.c:757]: INFO: terminating due to
>> SIGCHLD
>>6(9554) INFO:  [main.c:808]: INFO: signal 15 received
>>8(9556) INFO:  [main.c:808]: INFO: signal 15 received
>>4(9552) INFO:  [main.c:808]: INFO: signal 15 received
>>5(9553) INFO:  [main.c:808]: INFO: signal 15 received
>>3(9551) INFO:  [main.c:808]: INFO: signal 15 received
>>7(9555) INFO:  [main.c:808]: INFO: signal 15 received
>>1(9549) INFO:  [main.c:808]: INFO: signal 15 received
>>2(9550) INFO:  [main.c:808]: INFO: signal 15 received
>>0(9548) :  [mem/q_malloc.c:431]: BUG: qm_free: bad
>> pointer (nil)
>> (out of memory block!) - aborting
>>
>>
>> THANKS
>> kamal
>> /
>> On Thu, Oct 25, 2012 at 7:43 PM, Klaus Darilion
>> > > >
>> 
>>
>> 
>> >>
>> wrote:
>>
>>  Hi Kamal!
>>
>>  Are you familiar with SSL/TLS and certificates? With TLS
>> the trust
>>  between TLS server and TLS client is usually via a trusted
>>  certification authority (CA). For example, if the
>> intermediate proxy
>>  uses a certificate which is issued by CA FOOBAR-XYZ, the
>> you have to
>>  configure Kamailio to accept certificates singed by
>> FOOBAR-XYZ. This
>>  

Re: [SR-Users] TLS Certificate Verification Issue

2012-10-29 Thread Klaus Darilion

Hi Kamal!

If the fix in standard Kamailio code or in code you have written 
yourself (a proprietary module)?


If the problem is in the standard code please send us a diff so we can 
fix Kamailio.


regards
Klaus

On 29.10.2012 10:53, Kamal Palei wrote:

Dear Klaus
Forgot to write you back otherday. I was able to trace the code that was
crashing. It was trying to free a pointer that was null. I just added a
null check. With this change, I am able to keep Kamailio up for longer
duration, did not see the crash.
Thanks Klaus for your support.
kamal


On Mon, Oct 29, 2012 at 3:14 PM, Klaus Darilion
mailto:klaus.mailingli...@pernau.at>> wrote:

See also:
http://www.kamailio.org/__dokuwiki/doku.php/__troubleshooting:corefiles




On 26.10.2012 11:39, Kamal Palei wrote:

Dear Klaus

I am little bit new to linux debugging. Please let me know below
stuff.

1. Whats the extension of core file.

The core file does not have an extension, it is usally just called
"core." with XXX is the process id of the crashed Kamailio
process. It will reside in the current working directory.


2. Will the core files be generated in /home/user path or some other
default path


In the /etc/init.d/kamailio startup file you can configure the core
pattern to be set before Kamailio is started. Then the core files
will use the defined naming.

On Debian also activate core dumps by editing /etc/default/kamailio


3. Do I need to recompile Kamailio source with -g option , or by
default
it is compiled with -g option


 From your log file:

  0(9548) ALERT:  [main.c:745]: core was generated

You see, your binaries already generate core files. Thus, there is
no need to rebuild Kamailio.


4. I hope we need to run "ulimit" before we start the program or
it is
not required.


Usually you run "ulimit -c unlimited" before starting the Kamailio
process to be sure that the core will not be truncated.


My observation is if I run directly kamailio it is crashing, if
I run
with gdb it is not crashing, not sure why this happens.


Strange. But once you have a core file, you can analyze it and
generate the backtrace.

Also make sure to not mix openssl libraries - this is often a a problem.

regards
Klaus


Best Regards
kamal



On Thu, Oct 25, 2012 at 8:01 PM, Klaus Darilion
mailto:klaus.mailingli...@pernau.at>
>> wrote:

 SIGABRT  6   CoreAbort signal from abort(3)

 This means that there was an error condition detected in the
 Kamailio code and the abort(3) function was called. As you
see in
 the logs a core file was generated. Find the core file and
load it
 into gdb and execute "backtrace". It will show you were the
problem
 happened and post it here.

 regards
 Klaus


 On 25.10.2012 16:23, Kamal Palei wrote:

 Dear Klaus
 The certificate verification I have disabled.

 Facing a new problem.
 When there is a connection reset, that time Kamailio is
crashing.
 During crash, I get below logs. Any idea why it is
crashing and
 how can
 I avoid it.

 /oot@B2BUA:/usr/local/src/scripts#  9(9557) : 


 [mem/q_malloc.c:431]: BUG: qm_free: bad pointer (nil)
(out of memory
 block!) - aborting
0(9548) ALERT:  [main.c:742]: child process
9557 exited
 by a
 signal 6
0(9548) ALERT:  [main.c:745]: core was generated
0(9548) INFO:  [main.c:757]: INFO: terminating
due to
 SIGCHLD
6(9554) INFO:  [main.c:808]: INFO: signal 15
received
8(9556) INFO:  [main.c:808]: INFO: signal 15
received
4(9552) INFO:  [main.c:808]: INFO: signal 15
received
5(9553) INFO:  [main.c:808]: INFO: signal 15
received
3(9551) INFO:  [main.c:808]: INFO: signal 15
received
7(9555) INFO:  [main.c:808]: INFO: signal 15
received
1(9549) INFO:  [main.c:808]: INFO: signal 15
received
2(9550) INFO:  [main.c:808]: INFO: signal 15
received
0(9548) :  [mem/q_malloc.c:431]: BUG: qm_free: bad
 pointer (nil)
 (out of memory block!) - aborting


 THANKS
   

[SR-Users] rtpproxy ipv4/ipv6 bridging question

2012-10-29 Thread Juha Heinanen
is it possible to make rtpproxy to include both ipv4 and ipv6 address in
sdp?

if not, i don't see how ipv4/ipv6 bridging can be made to work when $rd
is domain name.

-- juha

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


Re: [SR-Users] TLS Certificate Verification Issue

2012-10-29 Thread Kamal Palei
Dear Klaus
In tls_init.c file there is a function

static void ser_free(void *ptr)
{
shm_free(ptr);
}


I modified it to

static void ser_free(void *ptr)
{
if(ptr)
shm_free(ptr);
}


Just added a null check.

During tls connection close it was close it was crashing.
Incase you need to complete stack trace, please let me know, will revert
back code chage, reproduce the issue and can get the backtrace.

Best Regards
kamal





On Mon, Oct 29, 2012 at 3:26 PM, Klaus Darilion <
klaus.mailingli...@pernau.at> wrote:

> Hi Kamal!
>
> If the fix in standard Kamailio code or in code you have written yourself
> (a proprietary module)?
>
> If the problem is in the standard code please send us a diff so we can fix
> Kamailio.
>
> regards
> Klaus
>
>
> On 29.10.2012 10:53, Kamal Palei wrote:
>
>> Dear Klaus
>> Forgot to write you back otherday. I was able to trace the code that was
>> crashing. It was trying to free a pointer that was null. I just added a
>> null check. With this change, I am able to keep Kamailio up for longer
>> duration, did not see the crash.
>> Thanks Klaus for your support.
>> kamal
>>
>>
>> On Mon, Oct 29, 2012 at 3:14 PM, Klaus Darilion
>> > >
>> wrote:
>>
>> See also:
>> http://www.kamailio.org/__**dokuwiki/doku.php/__**
>> troubleshooting:corefiles
>>
>> > troubleshooting:corefiles
>> >
>>
>>
>>
>> On 26.10.2012 11:39, Kamal Palei wrote:
>>
>> Dear Klaus
>>
>> I am little bit new to linux debugging. Please let me know below
>> stuff.
>>
>> 1. Whats the extension of core file.
>>
>> The core file does not have an extension, it is usally just called
>> "core." with XXX is the process id of the crashed Kamailio
>> process. It will reside in the current working directory.
>>
>>
>> 2. Will the core files be generated in /home/user path or some
>> other
>> default path
>>
>>
>> In the /etc/init.d/kamailio startup file you can configure the core
>> pattern to be set before Kamailio is started. Then the core files
>> will use the defined naming.
>>
>> On Debian also activate core dumps by editing /etc/default/kamailio
>>
>>
>> 3. Do I need to recompile Kamailio source with -g option , or by
>> default
>> it is compiled with -g option
>>
>>
>>  From your log file:
>>
>>   0(9548) ALERT:  [main.c:745]: core was generated
>>
>> You see, your binaries already generate core files. Thus, there is
>> no need to rebuild Kamailio.
>>
>>
>> 4. I hope we need to run "ulimit" before we start the program or
>> it is
>> not required.
>>
>>
>> Usually you run "ulimit -c unlimited" before starting the Kamailio
>> process to be sure that the core will not be truncated.
>>
>>
>> My observation is if I run directly kamailio it is crashing, if
>> I run
>> with gdb it is not crashing, not sure why this happens.
>>
>>
>> Strange. But once you have a core file, you can analyze it and
>> generate the backtrace.
>>
>> Also make sure to not mix openssl libraries - this is often a a
>> problem.
>>
>> regards
>> Klaus
>>
>>
>> Best Regards
>> kamal
>>
>>
>>
>> On Thu, Oct 25, 2012 at 8:01 PM, Klaus Darilion
>> > > >
>> 
>> 
>> >>
>> wrote:
>>
>>  SIGABRT  6   CoreAbort signal from abort(3)
>>
>>  This means that there was an error condition detected in the
>>  Kamailio code and the abort(3) function was called. As you
>> see in
>>  the logs a core file was generated. Find the core file and
>> load it
>>  into gdb and execute "backtrace". It will show you were the
>> problem
>>  happened and post it here.
>>
>>  regards
>>  Klaus
>>
>>
>>  On 25.10.2012 16:23, Kamal Palei wrote:
>>
>>  Dear Klaus
>>  The certificate verification I have disabled.
>>
>>  Facing a new problem.
>>  When there is a connection reset, that time Kamailio is
>> crashing.
>>  During crash, I get below logs. Any idea why it is
>> crashing and
>>  how can
>>  I avoid it.
>>
>>  /oot@B2BUA:/usr/local/src/**scripts#  9(9557) :
>> 
>>
>>
>>
>>  [mem/q_malloc.c:431]: BUG: qm_free: bad pointer (nil)
>> (out of memory
>>  block!) - aborting
>> 0(

Re: [SR-Users] db_sqlite bugs

2012-10-29 Thread Vitaliy Aleksandrov

Hello,

Have you found the way to run SELECT COUNT(*) ?
I use kamailio 3.2.4 with sqlite 3.7.5-1 and it crashes on such queries too.

As a workaround I use $dbr(res=>rows) with "SELECT some_field FROM 
table" query, but the bug is really exists.



Hello Timo,

We've done a basic test and it seems to solve the memory leak problem. 
We'll do exhaustive tests in a few days.


We'll keep you informed.

Thanks a lot,
Pedro




De: Timo Teras 
Para: "SIP Router - Kamailio \(OpenSER\) and SIP Express Router 
\(SER\) - Users Mailing List" 

cc: pvsol...@amper.es
Fecha: 15/10/2012 16:13
Asunto: Re: [SR-Users] db_sqlite bugs
Enviado por: Timo Teräs 




On Thu, 11 Oct 2012 12:37:23 +0200 Pedro Antonio Vico Solano
 wrote:

> Hello everyone,
>
> We are developing a solution based on the SQLite module for Kamailio
> and we've found some bugs/errors regarding it. We use kamailio 3.2.4
> and SQLite 3.7.14.1. The errors are about this:
>
> - Memory leaks on querys via sqlops. Kamailio main process leaks 4kB
> each 3 queries (aprox.) and that memory is never freed. [Attached
> basic example]
> - Segmentation fault when doing a SELECT COUNT(*) via sqlops.
> [Attached basic example 2]
>
> Can you help us?

Does this help for the memory leak?

diff --git a/modules_k/db_sqlite/dbase.c b/modules_k/db_sqlite/dbase.c
index 0b32e07..c1d3b71 100644
--- a/modules_k/db_sqlite/dbase.c
+++ b/modules_k/db_sqlite/dbase.c
@@ -543,7 +543,12 @@ int db_sqlite_update(const db1_con_t* _h, const 
db_key_t* _k, const db_op_t* _o,


int db_sqlite_raw_query(const db1_con_t* _h, const str* _s, 
db1_res_t** _r)

{
-   return db_do_raw_query(_h, _s, _r,
+   int rc;
+
+   rc = db_do_raw_query(_h, _s, _r,
  db_sqlite_submit_query,
  db_sqlite_store_result);
+   db_sqlite_cleanup_query(_h);
+
+   return rc;
}

Seems that all other database driver postpone the resource release to
free_results - but there's no reason why we couldn't do this right away
in sqlite. Since in sqlite free_results we just free cached result set.

Will take a look at the other bug later when I get the time to
reproduce it.

-Timo


ADVERTENCIA

Este mensaje y/o sus anexos, pueden contener información personal y 
confidencial cuyo uso, reproducción o distribución no autorizados 
están legalmente prohibidos. Por lo tanto, si Vd. no fuera su 
destinatario y, erróneamente, lo hubiera recibido, le rogamos que 
informe al remitente y lo borre de inmediato.


En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de 
Carácter Personal le informamos de que su dirección de correo 
electrónico, así como sus datos personales y de empresa pasarán a 
formar parte de nuestro fichero de Gestión, y serán tratados con la 
única finalidad de mantenimiento de la relación adquirida con usted. 
Los datos personales que existen en nuestro poder están protegidos por 
nuestra Política de Seguridad, y no serán compartidos con ninguna otra 
empresa. Usted puede ejercitar los derechos de acceso, rectificación, 
cancelación y oposición dirigiéndose por escrito a la dirección arriba 
indicada.


This e-mail and its attachments may include confidential personal 
information which may be protected by any legal rules and cannot be 
used, copied, distributed or disclosed to any person without 
authorisation. If you are not the intended recipient and have received 
this e-mail by mistake, please advise the sender and erase it.


In compliance with the Spanish Organic Act 15/1999 on Personal Data 
Protection, we hereby inform you that your email address, as well as 
your personal and business information, will be included in our 
Management files and used solely for purposes corresponding to our 
commercial relationship. All personal data in our possession is 
protected by our Data Safety Policy and thus shall not be released to 
any other third party whatsoever. You may exercise your right to 
access, rectify, cancel and contest by writing to the address provided 
above.



___
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


[SR-Users] siptrace vs. sipcapture

2012-10-29 Thread Mino Haluz
Hi,

we are thinking about switching from siptrace to sipcapture + HEP
encapsulation. Do you know some reasons why we should switch to
sipcapture or why we should not ? ;) We have multiple SIP proxies and
Cisco gateways. In earlier versions of kamailio was siptrace blocking,
that's why we started to looking for some other capturing mechanism. I
think now siptrace is buffered, so we are hesitating ..

Mino

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


Re: [SR-Users] db_sqlite bugs

2012-10-29 Thread Timo Teras
Hi,

On Mon, 29 Oct 2012 13:01:57 +0200 Vitaliy Aleksandrov
 wrote:

> Have you found the way to run SELECT COUNT(*) ?
> I use kamailio 3.2.4 with sqlite 3.7.5-1 and it crashes on such
> queries too.
> 
> As a workaround I use $dbr(res=>rows) with "SELECT some_field FROM 
> table" query, but the bug is really exists.

I think I know why the crash happens. And it's easy to "workaround".
However, I'm not sure what would be the proper fix for this. It seems
that sqlite does not support reporting the column type for computed
fields.

This implies that the db_sqlite driver cannot deduce the proper return
value type either (I will likely just hard code it to INT now).
However, this means that other kind of expressions - e.g. string
manipulations - will not work then.

I guess we should first try decltype if available and fall back to
first row column type. However, this will fail too if the first row has
NULL value for the column.

The fundamental problem is that Kamailio DB API expects the driver to
return stored type - which on sqlite is not fixed.

Will try to get something sketched up soonish.

-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


[SR-Users] dns resolver issue (RFC3263)

2012-10-29 Thread MÉSZÁROS Mihály

Hi All,

I am experiencing an issue when i try to contact x...@cisco.com.
I found that kamailio/sip-router can't resolve by default resolving way 
a TCP + SRV records from domain cisco.com.


e.g. cisco.com

   misi@alma:~$ host -t NAPTR cisco.com
   cisco.com has no NAPTR record
   misi@alma:~$ host -t SRV _sip._udp.cisco.com
   Host _sip._udp.cisco.com not found: 3(NXDOMAIN)
   misi@alma:~$ host -t SRV _sip._tcp.cisco.com
   _sip._tcp.cisco.com has SRV record 1 0 5060 vcsgw.cisco.com.
   misi@alma:~$ host -t SRV _sips._tcp.cisco.com
   _sips._tcp.cisco.com has SRV record 1 0 5061 vcsgw.cisco.com.


I can't call x...@cisco.com because it does not exists an NAPTR record in 
domain cisco.com,

and furthermore no SRV with udp.

But it exists sip+tcp record
and also exists an secure sip SRV, so sips+tcp record!

I read rfc3263
I find kamailio dns resolver is not working as it should according RFC3263.

http://tools.ietf.org/html/rfc3263

   _If no NAPTR records are found, the client constructs SRV queries
   for those transport protocols it supports, and does a query for each._


So kamailio should query all (udp, tcp, tls, sctp whatever) protocols.

Can anyone help/guide me to create a fix to this issue?
My plan is to create a patch to kamailio resolver, to correct and behave 
according RFC3263.


Any help or guidance appreciated!

Thanks,
Misi




___
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] siptrace vs. sipcapture

2012-10-29 Thread Alexandr Dubovikov
Hello Mino,

if you would like to have advanced search possibility, long time archiving,
pcap export, X-Rtp stats etc, you can use sipcapture module and Homer UI,
but if you just have a couple of SIP messages, siptrace will be absolute
enough :-) 

Wbr,
Alexandr


-Original Message-
From: sr-users-boun...@lists.sip-router.org
[mailto:sr-users-boun...@lists.sip-router.org] On Behalf Of Mino Haluz
Sent: Monday, October 29, 2012 2:48 PM
To: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users
Mailing List
Subject: [SR-Users] siptrace vs. sipcapture

Hi,

we are thinking about switching from siptrace to sipcapture + HEP
encapsulation. Do you know some reasons why we should switch to sipcapture
or why we should not ? ;) We have multiple SIP proxies and Cisco gateways.
In earlier versions of kamailio was siptrace blocking, that's why we started
to looking for some other capturing mechanism. I think now siptrace is
buffered, so we are hesitating ..

Mino

___
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] db_sqlite bugs

2012-10-29 Thread Timo Teras
On Mon, 29 Oct 2012 16:07:56 +0200 Timo Teras  wrote:

> I guess we should first try decltype if available and fall back to
> first row column type. However, this will fail too if the first row
> has NULL value for the column.
> 
> The fundamental problem is that Kamailio DB API expects the driver to
> return stored type - which on sqlite is not fixed.
> 
> Will try to get something sketched up soonish.

Can you try the attached patch if it fixes it? I compile tested it
only, but I believe this is the proper thing to do.

Thanks,
 Timo
diff --git a/modules_k/db_sqlite/dbase.c b/modules_k/db_sqlite/dbase.c
index c1d3b71..c4df4ce 100644
--- a/modules_k/db_sqlite/dbase.c
+++ b/modules_k/db_sqlite/dbase.c
@@ -288,6 +288,24 @@ static int decltype_to_dbtype(const char *decltype)
 	return DB1_INT;
 }
 
+static int type_to_dbtype(int type)
+{
+	switch (type) {
+	case SQLITE_INTEGER:
+		return DB1_INT;
+	case SQLITE_FLOAT:
+		return DB1_DOUBLE;
+	case SQLITE_TEXT:
+		return DB1_STR;
+	case SQLITE_BLOB:
+		return DB1_BLOB;
+	default:
+		/* Unknown, or NULL column value. Assume this is a
+		 * string. */
+		return DB1_STR;
+	}
+}
+
 static str* str_dup(const char *_s)
 {
 	str *s;
@@ -348,10 +366,18 @@ int db_sqlite_store_result(const db1_con_t* _h, db1_res_t** _r)
 			RES_COL_N(res) = rc;
 
 			for (i = 0; i < RES_COL_N(res); i++) {
+const char *decltype;
+int dbtype;
+
 RES_NAMES(res)[i] = str_dup(sqlite3_column_name(conn->stmt, i));
 if (RES_NAMES(res)[i] == NULL)
 	goto no_mem;
-RES_TYPES(res)[i] = decltype_to_dbtype(sqlite3_column_decltype(conn->stmt, i));
+decltype = sqlite3_column_decltype(conn->stmt, i);
+if (decltype != NULL)
+	dbtype = decltype_to_dbtype(decltype);
+else
+	dbtype = type_to_dbtype(sqlite3_column_type(conn->stmt, i));
+RES_TYPES(res)[i] = dbtype;
 			}
 		}
 		if (num_rows >= num_alloc) {
___
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] Unknown status in presence_dialog

2012-10-29 Thread David

Hello,

I am using the presence_dialoginfo module on a stand alone presence 
server. I have this :


if(is_method("PUBLISH"))
{
 handle_publish();
 t_release();
} else if( is_method("SUBSCRIBE"))
{
 handle_subscribe();
 t_release();
};


If the server does not have any status information, it will send out a 
blank notify with a 0 content length. Is there anyway to tell Kamailio 
to send an xml doc with status "terminated" if the server does not know 
the status that was requested by the SUBSCRIBE?


Thanks,

David


Server :

version: kamailio 3.2.3 (x86_64/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, 
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 
DBG_QM_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, 
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 14:19:23 Apr 19 2012 with gcc 4.4.3


___
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] Problem with my kamailio installation

2012-10-29 Thread Ramazan Yilmaz
Hi,
 I installed kamailio 3.2.x a few times before and they were really fine. I
decided to install a fresh one and followed the instructions on
http://www.kamailio.org/wiki/install/3.3.x/git. However there is a problem:
clients cannot register to kamailio. Each registration attempt produces the
following error in the syslog:

Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: :
 [tcp_main.c:3578]: BUG: handle_ser_child: fd -1 for 0 (pid 32414)
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: :
 [pass_fd.c:103]: ERROR: recv_all: 1st recv on 56 failed: Bad file
descriptor
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: :
 [tcp_main.c:3363]: ERROR: handle_tcp_child: read from tcp child 0
(pid 0, no 0) Bad file descriptor [9]
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: :
 [pass_fd.c:209]: ERROR: send_fd: sendmsg failed sending 17 on 56:
Bad file descriptor (9)
Oct 29 20:07:38 ubuntu /usr/local/kamailio-3.3/sbin/kamailio[32421]: ERROR:
 [tcp_main.c:4006]: ERROR: send2child: send_fd failed for
0x7f510bc41588 (flags 0x4018), fd 17

What could be the problem? Any suggestion?

In case you need, the server is ubuntu server 11.10, and I installed
including mysql and tls modules.
___
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] Entries in PUA List and RLS Watchers List

2012-10-29 Thread Sangeeta Shah
Peter/Hugh,
  After a bit more debugging and playing around with the server, I
have a few more follow up questions:

1. Purpose of rls_handle_notify: I understand the purpose of
rls_handle_subscribe and rls_update_subs. What's the purpose of
rls_handle_notify? If I have kamailio configured as a presence
server+rls server with integrated xcap do I need to add code in the
config file to handle notifies? I had this code and noticed that it
was being called, Wasn't sure if it is necessary to trigger notifies
when the resource list is updated?

2. When I add a contact (8475551004), I see rls_update_subs being
called and a back end subscription being inserted into the watchers
table as follows:

| 21 | sip:8475551004@domain | 8475551001   | domain   | presence
|  2 ||1351545844 |

Does an insertion into this table trigger a notify to the presentity
to request authorization? I see that only when I restart the client
for 8475551004.

When 8475551001 is authorized by 8475551004, I see rls_update_subs
being called for 8475551004 since it updates its resource list, but
the status of the entry in the watchers table never changes from 2
(pending) to active? What should trigger that?

Any help is appreciated.

Thanks,
Sangeeta


On Fri, Oct 26, 2012 at 6:03 PM, Peter Dunkley
 wrote:
>> Peter,
>> I know the weekend is coming up, but I would love seeing this in the RLS
>> README. Could you put that on your to-do list? We can't have TOO MUCH
>> documentation...
>>
>
> It's all a matter of perspective.  If you are writing the documentation
> and there is lots to do it can certainly seem like TOO MUCH :-)
>
> I'll add it to my list though, probably do something next time I am in there.
>
> Peter
>
> --
> Peter Dunkley
> Technical Director
> Crocodile RCS Ltd
>
>
> ___
> 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



-- 
Sangeeta Shah

___
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