[SR-Users] Force socket on reply

2011-10-12 Thread Jijo
Hi All,

Our system has two IP address, one is used for kamailio and 2nd one is used
for data.
The problem is suppose a request came in to kamailio on a TCP connection
with first IP address and connection is torned down before sending the
response. Later when the response is send out  kamialio is using the 2nd IP
to create the connection. The reason is kamailio doesn't have force socket
in in reply, so it uses INADDR_ANY for soruce addres .so kernel uses source
address based on the detaintion IP.

I tired to force the socket using pseudo variable $fs or
force_send_socket(), but neither of them worked from reply_route.

So i modfied the code relay_replay to set the SND_F_FORCE_SOCKET which will
use the address where request is recieved  as source address to make the TCP
connection  The code change is shown below.

Please let me know is there anyother way we could acheive it?


   }else{
buf = build_res_buf_from_sip_res( relayed_msg, &res_len );
/* if we build a message from shmem, we need to remove
   via delete lumps which are now stirred in the shmem-ed
   structure
*/
if (branch!=relay) {
 free_via_clen_lump(&relayed_msg->add_rm);
}
/* update send_flags with possible additions from the
   reply route */
SND_FLAGS_OR(&uas_rb->dst.send_flags, &uas_rb->dst.send_flags,
&relayed_msg->rpl_send_flags);
/* Make the response to use the same IP where it receives
the message */
   * *
* uas_rb->dst.send_flags.f |= SND_F_FORCE_SOCKET; *
  }

Thanks
JIjo
___
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 socket on reply

2011-10-13 Thread Jijo
Hi Daniel..

I'm using version 3.1.0. I looked at the change but its done only for
forward_reply.. How about relay_reply()?

Thanks
Jijo

On Thu, Oct 13, 2011 at 3:41 PM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> I haven't understood exactly what you tried? Was it use of
> force_send_socket(...) in onreply_route and didn't work? If yes, what
> version are you runing, there was a fix for such case some time ago:
>
>
> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9dbf735878acc87bab1a0740476f1d106f89412f
>
> Cheers,
> Daniel
>
>
> On 10/13/11 1:00 AM, Jijo wrote:
>
> Hi All,
>
> Our system has two IP address, one is used for kamailio and 2nd one is used
> for data.
> The problem is suppose a request came in to kamailio on a TCP connection
> with first IP address and connection is torned down before sending the
> response. Later when the response is send out  kamialio is using the 2nd IP
> to create the connection. The reason is kamailio doesn't have force socket
> in in reply, so it uses INADDR_ANY for soruce addres .so kernel uses source
> address based on the detaintion IP.
>
> I tired to force the socket using pseudo variable $fs or
> force_send_socket(), but neither of them worked from reply_route.
>
> So i modfied the code relay_replay to set the SND_F_FORCE_SOCKET which will
> use the address where request is recieved  as source address to make the TCP
> connection  The code change is shown below.
>
> Please let me know is there anyother way we could acheive it?
>
>
>}else{
> buf = build_res_buf_from_sip_res( relayed_msg, &res_len );
> /* if we build a message from shmem, we need to remove
>via delete lumps which are now stirred in the shmem-ed
>structure
> */
> if (branch!=relay) {
>  free_via_clen_lump(&relayed_msg->add_rm);
> }
> /* update send_flags with possible additions from the
>reply route */
> SND_FLAGS_OR(&uas_rb->dst.send_flags, &uas_rb->dst.send_flags,
> &relayed_msg->rpl_send_flags);
> /* Make the response to use the same IP where it receives
> the message */
>* *
> * uas_rb->dst.send_flags.f |= SND_F_FORCE_SOCKET; *
>   }
>
> Thanks
> JIjo
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Dec 5-8, Berlin: 
> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
> http://twitter.com/miconda
>
>
___
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 socket on reply

2011-10-14 Thread Jijo
Hello,

Please find the diff. t_reply_A.c is the orginal and t_reply_B.c is the
modified file.

--- t_reply_A.c 2011-10-14 10:05:45.093352500 -0400
+++ t_reply_B.c 2011-10-16 01:10:53.179916800 -0400
@@ -1726,6 +1726,8 @@
   reply route */
SND_FLAGS_OR(&uas_rb->dst.send_flags,
&uas_rb->dst.send_flags,

&relayed_msg->rpl_send_flags);
+/* Make the response to use the same IP
where it receives the message */
+uas_rb->dst.send_flags.f |=
SND_F_FORCE_SOCKET;
}
}
update_reply_stats( relayed_code );


Thanks
JIjo

On Fri, Oct 14, 2011 at 9:56 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> can you send the patch with 'git diff' or 'diff -u' -- it will be easier to
> apply and analyze it. Once I get it, I will look over the case you reported
> in more details.
>
> Thanks,
> Daniel
>
>
> On 10/13/11 10:23 PM, Jijo wrote:
>
> Hi Daniel..
>
> I'm using version 3.1.0. I looked at the change but its done only for
> forward_reply.. How about relay_reply()?
>
> Thanks
> Jijo
>
> On Thu, Oct 13, 2011 at 3:41 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>  Hello,
>>
>> I haven't understood exactly what you tried? Was it use of
>> force_send_socket(...) in onreply_route and didn't work? If yes, what
>> version are you runing, there was a fix for such case some time ago:
>>
>>
>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9dbf735878acc87bab1a0740476f1d106f89412f
>>
>> Cheers,
>> Daniel
>>
>>
>> On 10/13/11 1:00 AM, Jijo wrote:
>>
>>  Hi All,
>>
>> Our system has two IP address, one is used for kamailio and 2nd one is
>> used for data.
>> The problem is suppose a request came in to kamailio on a TCP connection
>> with first IP address and connection is torned down before sending the
>> response. Later when the response is send out  kamialio is using the 2nd IP
>> to create the connection. The reason is kamailio doesn't have force socket
>> in in reply, so it uses INADDR_ANY for soruce addres .so kernel uses source
>> address based on the detaintion IP.
>>
>> I tired to force the socket using pseudo variable $fs or
>> force_send_socket(), but neither of them worked from reply_route.
>>
>> So i modfied the code relay_replay to set the SND_F_FORCE_SOCKET which
>> will use the address where request is recieved  as source address to make
>> the TCP connection  The code change is shown below.
>>
>> Please let me know is there anyother way we could acheive it?
>>
>>
>>}else{
>> buf = build_res_buf_from_sip_res( relayed_msg, &res_len );
>> /* if we build a message from shmem, we need to remove
>>via delete lumps which are now stirred in the shmem-ed
>>structure
>> */
>> if (branch!=relay) {
>>  free_via_clen_lump(&relayed_msg->add_rm);
>> }
>> /* update send_flags with possible additions from the
>>reply route */
>> SND_FLAGS_OR(&uas_rb->dst.send_flags, &uas_rb->dst.send_flags,
>> &relayed_msg->rpl_send_flags);
>> /* Make the response to use the same IP where it receives
>> the message */
>>* *
>> * uas_rb->dst.send_flags.f |= SND_F_FORCE_SOCKET; *
>>   }
>>
>> Thanks
>> JIjo
>>
>>
>>  ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla -- http://www.asipto.com
>> Kamailio Advanced Training, Dec 5-8, Berlin: 
>> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
>> http://twitter.com/miconda
>>
>>
>
> --
> Daniel-Constantin Mierla -- http://www.asipto.com
> Kamailio Advanced Training, Dec 5-8, Berlin: 
> http://asipto.com/u/kathttp://linkedin.com/in/miconda -- 
> http://twitter.com/miconda
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] kamailio 3.1.0 crash on ssl-dos attack

2011-11-22 Thread Jijo
Hi All,

Kamailio is resetting when we do TLS renegotiation dos attack using the
tool available at  http://www.thc.org/thc-ssl-dos/.

Anybody looked at this issue? How we could resolve it. Any idea?

The core generated for 3 pid's as below

Pid 1:

Core was generated by `/usr/sbin/kamailio -u swrun -g sw -m 120 -f
/etc/kamailio/kamailio.cfg'.
Program terminated with signal 11, Segmentation fault.
#0  atomic_inc_int () at atomic/atomic_x86.h:225
(gdb) bt
#0  atomic_inc_int () at atomic/atomic_x86.h:225
#1  cfg_update_local () at cfg/cfg_struct.h:228
#2  timer_main () at timer.c:994
#3  0x080b0579 in main_loop () at main.c:1632
#4  0x080b1be4 in main (argc=9, argv=0xbfd61e54) at main.c:2446


Pid 2:

Core was generated by `/usr/sbin/kamailio -u swrun -g sw -m 120 -f
/etc/kamailio/kamailio.cfg'.
Program terminated with signal 11, Segmentation fault.
#0  0x0819bfe8 in qm_insert_free (qm=0xaf6c5000, p=0xb05eec30,
file=0xb6fb4140 "tls: tls_init.c", func=0xb6fb4ce0 "ser_free", line=296)
at mem/q_malloc.c:184
184 if (frag->size <= f->size) break;
(gdb) bt
#0  0x0819bfe8 in qm_insert_free (qm=0xaf6c5000, p=0xb05eec30,
file=0xb6fb4140 "tls: tls_init.c", func=0xb6fb4ce0 "ser_free", line=296)
at mem/q_malloc.c:184
#1  qm_free (qm=0xaf6c5000, p=0xb05eec30, file=0xb6fb4140 "tls:
tls_init.c", func=0xb6fb4ce0 "ser_free", line=296) at mem/q_malloc.c:518
#2  0xb6f95404 in ser_free (ptr=0xb05eec30) at tls_init.c:296
#3  0xb732e9ba in CRYPTO_free (str=0xb05eec30) at mem.c:391
#4  0xb7330bee in int_new_ex_data (class_index=5, obj=0xbfd414f4,
ad=0xbfd41574) at ex_data.c:440
#5  0xb7330443 in CRYPTO_new_ex_data (class_index=5, obj=0xbfd414f4,
ad=0xbfd41574) at ex_data.c:575
#6  0xb73dfde3 in X509_STORE_CTX_init (ctx=0xbfd414f4, store=0xafd8b3d0,
x509=0xafe08ff0, chain=0x0) at x509_vfy.c:2114
#7  0xb74b0f31 in ssl3_output_cert_chain (s=0xb0553a10, x=0xafe08ff0) at
s3_both.c:349
#8  0xb74a4728 in ssl3_send_server_certificate (s=0xb0553a10) at
s3_srvr.c:3034
#9  0xb74a5879 in ssl3_accept (s=0xb0553a10) at s3_srvr.c:353
#10 0xb74afa8f in ssl3_read_bytes (s=0xb0553a10, type=23, buf=0xb0ad44ec
"", len=4095, peek=0) at s3_pkt.c:1266
#11 0xb74ac9c9 in ssl3_read_internal (s=0xb0553a10, buf=0xb0ad44ec,
len=4095, peek=0) at s3_lib.c:3265
#12 0xb74c24a9 in SSL_read (s=0xb0553a10, buf=0xb0ad44ec, num=4095) at
ssl_lib.c:954
#13 0xb6fad1c3 in tls_read_f (c=0xb0ad431c, flags=0xbfd619c4) at
tls_server.c:1058
#14 0x08171c0e in tcp_read_headers (c=0xb0ad431c, read_flags=0xbfd619c4) at
tcp_read.c:406
#15 0x08171db8 in tcp_read_req (con=0xb0ad431c, bytes_read=0xbfd619cc,
read_flags=0xbfd619c4) at tcp_read.c:885
#16 0x08172f67 in handle_io (fm=, events=1, idx=) at tcp_read.c:1234
#17 0x0817583b in io_wait_loop_epoll (unix_sock=89) at io_wait.h:1092
#18 tcp_receive_loop (unix_sock=89) at tcp_read.c:1345
#19 0x0816e2e9 in tcp_init_children () at tcp_main.c:4867
#20 0x080affb1 in main_loop () at main.c:1646
#21 0x080b1be4 in main (argc=9, argv=0xbfd61e54) at main.c:2446

Pid 3:

Core was generated by `/usr/sbin/kamailio -u swrun -g sw -m 120 -f
/etc/kamailio/kamailio.cfg'.
Program terminated with signal 11, Segmentation fault.
#0  0xb76c9e7c in memmove () from /lib/libc.so.6
(gdb) bt
#0  0xb76c9e7c in memmove () from /lib/libc.so.6
#1  0x081724e7 in tcp_read_req (con=0xb022c8f0, bytes_read=0xbfd619cc,
read_flags=0xbfd619c4) at tcp_read.c:1026
#2  0x08172f67 in handle_io (fm=, events=1, idx=) at tcp_read.c:1234
#3  0x0817583b in io_wait_loop_epoll (unix_sock=93) at io_wait.h:1092
#4  tcp_receive_loop (unix_sock=93) at tcp_read.c:1345
#5  0x0816e2e9 in tcp_init_children () at tcp_main.c:4867
#6  0x080affb1 in main_loop () at main.c:1646
#7  0x080b1be4 in main (argc=9, argv=0xbfd61e54) at main.c:2446
___
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] TCP keepalive on server and client

2012-02-13 Thread Jijo
Hello,

I have a requirement where the TLS connection initiated by kamailio shall
stay to reuse by the sip server. The sip server is expecting PING on the
TLS connection as as per the RFC 5626.

Is there any plan to implement ping "CRLF CRLF" send by kamailio as per the
RFC 5626.

Thanks
Jijo
On Mon, Feb 13, 2012 at 10:43 AM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

> Hello,
>
> tcp_keepalive is setting SO_KEEPALIVE which means sending keeplive by
> kamailio. You can watch network traffic with ngrep/tcpdump/wireshark...
>
> The tcp parameters are documented on wiki:
>
>  
> http://www.kamailio.org/wiki/**cookbooks/devel/core#tcp_**keepalive<http://www.kamailio.org/wiki/cookbooks/devel/core#tcp_keepalive>
>
> Cheers,
> Daniel
>
>
> On 2/3/12 11:33 AM, Yufei Tao wrote:
>
>> Hi
>>
>> I want to use TCP keepalive to detect dead connections between Kamailio
>> and my SIP clients. I've got some questions about this:
>>
>> 1. If I enable it on Kamailio by setting for example:
>>
>> tcp_crlf_ping = yes
>> tcp_keepalive = yes
>> tcp_keepidle = 60
>> tcp_keepintvl = 10
>> tcp_keepcnt = 3
>>
>>  From what I read by gooling, that means Kamailio only responds to the
>> crlfcrlf sent by the client, but can't be configured to send the
>> crlfcrlf. Is this right?
>>
>> 2. On my client, if I use setsockopt to set the corresponding values:
>>
>>   SO_KEEPALIVE
>>   TCP_KEEPCNT
>>   TCP_KEEPIDLE
>>   TCP_KEEPINTVL
>>
>> would it make the client send crlfcrlf?
>>
>> The reason I'm confused is, with these settings, if Kamailio can only
>> respond to crlfcrlf, but not send, then would the client only respond
>> too, as in 1. and 2., they seem to configure the same set of parameters?
>> Please help me clarify this. Thanks very much!
>>
>> Yufei
>>
>> --
>> Yufei Tao
>> Red Embedded
>>
>> This E-mail and any attachments hereto are strictly confidential and
>> intended solely for the addressee. If you are not the intended addressee
>> please notify the sender by return and delete the message.
>>
>> You must not disclose, forward or copy this E-mail or attachments to any
>> third party without the prior consent of the sender.
>>
>> Red Embedded Design, Company Number 06688253 Registered in England: The
>> Waterfront, Salts Mill Rd, Saltaire, BD17 7EZ
>>
>> __**_
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http://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
>
>
>
> __**_
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/**cgi-bin/mailman/listinfo/sr-**users<http://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] CRLF Error with tcp_crlf_ping

2012-02-28 Thread Jijo
Hi All.

As per the tcp_crlf_ping description, kamailio shall reply CRLF only when
it receives "CRLF CRLF".  But In the 3.1.0 version, if kamailio recieves
"CRLF", it respond back CRLF.  Is this an expected behavior or an error?

Thanks
Jijo
___
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] CRLF Error with tcp_crlf_ping

2012-03-22 Thread Jijo
Hi

Sorry for the late reply,

I observed this issue when testing with broken TLS UA, which was sending
CRLF in two packets instead of double CRLF in a single packet.

It is very easy to recreate using openssl s_client command , where kamailio
as server

 openssl s_client -connect 192.168.2.151:5061  -CAfile serverCA.pem  -crlf


After the connection established by the client, Press enter key two times
from the key board, which will send CRLF in two packet to server and You
would see CRLF replied back by Kamailio

Note:-crlf will send CR as CRLF in a single packet to server.

Thanks
Jijo





On Sat, Mar 10, 2012 at 6:27 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> looking at the code, it seems that CRLF is sent only after CRLFCRLF. Can
> you get a pcap for your case?
>
> Cheers,
> Daniel
>
> On Tue, Feb 28, 2012 at 5:28 PM, Jijo  wrote:
>
>> Hi All.
>>
>> As per the tcp_crlf_ping description, kamailio shall reply CRLF only when
>> it receives "CRLF CRLF".  But In the 3.1.0 version, if kamailio recieves
>> "CRLF", it respond back CRLF.  Is this an expected behavior or an error?
>>
>> Thanks
>> Jijo
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>
>
> --
> Daniel-Constantin Mierla
>   http://www.asipto.com
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] CRLF Error with tcp_crlf_ping

2012-03-23 Thread Jijo
Hello,

Yes it is sending CRLF after the second CRLF from client.

Another thing is, Kamailio would send CRLF even if the second CRLF come
after few seconds.

I believe we don't have any way to drop it ?

Thanks
Jijo


On Fri, Mar 23, 2012 at 5:34 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> is kamailio sending crlf after the second crlf from the client?
>
> There is no notion of a packet in a stream connection, even a sip packet
> can be send char by char and the server has to assemble it by keep reading
> in a local buffer until all is retrieved.
>
> Cheers,
> Daniel
>
>
> On 3/23/12 1:50 AM, Jijo wrote:
>
> Hi
>
>  Sorry for the late reply,
>
>  I observed this issue when testing with broken TLS UA, which was sending
> CRLF in two packets instead of double CRLF in a single packet.
>
>  It is very easy to recreate using openssl s_client command , where
> kamailio as server
>
>   openssl s_client -connect 192.168.2.151:5061  -CAfile serverCA.pem
>  -crlf
>
>
>  After the connection established by the client, Press enter key two
> times from the key board, which will send CRLF in two packet to server and
> You would see CRLF replied back by Kamailio
>
>  Note:-crlf will send CR as CRLF in a single packet to server.
>
>  Thanks
> Jijo
>
>
>
>
>
> On Sat, Mar 10, 2012 at 6:27 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> looking at the code, it seems that CRLF is sent only after CRLFCRLF. Can
>> you get a pcap for your case?
>>
>> Cheers,
>> Daniel
>>
>>  On Tue, Feb 28, 2012 at 5:28 PM, Jijo  wrote:
>>
>>>  Hi All.
>>>
>>>  As per the tcp_crlf_ping description, kamailio shall reply CRLF only
>>> when it receives "CRLF CRLF".  But In the 3.1.0 version, if kamailio
>>> recieves "CRLF", it respond back CRLF.  Is this an expected behavior or an
>>> error?
>>>
>>>  Thanks
>>>  Jijo
>>>
>>>  ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users@lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>
>>
>> --
>> Daniel-Constantin Mierla
>>   http://www.asipto.com
>>
>
>
> --
> Daniel-Constantin Mierla
> Kamailio Advanced Training, April 23-26, 2012, Berlin, 
> Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>
>
___
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] CRLF Error with tcp_crlf_ping

2012-03-27 Thread Jijo
There is no problem as such.

On Sat, Mar 24, 2012 at 5:20 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
>
> On 3/23/12 3:15 PM, Jijo wrote:
>
> Hello,
>
>  Yes it is sending CRLF after the second CRLF from client.
>
>  Another thing is, Kamailio would send CRLF even if the second CRLF come
> after few seconds.
>
>  I believe we don't have any way to drop it ?
>
>
> not really, in a stream protocol, such delays can appear due to
> congestions in some routers -- the apps just have to keep reading until a
> format error, packet is complete or connection is closed. Few seconds could
> be very common in between parts of large sip messages.
>
> Are these sequential CRLFs causing problems?
>
> Cheers,
> Daniel
>
>
>  Thanks
> Jijo
>
>
> On Fri, Mar 23, 2012 at 5:34 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>  Hello,
>>
>> is kamailio sending crlf after the second crlf from the client?
>>
>> There is no notion of a packet in a stream connection, even a sip packet
>> can be send char by char and the server has to assemble it by keep reading
>> in a local buffer until all is retrieved.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 3/23/12 1:50 AM, Jijo wrote:
>>
>> Hi
>>
>>  Sorry for the late reply,
>>
>>  I observed this issue when testing with broken TLS UA, which was
>> sending CRLF in two packets instead of double CRLF in a single packet.
>>
>>  It is very easy to recreate using openssl s_client command , where
>> kamailio as server
>>
>>   openssl s_client -connect 192.168.2.151:5061  -CAfile serverCA.pem
>>  -crlf
>>
>>
>>  After the connection established by the client, Press enter key two
>> times from the key board, which will send CRLF in two packet to server and
>> You would see CRLF replied back by Kamailio
>>
>>  Note:-crlf will send CR as CRLF in a single packet to server.
>>
>>  Thanks
>> Jijo
>>
>>
>>
>>
>>
>> On Sat, Mar 10, 2012 at 6:27 AM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> looking at the code, it seems that CRLF is sent only after CRLFCRLF. Can
>>> you get a pcap for your case?
>>>
>>> Cheers,
>>> Daniel
>>>
>>>  On Tue, Feb 28, 2012 at 5:28 PM, Jijo  wrote:
>>>
>>>>  Hi All.
>>>>
>>>>  As per the tcp_crlf_ping description, kamailio shall reply CRLF only
>>>> when it receives "CRLF CRLF".  But In the 3.1.0 version, if kamailio
>>>> recieves "CRLF", it respond back CRLF.  Is this an expected behavior or an
>>>> error?
>>>>
>>>>  Thanks
>>>>  Jijo
>>>>
>>>>  ___
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>>> sr-users@lists.sip-router.org
>>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>
>>>
>>> --
>>> Daniel-Constantin Mierla
>>>   http://www.asipto.com
>>>
>>
>>
>>   --
>> Daniel-Constantin Mierla
>> Kamailio Advanced Training, April 23-26, 2012, Berlin, 
>> Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>>
>>
>
> --
> Daniel-Constantin Mierla
> Kamailio Advanced Training, April 23-26, 2012, Berlin, 
> Germanyhttp://www.asipto.com/index.php/kamailio-advanced-training/
>
>
___
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 performance testing

2012-05-15 Thread Jijo
Hi,

I'm seeing similar issue in 3.1.0.. How did we fix it?

The back trace from my test is,

#2  0x0819c66c in qm_free (qm=0x7861c000, p=0x798fa2b0, file=0xb6f0b140
"tls: tls_init.c", func=0xb6f0bce0 "ser_free", line=296) at
mem/q_malloc.c:462

*#3  0xb6eec404 in ser_free (ptr=0x798fa2b0) at tls_init.c:296*

*#4  0xb72339ba in CRYPTO_free () from /lib/libcrypto.so.1.0.0*

#5  0xb72a7f64 in ?? () from /lib/libcrypto.so.1.0.0

#6  0xb72a813e in ERR_get_error () from /lib/libcrypto.so.1.0.0

#7  0xb6f0483e in tls_read_f (c=0x797fedb4, flags=0xbfe236d4) at
tls_server.c:1187

#8  0x08171e6e in tcp_read_headers (c=0x797fedb4, read_flags=0xbfe236d4) at
tcp_read.c:406


I appreciate if we could point the reason the for the double free.

Thanks
Jijo

On Wed, Dec 21, 2011 at 3:13 PM, Kristian Kielhofner wrote:

> On Wed, Dec 21, 2011 at 2:56 PM, Daniel-Constantin Mierla
>  wrote:
> >
> > it has to be at least the message printed by:
> >
> >LOG(L_CRIT, "BUG: qm_free: freeing already freed pointer,"
> >" first free: %s: %s(%ld) - aborting\n",
> >f->file, f->func, f->line);
> >
> > Can you grep for it in logs?
> >
> > The abort in frame #1 of bracktrace is triggered on purpose, at
> > mem/q_malloc.c line 458
> >
> > Cheers,
> > Daniel
> >
> > --
> > Daniel-Constantin Mierla -- http://www.asipto.com
> > http://linkedin.com/in/miconda -- http://twitter.com/miconda
> >
>
> Hi Daniel,
>
>  I'm very sorry for missing this the first time around.  There are
> over 3GB of logs on this machine already (it's only been up for one
> day).
>
>  I've attached the output of grep -i bug kamailio.log | gzip -c >
> kamailio-bug.log.gz
>
> Thanks again!
>
> --
> Kristian Kielhofner
>
> ___
> 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] TLS performance testing

2012-05-16 Thread Jijo
Hi Daniel,

Please let me know if you are aware about any fix on this issue.

Thanks
Jijo

On Tue, May 15, 2012 at 6:55 PM, Jijo  wrote:

> Hi,
>
> I'm seeing similar issue in 3.1.0.. How did we fix it?
>
> The back trace from my test is,
>
> #2  0x0819c66c in qm_free (qm=0x7861c000, p=0x798fa2b0, file=0xb6f0b140
> "tls: tls_init.c", func=0xb6f0bce0 "ser_free", line=296) at
> mem/q_malloc.c:462
>
> *#3  0xb6eec404 in ser_free (ptr=0x798fa2b0) at tls_init.c:296*
>
> *#4  0xb72339ba in CRYPTO_free () from /lib/libcrypto.so.1.0.0*
>
> #5  0xb72a7f64 in ?? () from /lib/libcrypto.so.1.0.0
>
> #6  0xb72a813e in ERR_get_error () from /lib/libcrypto.so.1.0.0
>
> #7  0xb6f0483e in tls_read_f (c=0x797fedb4, flags=0xbfe236d4) at
> tls_server.c:1187
>
> #8  0x08171e6e in tcp_read_headers (c=0x797fedb4, read_flags=0xbfe236d4)
> at tcp_read.c:406
>
>
> I appreciate if we could point the reason the for the double free.
>
> Thanks
> Jijo
>
> On Wed, Dec 21, 2011 at 3:13 PM, Kristian Kielhofner wrote:
>
>> On Wed, Dec 21, 2011 at 2:56 PM, Daniel-Constantin Mierla
>>  wrote:
>> >
>> > it has to be at least the message printed by:
>> >
>> >LOG(L_CRIT, "BUG: qm_free: freeing already freed pointer,"
>> >" first free: %s: %s(%ld) - aborting\n",
>> >f->file, f->func, f->line);
>> >
>> > Can you grep for it in logs?
>> >
>> > The abort in frame #1 of bracktrace is triggered on purpose, at
>> > mem/q_malloc.c line 458
>> >
>> > Cheers,
>> > Daniel
>> >
>> > --
>> > Daniel-Constantin Mierla -- http://www.asipto.com
>> > http://linkedin.com/in/miconda -- http://twitter.com/miconda
>> >
>>
>> Hi Daniel,
>>
>>  I'm very sorry for missing this the first time around.  There are
>> over 3GB of logs on this machine already (it's only been up for one
>> day).
>>
>>  I've attached the output of grep -i bug kamailio.log | gzip -c >
>> kamailio-bug.log.gz
>>
>> Thanks again!
>>
>> --
>> Kristian Kielhofner
>>
>> ___
>> 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] kamailio core at qm_status

2012-07-16 Thread Jijo
Hi All,

I'm observing a core intermittently at "qm_status (qm=0x786cd000) at
mem/q_malloc.c:763" for kamailio version 3.1.0

looking at the backtrace this is occurring while doing a tcp buffer
overrun. Please have a look and let me know if anyone observed this issue
or how can we debug it.


Please find the backtrace and kamailio version


osbprod-V2R0:~ # /usr/sbin/kamailio -V
version: kamailio 3.1.0 (i386/linux) 21a375
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, PKG_SIZE 15MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 21a375
compiled on 12:38:44 Apr 26 2012 with gcc 4.5.0



#0  qm_status (qm=0x786cd000) at mem/q_malloc.c:763

#1  0x0819c0f3 in qm_debug_frag (qm=0x786cd000, f=) at
mem/q_malloc.c:167

#2  0x0819c352 in qm_free (qm=0x786cd000, p=0x7a6cb6ac, file=0x821cce2
": tcp_main.c", func=0x822285f "wbufq_run", line=880) at
mem/q_malloc.c:457

#3  0x0815f686 in wbufq_run (tcpconn=0x7a1a7548, ev=4, fd_i=-1) at
tcp_main.c:880

#4  handle_tcpconn_ev (tcpconn=0x7a1a7548, ev=4, fd_i=-1) at tcp_main.c:4141

#5  0x08169bf2 in io_wait_loop_epoll () at io_wait.h:1092

#6  tcp_main_loop () at tcp_main.c:4606

#7  0x080b0404 in main_loop () at main.c:1655

#8  0x080b1f84 in main (argc=9, argv=0xbfb4c9f4) at main.c:2446

(gdb) l

758 LOG_(DEFAULT_FACILITY, memlog, "qm_status: ",

759 "dumping free list stats :\n");

760 for(h=0,i=0;hfree_hash[h].head.u.nxt_free,j=0;

763 f!=&(qm->free_hash[h].head);
f=f->u.nxt_free, i++, j++){

764 if (!FRAG_WAS_USED(f)){

765 unused++;

766 #ifdef DBG_QM_MALLOC

767 LOG_(DEFAULT_FACILITY,
memlog, "qm_status: ",
___
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 core at qm_status

2012-07-16 Thread Jijo
Thanks.. It is not easy to upgrade as it is happening at customer system.
Is there any change occurred for this issue.I looked at it, but didn't see
anything in q_malloc.c/qm_status()


On Mon, Jul 16, 2012 at 11:12 AM, Jon Bonilla  wrote:

> El Mon, 16 Jul 2012 10:27:42 -0400
> Jijo  escribió:
>
> > Hi All,
> >
> > I'm observing a core intermittently at "qm_status (qm=0x786cd000) at
> > mem/q_malloc.c:763" for kamailio version 3.1.0
> >
>
> I'd say that you're using a very old version. You should update your
> branch to
> 3.1.6 or upgrade to a newer branch.
>
>
> ___
> sr-dev mailing list
> sr-...@lists.sip-router.org
> http://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] kamailio core at qm_status

2012-07-17 Thread Jijo
Hi,

This is not happening at shutdown or status check. Its aborting when the
system is active.

Thanks
Jijo
On Tue, Jul 17, 2012 at 3:06 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> does it keep being or it is one time and that's it?
>
> That is printed at shut down or if pkg_status() or shm_status() is
> executed from some part of code or in config via cfgutils module functions.
>
> You can get rid of them by setting memdbg and memlog to a value higher
> than debug global parameter.
>
> Cheers,
> Daniel
>
>
> On 7/16/12 5:28 PM, Jijo wrote:
>
> Thanks.. It is not easy to upgrade as it is happening at customer system.
> Is there any change occurred for this issue.I looked at it, but didn't see
> anything in q_malloc.c/qm_status()
>
>
> On Mon, Jul 16, 2012 at 11:12 AM, Jon Bonilla  wrote:
>
>> El Mon, 16 Jul 2012 10:27:42 -0400
>> Jijo  escribió:
>>
>> > Hi All,
>> >
>> > I'm observing a core intermittently at "qm_status (qm=0x786cd000) at
>> > mem/q_malloc.c:763" for kamailio version 3.1.0
>> >
>>
>>  I'd say that you're using a very old version. You should update your
>> branch to
>> 3.1.6 or upgrade to a newer branch.
>>
>>
>> ___
>> sr-dev mailing list
>> sr-...@lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>>
>
>
>
> ___
> sr-dev mailing 
> listsr-...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda 
> - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - 
> http://asipto.com/u/katu
> Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - 
> http://asipto.com/u/kpw
>
>
___
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 core at qm_status

2012-09-19 Thread Jijo
Hi All,

Finally i found the issue,

Here is one of the bad trace for SUBSCRIBE(722bytes) and NOTIFY(1282bytes)
which corrupted the memory. The messages came in the order NOTIFY and
SUBSCRIBE. The core is generated in a different place but I believe this
could be the reason for memory corruption.

Here is the trace UDP Process 27294 processing NOTIFY and Process
27303 processing
SUBSCRIBE .



The explanation and implementation is below



2012-09-19T02:06:17+01:00 [info] sipserver: [27303] INFO: 

Re: [SR-Users] [sr-dev] kamailio core at qm_status ( patch required important)

2012-09-20 Thread Jijo
Hi Daniel,

This patch needs to be applied to avoid core.

Thanks
Jijo

On Wed, Sep 19, 2012 at 10:54 AM, Jijo  wrote:

>
> Hi All,
>
> Finally i found the issue,
>
> Here is one of the bad trace for SUBSCRIBE(722bytes) and NOTIFY(1282bytes)
> which corrupted the memory. The messages came in the order NOTIFY and
> SUBSCRIBE. The core is generated in a different place but I believe this
> could be the reason for memory corruption.
>
> Here is the trace UDP Process 27294 processing NOTIFY and Process 27303 
> processing
> SUBSCRIBE .
>
>
>
> The explanation and implementation is below
>
>
>
> 2012-09-19T02:06:17+01:00 [info] sipserver: [27303] INFO: 

[SR-Users] SRV record in via header not resolving.

2012-09-26 Thread Jijo
Hello,

I'm observing  that Via Header domain name of type SRV is resolving as DNS
A.

I looked at the code and it does support only A. It is basically setting to
default SIP port   check_via_address which is causing DNS A query.

Is there any specific reason to do so?



I changed the code to support SRV as below and working fine.

static int check_via_address(struct ip_addr* ip, str *name,
unsigned short port, *short proto*, int resolver)
{
:
:
//if (port==0) port=SIP_PORT;
if (resolver&DO_DNS){
DBG("check_via_address: doing dns lookup\n");
/* try all names ips */
he=sip_resolvehost(name, &port, *(char *) &proto*); /* don't use naptr */
if (he && ip->af==he->h_addrtype){
for(i=0;he && he->h_addr_list[i];i++){
if ( memcmp(&he->h_addr_list[i], ip->u.addr, ip->len)==0)
return 0;
}
}
}
:
:
:
}


/* check if IP address in Via != source IP address of signaling */
int received_test( struct sip_msg *msg )
{
int rcvd;

rcvd=msg->via1->received
|| check_via_address(&msg->rcv.src_ip, &msg->via1->host,
msg->via1->port,* msg->via1->proto*, received_dns);
return rcvd;
}



Thanks
Jijo
___
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] SRV record in via header not resolving.

2012-09-28 Thread Jijo
HI Daniel.

Please find the diff based on kamailio version 3.3.1

PGA:/mnt/o/kamailio-3.3.1 # diff -u msg_translator.c.orig msg_translator.c
--- msg_translator.c.orig   2012-09-28 09:41:23.391344100 -0300
+++ msg_translator.c2012-09-28 05:52:36.056491600 -0300
@@ -190,7 +190,7 @@
  *  resolver = DO_DNS | DO_REV_DNS; if 0 no dns check is made
  * return 0 if equal */
 static int check_via_address(struct ip_addr* ip, str *name,
-   unsigned short port, int resolver)
+   unsigned short port, short proto, int
resolver)
 {
struct hostent* he;
int i;
@@ -229,11 +229,11 @@
return -1;
}

-   if (port==0) port=SIP_PORT;
+   //if (port==0) port=SIP_PORT;
if (resolver&DO_DNS){
DBG("check_via_address: doing dns lookup\n");
/* try all names ips */
-   he=sip_resolvehost(name, &port, 0); /* don't use naptr */
+   he=sip_resolvehost(name, &port, (char *)&proto); /* don't
use naptr */
if (he && ip->af==he->h_addrtype){
for(i=0;he && he->h_addr_list[i];i++){
if ( memcmp(&he->h_addr_list[i],
ip->u.addr, ip->len)==0)
@@ -263,7 +263,7 @@

rcvd=msg->via1->received
|| check_via_address(&msg->rcv.src_ip,
&msg->via1->host,
-   msg->via1->port,
received_dns);
+
msg->via1->port,msg->via1->proto, received_dns);
return rcvd;
 }


On Thu, Sep 27, 2012 at 11:22 AM, Daniel-Constantin Mierla <
mico...@gmail.com> wrote:

>  Can you provide the patch taken with 'diff -u' or 'git diff' -- it is
> easier to understand what parts you refer to and were updated.
>
> Cheers,
> Daniel
>
>
> On 9/27/12 12:31 AM, Jijo wrote:
>
> Hello,
>
>  I'm observing  that Via Header domain name of type SRV is resolving as
> DNS A.
>
>  I looked at the code and it does support only A. It is
> basically setting to default SIP port   check_via_address which is causing
> DNS A query.
>
>  Is there any specific reason to do so?
>
>
>
>  I changed the code to support SRV as below and working fine.
>
>  static int check_via_address(struct ip_addr* ip, str *name,
>  unsigned short port, *short proto*, int resolver)
> {
>  :
> :
>  //if (port==0) port=SIP_PORT;
>  if (resolver&DO_DNS){
>  DBG("check_via_address: doing dns lookup\n");
>  /* try all names ips */
>  he=sip_resolvehost(name, &port, *(char *) &proto*); /* don't use naptr */
>  if (he && ip->af==he->h_addrtype){
>  for(i=0;he && he->h_addr_list[i];i++){
>  if ( memcmp(&he->h_addr_list[i], ip->u.addr, ip->len)==0)
>  return 0;
>  }
>  }
>  }
>  :
> :
> :
> }
>
>
>  /* check if IP address in Via != source IP address of signaling */
> int received_test( struct sip_msg *msg )
> {
>  int rcvd;
>
>  rcvd=msg->via1->received
>  || check_via_address(&msg->rcv.src_ip, &msg->via1->host,
>  msg->via1->port,* msg->via1->proto*, received_dns);
>  return rcvd;
> }
>
>
>
>  Thanks
> Jijo
>
>
>
> ___
> sr-dev mailing 
> listsr-...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>
> --
> Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda 
> - http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - 
> http://asipto.com/u/katu
>
>
___
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] TCP replace alias can cause core

2012-10-01 Thread Jijo
We found a problem regarding TCP connection alias in the following code at
tcp_main.c:


 int tcpconn_finish_connect( struct tcp_connection* c,

union sockaddr_union* from)

{

:

:

/* remove all the aliases
except the first one and re-add them

* (there shouldn't be more
then the 3 default aliases at this

 * stage) */

for (r=1; raliases;
r++){


a=&c->con_aliases[r];


tcpconn_listrm(tcpconn_aliases_hash[a->hash],
a, next, prev);

}

c->aliases=1;





As TCP_ALIAS_REPLACE flag is set for the default TCP options value, in the
function _tcpconn_add_alias_unsafe() a TCP connection alias can be moved
from connection A to connection B based on the TCP alias hash. In this
case, the number of aliases is incremented in the connection A, and
decremented from connection B. However, in the connection B the number of
aliases can reach zero (no alias). And the code above can be executed for
connection B setting the number of aliases to 1 unconditionally. When this
case happens, the connection B keeps an invalid alias (already excluded
from connection B by tcpconn_add_alias_unsafe() function called from
connection A). When the connection A is released, the aliases are also
released, and this memory area can be filled with different data. As
connection B has references to an invalid alias it can try to access
invalid areas, and can crash Kamailio. This access happens, for example,
when another alias is added to connection B.

To fix it we include a check before the code:

if (c->aliases>0) {

for (r=1;
raliases; r++){


a=&c->con_aliases[r];


tcpconn_listrm(tcpconn_aliases_hash[a->hash], a, next, prev);


memset(a,0xbb,sizeof(struct tcp_conn_alias));

}


c->aliases=1;

}


Please let us know if any comments.


Thanks

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


[SR-Users] kamailio cores on corrupted route header

2012-10-09 Thread Jijo
Hello,

kamailio cores when receives a corrupted route header.



For example, this was causing the core.



Route: 
sip:10.236.236.100;transport=tcp;r2=on;lr;ftag=1348218287134-Test-553188;osb-tag=NM;nat=yes;twan=yes?[=&
[=


I found the problem, the pointer was not initializing to null after freeing
it. Please apply this fix in the next version.

Here is the diff with the original(3.2.2) and changed version.


PGA:/mnt/o/kamailio-3.2.2/parser # diff -u parse_param.c.orig parse_param.c

--- parse_param.c.orig  2012-10-09 09:42:58.372003500 -0300

+++ parse_param.c   2012-10-09 21:34:14.556367900 -0300

@@ -545,6 +545,7 @@

  error:

if (t) pkg_free(t);

free_params(*_p);

+*_p = 0;

return -2;


  ok:


Thanks
Jijo
___
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] listening to specific interface with ip

2015-01-08 Thread Jijo
HI All.

I know that kamailio support listen on an interface with port (listen =
eth0:5060).

Does it support listen on an interface with ip, port, transport?

For example
 listen=eth0: udp:10.10.10.10:5060

Thanks
Jijo
___
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] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-09-30 Thread Jijo
I'm observing a segmentation fault when mongodb & tls enabled. It doesn't
happen when one of the module is disabled.
OS: centos 6.7   kamailio 4.3.2  mongo-c-driver version 1.1.10.

It happens immediately after i register a subscriber. The location table is
updated with the new data and in parallel core is generated as well.



Loaded symbols for /lib64/libnss_dns-2.12.so
Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
/usr/local/kamailio_proxy/etc/kamail'.
Program terminated with signal 11, Segmentation fault.
#0  0x7fd3adf65e69 in atomic_cmpxchg_int (var=0x56444e3055445030,
old=0, new_v=1) at ../../atomic/atomic_x86.h:233
233 ATOMIC_FUNC_CMPXCHG(cmpxchg, "cmpxchgl %2, %1", int , int)
Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  0x7fd3adf65e69 in atomic_cmpxchg_int (var=0x56444e3055445030,
old=0, new_v=1) at ../../atomic/atomic_x86.h:233
#1  0x7fd3adf65eb6 in futex_get (lock=0x56444e3055445030) at
../../futexlock.h:99
#2  0x7fd3adf66468 in prv_lock_tree_branch (b=192 '\300') at
ip_tree.c:47
#3  0x7fd3adf664e5 in lock_tree_branch (b=192 '\300') at ip_tree.c:66
#4  0x7fd3adf6dda6 in swap_routine (ticks=123206032, param=0x0) at
pike_funcs.c:293
#5  0x005fef8e in compat_old_handler (ti=1971296512,
tl=0x7fd32ccea430, data=0x7fd32ccea430) at timer.c:996
#6  0x005ff94c in slow_timer_main () at timer.c:1130
#7  0x004a8676 in main_loop () at main.c:1628
#8  0x004ae38e in main (argc=11, argv=0x7fff1d97ec28) at main.c:2533
(gdb)


On Clean up after the core, mongo db does segmentation fault as well

Loaded symbols for /lib64/libnss_files-2.12.so
Reading symbols from /lib64/libnss_dns-2.12.so...Reading symbols from
/usr/lib/debug/lib64/libnss_dns-2.12.so.debug...done.
done.
Loaded symbols for /lib64/libnss_dns-2.12.so
Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
/usr/local/kamailio_proxy/etc/kamail'.
Program terminated with signal 11, Segmentation fault.
#0  __pthread_mutex_destroy (mutex=0x7fd32cce7be8) at
pthread_mutex_destroy.c:28
28  if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  __pthread_mutex_destroy (mutex=0x7fd32cce7be8) at
pthread_mutex_destroy.c:28
#1  0x7fd32c86f9e6 in _mongoc_ssl_thread_cleanup () at
src/mongoc/mongoc-ssl.c:555
#2  _mongoc_ssl_cleanup () at src/mongoc/mongoc-ssl.c:106
#3  0x7fd32c8606a9 in _mongoc_do_cleanup () at
src/mongoc/mongoc-init.c:127
#4  0x00344480cdb3 in pthread_once () at
../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_once.S:104
#5  0x7fd32c8523df in __do_global_dtors_aux () from
/usr/lib64/libmongoc-1.0.so.0.0.0
#6  0x in ?? ()
(gdb)



mongo-c-driver version 1.1.10

version: kamailio 4.3.2 (x86_64/linux) b5980b-dirty
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
F_MALLOC, DBG_F_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: b5980b -dirty
compiled on 13:35:24 Sep 28 2015 with gcc 4.
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-10-01 Thread Jijo
Hi Daniel,

Thanks.. As a sidenote, If i disable ssl from mongo-c-driver library then i
don't have any crash..

Something changed in my environment. Im not able to get the full backtrace.
This is what i'm getting now.



aded symbols for /lib64/liblber-2.4.so.2
Reading symbols from /lib64/libnss_dns-2.12.so...Reading symbols from
/usr/lib/debug/lib64/libnss_dns-2.12.so.debug...done.
done.
Loaded symbols for /lib64/libnss_dns-2.12.so
Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
/usr/local/kamailio_proxy/etc/kamail'.
Program terminated with signal 11, Segmentation fault.
#0  0x7f69 in ?? ()
Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) bt
#0  0x7f69 in ?? ()
#1  0x005fef8e in compat_old_handler (ti=69660042,
tl=0x7f693e736d50, data=0x7f693e736d50) at timer.c:996
#2  0x005ff94c in slow_timer_main () at timer.c:1130
#3  0x004a8676 in main_loop () at main.c:1628
#4  0x004ae38e in main (argc=15, argv=0x7ffdd0dc8848) at main.c:2533
(gdb)



On Thu, Oct 1, 2015 at 2:37 AM, Daniel-Constantin Mierla 
wrote:

> The first backtrace is related to pike. Can you get from gdb of fisrt
> trace:
>
> frame 2
> p root->entries[b]
>
> Cheers,
> Daniel
>
>
> On 30/09/15 16:19, Jijo wrote:
>
> I'm observing a segmentation fault when mongodb & tls enabled. It doesn't
> happen when one of the module is disabled.
> OS: centos 6.7   kamailio 4.3.2  mongo-c-driver version 1.1.10.
>
> It happens immediately after i register a subscriber. The location table
> is updated with the new data and in parallel core is generated as well.
>
>
>
> Loaded symbols for /lib64/libnss_dns-2.12.so
> Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
> /usr/local/kamailio_proxy/etc/kamail'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x7fd3adf65e69 in atomic_cmpxchg_int (var=0x56444e3055445030,
> old=0, new_v=1) at ../../atomic/atomic_x86.h:233
> 233 ATOMIC_FUNC_CMPXCHG(cmpxchg, "cmpxchgl %2, %1", int , int)
> Missing separate debuginfos, use: debuginfo-install
> cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
> cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
> keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
> libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
> libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
> libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
> libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
> nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
> nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
> openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
> (gdb) bt
> #0  0x7fd3adf65e69 in atomic_cmpxchg_int (var=0x56444e3055445030,
> old=0, new_v=1) at ../../atomic/atomic_x86.h:233
> #1  0x7fd3adf65eb6 in futex_get (lock=0x56444e3055445030) at
> ../../futexlock.h:99
> #2  0x7fd3adf66468 in prv_lock_tree_branch (b=192 '\300') at
> ip_tree.c:47
> #3  0x7fd3adf664e5 in lock_tree_branch (b=192 '\300') at ip_tree.c:66
> #4  0x7fd3adf6dda6 in swap_routine (ticks=123206032, param=0x0) at
> pike_funcs.c:293
> #5  0x005fef8e in compat_old_handler (ti=1971296512,
> tl=0x7fd32ccea430, data=0x7fd32ccea430) at timer.c:996
> #6  0x005ff94c in slow_timer_main () at timer.c:1130
> #7  0x004a8676 in main_loop () at main.c:1628
> #8  0x004ae38e in main (argc=11, argv=0x7fff1d97ec28) at
> main.c:2533
> (gdb)
>
>
> On Clean up after the core, mongo db does segmentation fault as well
>
> Loaded symbols for /lib64/libnss_files-2.12.so
> Reading symbols from /lib64/libnss_dns-2.12.so...Reading symbols from
> /usr/lib/debug/lib64/libnss_dns-2.12.so.debug...done.
> done.
> Loaded symbols for /lib64/libnss_dns-2.12.so
> Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
> /usr/local/kamailio_proxy/etc/kamail'.
> Program terminated with signal 11, Segmentation fault.
> #0  __pthread_mutex_destroy (mutex=0x7fd32cce7be8) at
> pthread_mutex_destroy.c:28
> 28  if ((mutex->__data.__kind & PTHREAD_MUTEX_ROBUST_NORMAL_NP) == 0
&g

Re: [SR-Users] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-10-01 Thread Jijo
Why the backtrace doesn't show the timer function pointer? Am i missing
something?

Im building the mongo-c-driver as below
get the tar file from
https://github.com/mongodb/mongo-c-driver/releases/download/1.1.11/mongo-c-driver-1.1.11.tar.gz
run the rpm build using the spec file attached.
To disable the ssl, i have modified  '--enable-ssl=no' in the configure
 command in the spec file
%configure --disable-static --disable-silent-rules --enable-debug-symbols
--enable-man-pages --enable-ssl=yes --enable-sasl --with-libbson=bundled
--enable-optimizations

In kamailio im using db_mongodb. I'm getting same error  for ndb_mongodb as
well.

Please find the kamailio config scripts.

On Thu, Oct 1, 2015 at 10:43 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> the bracktrace is not useful.
>
> How did you compile the mongo-c library before and were there any special
> parameters you set to the modules in kamailio config? Are you using
> db_mongodb or ndb_mongodb?
>
> Cheers,
> Daniel
>
>
>
> On 01/10/15 16:25, Jijo wrote:
>
> Hi Daniel,
>
> Thanks.. As a sidenote, If i disable ssl from mongo-c-driver library then
> i don't have any crash..
>
> Something changed in my environment. Im not able to get the full
> backtrace. This is what i'm getting now.
>
>
>
> aded symbols for /lib64/liblber-2.4.so.2
> Reading symbols from /lib64/libnss_dns-2.12.so...Reading symbols from
> /usr/lib/debug/lib64/libnss_dns-2.12.so.debug...done.
> done.
> Loaded symbols for /lib64/libnss_dns-2.12.so
> Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
> /usr/local/kamailio_proxy/etc/kamail'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x7f69 in ?? ()
> Missing separate debuginfos, use: debuginfo-install
> cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
> cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
> keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
> libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
> libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
> libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
> libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
> nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
> nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
> openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
> (gdb) bt
> #0  0x7f69 in ?? ()
> #1  0x005fef8e in compat_old_handler (ti=69660042,
> tl=0x7f693e736d50, data=0x7f693e736d50) at timer.c:996
> #2  0x005ff94c in slow_timer_main () at timer.c:1130
> #3  0x004a8676 in main_loop () at main.c:1628
> #4  0x004ae38e in main (argc=15, argv=0x7ffdd0dc8848) at
> main.c:2533
> (gdb)
>
>
>
> On Thu, Oct 1, 2015 at 2:37 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> The first backtrace is related to pike. Can you get from gdb of fisrt
>> trace:
>>
>> frame 2
>> p root->entries[b]
>>
>> Cheers,
>> Daniel
>>
>>
>> On 30/09/15 16:19, Jijo wrote:
>>
>> I'm observing a segmentation fault when mongodb & tls enabled. It doesn't
>> happen when one of the module is disabled.
>> OS: centos 6.7   kamailio 4.3.2  mongo-c-driver version 1.1.10.
>>
>> It happens immediately after i register a subscriber. The location table
>> is updated with the new data and in parallel core is generated as well.
>>
>>
>>
>> Loaded symbols for /lib64/libnss_dns-2.12.so
>> Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
>> /usr/local/kamailio_proxy/etc/kamail'.
>> Program terminated with signal 11, Segmentation fault.
>> #0  0x7fd3adf65e69 in atomic_cmpxchg_int (var=0x56444e3055445030,
>> old=0, new_v=1) at ../../atomic/atomic_x86.h:233
>> 233 ATOMIC_FUNC_CMPXCHG(cmpxchg, "cmpxchgl %2, %1", int , int)
>> Missing separate debuginfos, use: debuginfo-install
>> cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
>> cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
>> keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64
>> libcom_err-1.41.12-22.el6.x86_64 libcurl-7.19.7-46.el6.x86_64
>> libidn-1.18-2.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64
>> libssh2-1.4.2-1.el6_6.1.x86_64 libunistring-0.9.3-5.el6.x86_64
>> libxml2-2.7.6-20.el6.x86_64 mysql-libs-5.1.73-5.el6_6.x86_64
>> nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
>> nss-util-3.18.0-1.el6_6.x86_64 openldap-2.4.40-5.el6.x86_64
>> openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
>> (gdb) bt
>> #0  0x7fd3adf65e69 in atomic_cmpxch

Re: [SR-Users] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-10-02 Thread Jijo
I have rebuild the official version(4.3.2) again with the default scripts
and now i'm getting diffrent core.

This happens only when i enable TLS module in kamailio. So i believe there
is some corruption causing when TLS module in Kamailio  and SSL in Mongo
Driver  is enabled.

I'm running with the offical kamailio script by just enabling mongo
modules. It happens for NDB as well.

How did you build the mongo driver when you implemented it? May be i can
try the same.

Please find the scripts used for testing.

Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64 -M
8'.

Program terminated with signal 11, Segmentation fault.

#0  0x7f85a21da075 in lock_udomain (_d=0x7f859c7b5f08,
_aor=0x7fff6de7ef70) at udomain.c:1017

1017 lock_get(_d->table[sl].lock);

Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
glibc-2.12-1.166.el6_7.1.x86_64 keyutils-libs-1.4-5.el6.x86_64
krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
libselinux-2.0.94-5.8.el6.x86_64 nss-softokn-freebl-3.14.3-22.el6_6.x86_64
openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64

(gdb) bt

#0  0x7f85a21da075 in lock_udomain (_d=0x7f859c7b5f08,
_aor=0x7fff6de7ef70) at udomain.c:1017

#1  0x7f85a1d7069b in add_contacts (_m=0x7f85a3f054b8,
_d=0x7f859c7b5f08, _a=0x7fff6de7ef70, _mode=0, _use_regid=1) at save.c:831

#2  0x7f85a1d72602 in save (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08,
_cflags=0, _uri=0x0) at save.c:986

#3  0x7f85a1d5975a in w_save2 (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08
"h^{\234\205\177", _cflags=0x0) at reg_mod.c:414

#4  0x0041decb in do_action (h=0x7fff6de7f720, a=0x7f85a3edd830,
msg=0x7f85a3f054b8) at action.c:1059

#5  0x0042a553 in run_actions (h=0x7fff6de7f720, a=0x7f85a3edd830,
msg=0x7f85a3f054b8) at action.c:1548

#6  0x0042abb8 in run_actions_safe (h=0x7fff6de80a10,
a=0x7f85a3edd830, msg=0x7f85a3f054b8) at action.c:1613

#7  0x00543d50 in rval_get_int (h=0x7fff6de80a10,
msg=0x7f85a3f054b8, i=0x7fff6de7fbf8, rv=0x7f85a3edf478, cache=0x0) at
rvalue.c:912

#8  0x00547f88 in rval_expr_eval_int (h=0x7fff6de80a10,
msg=0x7f85a3f054b8, res=0x7fff6de7fbf8, rve=0x7f85a3edf470) at rvalue.c:1906

#9  0x0054837e in rval_expr_eval_int (h=0x7fff6de80a10,
msg=0x7f85a3f054b8, res=0x7fff6de80080, rve=0x7f85a3edfb70) at rvalue.c:1914

#10 0x0041d927 in do_action (h=0x7fff6de80a10, a=0x7f85a3ee0270,
msg=0x7f85a3f054b8) at action.c:1029

#11 0x0042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3edc990,
msg=0x7f85a3f054b8) at action.c:1548

#12 0x0041a8c3 in do_action (h=0x7fff6de80a10, a=0x7f85a3ebdd98,
msg=0x7f85a3f054b8) at action.c:677

#13 0x0042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3ebdb08,
msg=0x7f85a3f054b8) at action.c:1548

#14 0x0042ac80 in run_top_route (a=0x7f85a3ebdb08,
msg=0x7f85a3f054b8, c=0x0) at action.c:1634

#15 0x0050a9f4 in receive_msg (

buf=0xa70b00 "REGISTER sip:192.168.2.142 SIP/2.0\r\nVia: SIP/2.0/UDP
192.168.2.119:60887;branch=z9hG4bK-524287-1---d670bd2004732b4a;rport\r\nMax-Forwards:
70\r\nContact:  wrote:

> If you recompiled with different souce code or different flags then the
> binary is no longer matching the corefile properly.
>
> Cheers,
> Daniel
>
>
> On 01/10/15 17:00, Jijo wrote:
>
> Why the backtrace doesn't show the timer function pointer? Am i missing
> something?
>
> Im building the mongo-c-driver as below
> get the tar file from
> https://github.com/mongodb/mongo-c-driver/releases/download/1.1.11/mongo-c-driver-1.1.11.tar.gz
> run the rpm build using the spec file attached.
> To disable the ssl, i have modified  '--enable-ssl=no' in the configure
>  command in the spec file
> %configure --disable-static --disable-silent-rules --enable-debug-symbols
> --enable-man-pages --enable-ssl=yes --enable-sasl --with-libbson=bundled
> --enable-optimizations
>
> In kamailio im using db_mongodb. I'm getting same error  for ndb_mongodb
> as well.
>
> Please find the kamailio config scripts.
>
> On Thu, Oct 1, 2015 at 10:43 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> the bracktrace is not useful.
>>
>> How did you compile the mongo-c library before and were there any special
>> parameters you set to the modules in kamailio config? Are you using
>> db_mongodb or ndb_mongodb?
>>
>> Cheers,
>> Daniel
>>
>>
>>
>> On 01/10/15 16:25, Jijo wrote:
>>
>> Hi Daniel,
>>
>> Thanks.. As a sidenote, If i disable ssl from mongo-c-driver library then
>> i don't have any crash..
>>
>> Something changed in my environment. Im not able to get the full
>

Re: [SR-Users] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-10-06 Thread Jijo
Thanks, I have opened the issue on github tracker.

regards
jijo

On Tue, Oct 6, 2015 at 9:53 AM, Daniel-Constantin Mierla 
wrote:

> Hello,
>
> unfortunately not yet -- this requires compiling the libs and currently I
> am traveling to USA to attend few VoIP conferences, not having a good devel
> environment with me, access to internet is limited, so connecting to a
> server is not easy option as well. Can you open an issue on github tracker
> just not to forget about it?
>
> Cheers,
> Daniel
>
>
> On 06/10/15 15:49, realj...@gmail.com wrote:
>
> Hi Daniel
>
> Thanks for your help .
>
> Did you get a chance to look at this problem.
> Please let me know how did you build  the mongo-c-driver ?
>
>
> Regards,
> Jijo
>
> On Oct 2, 2015, at 7:21 AM, Jijo  wrote:
>
> I have rebuild the official version(4.3.2) again with the default scripts
> and now i'm getting diffrent core.
>
> This happens only when i enable TLS module in kamailio. So i believe there
> is some corruption causing when TLS module in Kamailio  and SSL in Mongo
> Driver  is enabled.
>
> I'm running with the offical kamailio script by just enabling mongo
> modules. It happens for NDB as well.
>
> How did you build the mongo driver when you implemented it? May be i can
> try the same.
>
> Please find the scripts used for testing.
>
> Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64
> -M 8'.
>
> Program terminated with signal 11, Segmentation fault.
>
> #0  0x7f85a21da075 in lock_udomain (_d=0x7f859c7b5f08,
> _aor=0x7fff6de7ef70) at udomain.c:1017
>
> 1017 lock_get(_d->table[sl].lock);
>
> Missing separate debuginfos, use: debuginfo-install
> cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
> cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
> glibc-2.12-1.166.el6_7.1.x86_64 keyutils-libs-1.4-5.el6.x86_64
> krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
> libselinux-2.0.94-5.8.el6.x86_64 nss-softokn-freebl-3.14.3-22.el6_6.x86_64
> openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
>
> (gdb) bt
>
> #0  0x7f85a21da075 in lock_udomain (_d=0x7f859c7b5f08,
> _aor=0x7fff6de7ef70) at udomain.c:1017
>
> #1  0x7f85a1d7069b in add_contacts (_m=0x7f85a3f054b8,
> _d=0x7f859c7b5f08, _a=0x7fff6de7ef70, _mode=0, _use_regid=1) at save.c:831
>
> #2  0x7f85a1d72602 in save (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08,
> _cflags=0, _uri=0x0) at save.c:986
>
> #3  0x7f85a1d5975a in w_save2 (_m=0x7f85a3f054b8, _d=0x7f859c7b5f08
> "h^{\234\205\177", _cflags=0x0) at reg_mod.c:414
>
> #4  0x0041decb in do_action (h=0x7fff6de7f720, a=0x7f85a3edd830,
> msg=0x7f85a3f054b8) at action.c:1059
>
> #5  0x0042a553 in run_actions (h=0x7fff6de7f720, a=0x7f85a3edd830,
> msg=0x7f85a3f054b8) at action.c:1548
>
> #6  0x0042abb8 in run_actions_safe (h=0x7fff6de80a10,
> a=0x7f85a3edd830, msg=0x7f85a3f054b8) at action.c:1613
>
> #7  0x00543d50 in rval_get_int (h=0x7fff6de80a10,
> msg=0x7f85a3f054b8, i=0x7fff6de7fbf8, rv=0x7f85a3edf478, cache=0x0) at
> rvalue.c:912
>
> #8  0x00547f88 in rval_expr_eval_int (h=0x7fff6de80a10,
> msg=0x7f85a3f054b8, res=0x7fff6de7fbf8, rve=0x7f85a3edf470) at rvalue.c:1906
>
> #9  0x0054837e in rval_expr_eval_int (h=0x7fff6de80a10,
> msg=0x7f85a3f054b8, res=0x7fff6de80080, rve=0x7f85a3edfb70) at rvalue.c:1914
>
> #10 0x0041d927 in do_action (h=0x7fff6de80a10, a=0x7f85a3ee0270,
> msg=0x7f85a3f054b8) at action.c:1029
>
> #11 0x0042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3edc990,
> msg=0x7f85a3f054b8) at action.c:1548
>
> #12 0x0041a8c3 in do_action (h=0x7fff6de80a10, a=0x7f85a3ebdd98,
> msg=0x7f85a3f054b8) at action.c:677
>
> #13 0x0042a553 in run_actions (h=0x7fff6de80a10, a=0x7f85a3ebdb08,
> msg=0x7f85a3f054b8) at action.c:1548
>
> #14 0x0042ac80 in run_top_route (a=0x7f85a3ebdb08,
> msg=0x7f85a3f054b8, c=0x0) at action.c:1634
>
> #15 0x0050a9f4 in receive_msg (
>
> buf=0xa70b00 "REGISTER sip:192.168.2.142 SIP/2.0\r\nVia: SIP/2.0/UDP
> 192.168.2.119:60887;branch=z9hG4bK-524287-1---d670bd2004732b4a;rport\r\nMax-Forwards:
> 70\r\nContact:  len=534, rcv_info=0x7fff6de80d00) at receive.c:196
>
> #16 0x0060a4a6 in udp_rcv_loop () at udp_server.c:495
>
> #17 0x004a7fb3 in main_loop () at main.c:1573
>
> #18 0x004ae38e in main (argc=7, argv=0x7fff6de81138) at main.c:2533
>
> (gdb) quit
>
> [root@localhost /
>
>
> On Thu, Oct 1, 2015 at 12:29 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> If you recompiled with different souce code or 

Re: [SR-Users] segmentation fault when mongodb & tls enabled. ( kamailio 4.3.2)

2015-11-06 Thread Jijo
Hi,

I tried with mongo-c-driver 1.2.1 and crash occurring with that library as
well.  So i took the kamailio basic script and able to reproduce it. So the
issue is slightly diffrent now. Core occurs when i enable pike(ANTIFLOOD).
Another thing which i noticed is, core doesn't occur  If i disable TLS and
enable pike.

Please find the attached script files for more details about my
configuration.

Here is the backtrace when i enable TLS and ANTIFLOOD

done.

Loaded symbols for
/usr/local/kamailio_proxy/lib64/kamailio/modules/ndb_mongodb.so

Reading symbols from /lib64/libnss_dns.so.2...(no debugging symbols
found)...done.

Loaded symbols for /lib64/libnss_dns.so.2

Core was generated by `/usr/local/kamailio_proxy/sbin/kamailio -f
/usr/local/kamailio_proxy/etc/kamail'.

Program terminated with signal 11, Segmentation fault.

#0  0x005fef6f in compat_old_handler (ti=2030104642,
tl=0x7f9b68f7e130, data=0x7f9b) at timer.c:996

996 t->timer_f(TICKS_TO_S(*ticks), t->t_param);

Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-20.el6_7.x86_64
glibc-2.12-1.166.el6_7.3.x86_64 keyutils-libs-1.4-5.el6.x86_64
krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
libcurl-7.19.7-46.el6.x86_64 libidn-1.18-2.el6.x86_64
libselinux-2.0.94-5.8.el6.x86_64 libssh2-1.4.2-1.el6_6.1.x86_64
libunistring-0.9.3-5.el6.x86_64 libxml2-2.7.6-20.el6.x86_64
nspr-4.10.8-1.el6_6.x86_64 nss-3.18.0-5.3.el6_6.x86_64
nss-softokn-freebl-3.14.3-22.el6_6.x86_64 nss-util-3.18.0-1.el6_6.x86_64
openldap-2.4.40-5.el6.x86_64 openssl-1.0.1e-42.el6.x86_64
zlib-1.2.3-29.el6.x86_64

(gdb) bt

#0  0x005fef6f in compat_old_handler (ti=2030104642,
tl=0x7f9b68f7e130, data=0x7f9b) at timer.c:996

#1  0x005ff94c in slow_timer_main () at timer.c:1130

#2  0x004a8676 in main_loop () at main.c:1628

#3  0x004ae38e in main (argc=15, argv=0x7ffc9cc0ec78) at main.c:2533

(gdb) quit





On Tue, Nov 3, 2015 at 10:04 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
> I tried to reproduce here and all seems fine -- I enabled tls and
> registered a user using mongodb as backend.
>
> Can you give the parameters you set for usrloc module?
>
> Cheers,
> Daniel
>
>
> On 06/10/15 19:03, Jijo wrote:
>
> Thanks, I have opened the issue on github tracker.
>
> regards
> jijo
>
> On Tue, Oct 6, 2015 at 9:53 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> unfortunately not yet -- this requires compiling the libs and currently I
>> am traveling to USA to attend few VoIP conferences, not having a good devel
>> environment with me, access to internet is limited, so connecting to a
>> server is not easy option as well. Can you open an issue on github tracker
>> just not to forget about it?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 06/10/15 15:49, realj...@gmail.com wrote:
>>
>> Hi Daniel
>>
>> Thanks for your help .
>>
>> Did you get a chance to look at this problem.
>> Please let me know how did you build  the mongo-c-driver ?
>>
>>
>> Regards,
>> Jijo
>>
>> On Oct 2, 2015, at 7:21 AM, Jijo < realj...@gmail.com>
>> wrote:
>>
>> I have rebuild the official version(4.3.2) again with the default scripts
>> and now i'm getting diffrent core.
>>
>> This happens only when i enable TLS module in kamailio. So i believe
>> there is some corruption causing when TLS module in Kamailio  and SSL in
>> Mongo Driver  is enabled.
>>
>> I'm running with the offical kamailio script by just enabling mongo
>> modules. It happens for NDB as well.
>>
>> How did you build the mongo driver when you implemented it? May be i can
>> try the same.
>>
>> Please find the scripts used for testing.
>>
>> Core was generated by `/usr/sbin/kamailio -P /var/run/kamailio.pid -m 64
>> -M 8'.
>>
>> Program terminated with signal 11, Segmentation fault.
>>
>> #0  0x7f85a21da075 in lock_udomain (_d=0x7f859c7b5f08,
>> _aor=0x7fff6de7ef70) at udomain.c:1017
>>
>> 1017 lock_get(_d->table[sl].lock);
>>
>> Missing separate debuginfos, use: debuginfo-install
>> cyrus-sasl-lib-2.1.23-15.el6_6.2.x86_64
>> cyrus-sasl-plain-2.1.23-15.el6_6.2.x86_64 db4-4.7.25-19.el6_6.x86_64
>> glibc-2.12-1.166.el6_7.1.x86_64 keyutils-libs-1.4-5.el6.x86_64
>> krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64
>> libselinux-2.0.94-5.8.el6.x86_64 nss-softokn-freebl-3.14.3-22.el6_6.x86_64
>> openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
>>
>> (gdb) bt
>>
>> #0 

Re: [SR-Users] Setting up TLS between proxy and authentication server

2010-10-29 Thread Jijo
Hi Andrei,

Which version has this change? I don't see it in 3.0.4, the realease note
says that it is fixed. Here is the function

int tls_h_fix_read_conn(struct tcp_connection *c)
{
 int ret;
 struct tls_extra_data* tls_c;

 ret = -1;<=== Isn't it to be zero. Thats what i understood from the patch.
 tls_c = 0;
 if (unlikely(c->extra_data==0)){
  lock_get(&c->write_lock);
   if (unlikely(tls_update_fd(c, c->fd) < 0)){
ret = -1;
   } else {
tls_c=(struct tls_extra_data*)c->extra_data;
switch(tls_c->state){
 case S_TLS_ACCEPTING:
  ret=tls_accept(c, 0);
  break;
 case S_TLS_CONNECTING:
  ret=tls_connect(c, 0);
  break;
 default:
  /* fall through */
  ret=1;
  break;
}
   }
  lock_release(&c->write_lock);
 } else {
  tls_c=(struct tls_extra_data*)c->extra_data;
  switch (tls_c->state) {
   case S_TLS_ACCEPTING:
lock_get(&c->write_lock);
 tls_c=(struct tls_extra_data*)c->extra_data;
 /* It might have changed meanwhile */
 if (likely(tls_c->state == S_TLS_ACCEPTING)) {
  ret = tls_update_fd(c, c->fd);
  if (ret == 0) ret = tls_accept(c, 0);
  else ret = -1;
 }
lock_release(&c->write_lock);
   break;
   case S_TLS_CONNECTING:
lock_get(&c->write_lock);
 tls_c=(struct tls_extra_data*)c->extra_data;
 /* It might have changed meanwhile */
 if (likely(tls_c->state == S_TLS_CONNECTING)) {
  ret = tls_update_fd(c, c->fd);
  if (ret == 0) ret = tls_connect(c, 0);
  else ret = -1;
 }
lock_release(&c->write_lock);
   break;
  default: /* fall through */
   ret=1;
   break;
  }
 }
 return (ret>=0)?(tls_c->state==S_TLS_ESTABLISHED):ret;
}


On Mon, Aug 23, 2010 at 11:00 AM, Couprie Geoffroy <
geoffroy.coup...@atosorigin.com> wrote:

> Hello,
>
> -Message d'origine-
> De : Andrei Pelinescu-Onciul [mailto:and...@iptel.org]
> Envoyé : vendredi 20 août 2010 12:35
> À : Couprie Geoffroy
> Cc : sr-users@lists.sip-router.org
> Objet : Re: [SR-Users] Setting up TLS between proxy and authentication
> server
>
> > On Aug 20, 2010 at 12:32, Andrei Pelinescu-Onciul 
> wrote:
> > > On Aug 20, 2010 at 10:18, Couprie Geoffroy <
> geoffroy.coup...@atosorigin.com> wrote:
> > > > Hello,
> > > >
> > > > I am testing TLS communication with Kamailio 3.0.2, and I encounter a
> strange problem. My setup is like this:
> > > >
> > > > Client  <-UDP->  Proxy server <- TLS with client certificate
> authentication -> Authentication server
> > > > 192.168.24.1192.168.24.128
> > 192.168.24.129
> > > >
> > > > The two servers are instance of Kamailio 3.0.2
> > > >
> > > > When the client sends a REGISTER, the proxy retransmits the message
> to the authentication server, which sends back  a 401 Unauthorized. But it
> seems the proxy closes the TLS connexion right after forwarding the
> REGISTER, and doesn't receive the 401 message. The TLS handshake is OK, and
> the client certificate is required (I didn't add the verification part yet).
> The REGISTER message goes through TLS, and is received by the authentication
> server. Then, the proxy sends a TLS alert (Close-notify), and after that
> message, the authentication server sends back the 401, and the proxy ignores
> that message.
> > > >
> > > > Could it be caused by a timeout? Is there a way to keep the TLS
> connection opened?
> > >
> > > It looks like a bug.
> > > Could you try the attached patch and report back if it fixes the
> > > problem?
> >
> > Sorry, forgot to actually attach it. Here it is.
>
> This patch fixed my problem. Now the proxy receives and retransmits the
> 401. Thank you very much!
>
> Best regards,
>
> Geoffroy
>
>
> Ce message et les pièces jointes sont confidentiels et réservés à l'usage
> exclusif de ses destinataires. Il peut également être protégé par le secret
> professionnel. Si vous recevez ce message par erreur, merci d'en avertir
> immédiatement l'expéditeur et de le détruire. L'intégrité du message ne
> pouvant être assurée sur Internet, la responsabilité du groupe Atos Origin
> ne pourra être recherchée quant au contenu de ce message. Bien que les
> meilleurs efforts soient faits pour maintenir cette transmission exempte de
> tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
> responsabilité ne saurait être recherchée pour tout dommage résultant d'un
> virus transmis.
>
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its integrity
> cannot be secured on the Internet, the Atos Origin group liability cannot be
> triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.
>
>
>  ___

[SR-Users] using tls from modules_s instead of core

2010-11-01 Thread Jijo
Hi all.

What changes i have to make in the build to use tls from modules_s instead
from core modules.

Thanks
Jijo
___
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] avp_db_query returning wrong data

2010-11-23 Thread Jijo
Hi All,

While doing  5 REGISTER/second, i observed that that avp_db_query is
returning data from a different db entry.   This happens only with TCP with
more than 1 tcp_children.  it works fine with UDP. It also work with TCP
with tcp_children as 1. Is there any relation between the TCP connections
and Postgres in kamailio. I'm using kamilio 3.1.0.

How should i debug this issue?? What are the areas need to look?

Thanks
Jijo
___
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] TCP Children and Connection Handling

2010-11-23 Thread Jijo
Hi All,

I'm facing an issue with TCP connection from Proxy(kamailio) to a SIP server
on a load test, where kamailio is not processing the message fast enough and
which leads socket buffer getting filled up. I have increased the
 tcp_rd_buf_size but that really didn't help.
According to my understanding the each TCP connection is assigned to a TCP
children, and TCP children will read until it there is no data for few
seconds and return the connection to tcp main process. In this case the TCP
connection is to the SIP server which always have some data due to periodic
SIP ping ,registration refresh and calls etc. So i believe this connection
will be hold always by one children and since that children is processing
the message sequentially, it might not be possible to increase the
performance on this connection.

My question is, If my understanding is correct How do we increase the
performance for a particular TCP connection?  Does Kamailio has some
mechanism to distribute the  message from a single TCP connection
to different child, when it is overloaded?

What is the best way to solve this issue?

Thanks in advance.

Jijo
___
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_db_query returning wrong data

2010-11-24 Thread Jijo
I'm using kamailio 3.1.0, so this is already in place.. Is there any other
change happened after 3.1.0 release?

On Wed, Nov 24, 2010 at 3:41 AM, Daniel-Constantin Mierla  wrote:

>
>
> On 11/24/10 12:59 AM, Alex Balashov wrote:
>
>> On 11/23/2010 06:41 PM, Jijo wrote:
>>
>>  Yes it work with many UDP children.
>>>
>>
>> There were some concurrency issues with the Postgres module a while back,
>> discovered after the 3.1.0 release.  I remember something about it because
>> we are extremely heavy users of the Postgres module as well.
>> Unfortunately, I can't find the thread.
>>
> here is the link to the commit:
>
>
> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=63c724b42d4c4ff45eaa660508d6358f3e894d0a
>
> Next day was backported to 3.0 branch as well. So if an earlier version is
> used, you must updated to the latest.
>
> Cheers,
> Daniel
>
>
>> Try the latest git master HEAD:
>>
>>  git clone git://git.sip-router.org/sip-router
>>  cd sip-router
>>  make FLAVOUR=kamailio cfg
>>  make all
>>
>> And see if it changes.
>>
>>
> --
> 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.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] TCP Overload Congestion

2010-12-09 Thread Jijo
Hi Andrei,

I'm observing TCP Recv buffer getting full when we are doing a load run
(30cps) on Proxy with TCP. Basically the congestion is happening on the TCP
connection from SIP Server to Proxy. I beleive kamailio  is not processing
the message fast enough, due to this congestion is occuring. Did anyone
observe this behavior? How do we resolve it?

Thanks
Jijo
___
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] TCP Overload Congestion

2010-12-09 Thread Jijo
Hi Andrei,

I'm observing TCP Recv buffer getting full when we are doing a load run
(30cps) on Proxy with TCP. Basically the congestion is happening on the TCP
connection from SIP Server to Proxy. I beleive kamailio  is not processing
the message fast enough, due to this congestion is occuring. Did anyone
observe this behavior? How do we resolve it?

Thanks
Jijo
___
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] TCP Overload Congestion

2010-12-15 Thread Jijo
Hi Klaus,

Thanks for your help..I have improved the DB lockups which basically
improved by 10%.

We are running kamailio on IBM 3550 with 100 tcp children. So i hope the no
of children would be sufficient to make kamailio faster.. Will there be any
possibility to improve performance by increasing the child?.
In my case always the TCP connection between Proxy and SIP server is
congested as i believe main process assign child per socket, so a single
child will be reading the message and processing sequentially for the tcp
socket between proxy and sipserver unitl EOF. In this case there is no EOF
as we are doing load test and always there is message on that socket.

We use lots of avp functions, do you think that reduce the performance?

Thanks
Jijo

On Fri, Dec 10, 2010 at 2:17 AM, Klaus Darilion <
klaus.mailingli...@pernau.at> wrote:

>
>
> Am 09.12.2010 18:55, schrieb Jijo:
>
>  Hi Andrei,
>>
>> I'm observing TCP Recv buffer getting full when we are doing a load run
>> (30cps) on Proxy with TCP. Basically the congestion is happening on the
>> TCP connection from SIP Server to Proxy. I beleive kamailio  is not
>> processing the message fast enough, due to this congestion is occuring.
>> Did anyone observe this behavior? How do we resolve it?
>>
>
> Make Kamailio faster. find out why it is not able to process the messages
> fast enough. Kamailio processes block during message processing. Thus, for
> example if you are doing slow database lookups then Kamailio is also slow.
> You can try to increase the number of the TCP worker processes
> (tcp_children=20) and make sure that syslog logging is asynchronous
> (syslogd.conf)
>
> 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


[SR-Users] CRASH on qm_free for simultaneous calls (V3.1.0)

2010-12-15 Thread Jijo
\000\340~\257\004\000\000\000?)\037\b\001\000\000\000\a\000\000\000\000\000\000\000H\271\225\277\350\353\017\b"
#10 0x080af2ec in main (argc=9, argv=0xbf95ba84) at main.c:2398
cfg_stream = 0x8cbe008
c = 
r = 
tmp = 0xbf95cdc0 ""
tmp_len = -1217394389
port = 
    proto = 
options = 0x81ef340
":f:cm:dVhEb:l:L:n:vrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:"
ret = -1
seed = 3337198521
rfd = 
debug_save = 
debug_flag = 
dont_fork_cnt = 0
p = 

Thanks
Jijo
___
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] CRASH on qm_free for simultaneous calls (V3.1.0)

2010-12-16 Thread Jijo
Hi Daniel,

Thanks..Please find the logs

2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
free_cell(141) - aborting
2010-12-17T10:29:04+00:00 [crit] sipserver: :  [pass_fd.c:293]: ERROR:
receive_fd: EOF on 11
2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:741]:
child process 14398 exited by a signal 6
2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:744]:
core was generated
2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
free_cell(141) - aborting


Jijo

On Thu, Dec 16, 2010 at 1:27 AM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
> look into syslog file (/var/log/syslog or /var/log/messages if you didn't
> set a custom one) and search for a message like "BUG: qm_free: freeing
> already freed pointer ...".. Send it here, seems to be a double free of same
> pointer.
>
> Thanks,
> Daniel
>
>
> On 12/16/10 12:34 AM, Jijo wrote:
>
> I'm observing a crash on qm_free, when we made two outgoing calls to the
> same number. One SIP phone receives ring back tone and the other busy tone.
> The back trace is shown below which shows that it is crashed in abort(). How
> can the condition   if (f->u.is_free){ could be true?
> Please let me know if anybody observed this issue and let me know how to
> debug this isssue.
>
> f=(struct qm_frag*) ((char*)p-sizeof(struct qm_frag));
> #ifdef DBG_QM_MALLOC
> qm_debug_frag(qm, f);
> if (f->u.is_free){
> LOG(L_CRIT, "BUG: qm_free: freeing already freed pointer,"
> " first free: %s: %s(%ld) - aborting\n",
> f->file, f->func, f->line);*
> abort();*
> }
> MDBG("qm_free: freeing frag. %p alloc'ed from %s: %s(%ld)\n",
> f, f->file, f->func, f->line);
> #endif
>
>
> BACKTRACE
> ---
>
>
> Program received signal SIGABRT, Aborted.
> 0xb76fd7a5 in raise () from /lib/libc.so.6
> (gdb) bt full
> #0  0xb76fd7a5 in raise () from /lib/libc.so.6
> No symbol table info available.
> #1  0xb76ff070 in abort () from /lib/libc.so.6
> No symbol table info available.
> #2  0x081824d5 in qm_free (qm=0xaf7ee000, p=0xaf9ed758, file=0xb7659aed
> "tm: h_table.c", func=0xb7659c9c "free_cell", line=141) at
> mem/q_malloc.c:447
> f = 
> prev = 
> next = 
> size = 
> #3  0xb75ff6b9 in free_cell (dead_cell=0xaf9e7054) at h_table.c:141
> b = 
> i = 
> rpl = 
> tt = 
> foo = 
> cbs = 
> cbs_tmp = 
> __FUNCTION__ = "free_cell"
> #4  0xb7625eb0 in t_unref (p_msg=0x847bb10) at t_lookup.c:1553
> kr = 
> #5  0xb764b3ad in w_t_unref (foo=0x847bb10, flags=2147483649, bar=0x0) at
> tm.c:707
> No locals.
> #6  0x0811543a in exec_post_script_cb (msg=0x847bb10, type=REQUEST_CB_TYPE)
> at script_cb.c:195
> cb = 0x8867874
> flags = 2147483649
> #7  0x080e5a4e in receive_msg (
> buf=0x82a89e0 "ACK sip:0...@10.80.13.54:5060;transport=udpSIP/2.0\r\nVia: 
> SIP/2.0/UDP 10.200.3.39:5060;branch=z9hG4bK0a992e8d3052e85e5\r\nRoute:
> \r\nMax-Forwards: 69\r\nFrom:
> 554"..., len=, rcv_info=0xbf95b7fc) at receive.c:221
> msg = 0x847bb10
> ctx = {rec_lev = 137434160, run_flags = 0, last_retcode =
> -1080707352, jmp_env = {{__jmpbuf = {-1224488143, 137089696, 137434092, 0,
> -1080707248,
> -1080707304}, __mask_was_saved = 0, __saved_mask = {__val =
> {3079133424, 134556827, 3079002384, 0, 3214260024, 3070479287, 137089696,
>   137434160, 3070572886, 3070573396, 228, 137347864,
> 3214260056, 3077419768, 3079002384, 137089664, 4294967295, 3079131124,
> 134556827,
>   134535424, 1, 3079058382, 3079133864, 3079003192, 1, 1,
> 0, 134555968, 0, 136548964, 3077419768, 142823652}
> ret = 
> inb = {
>   s = 0x82a89e0 "ACK 
> sip:0...@10.80.13.54:5060;transport=udpSIP/2.0\r\nVia: SIP/2.0/UDP 
> 10.200.3.39:5060;branch=z9hG4bK0a992e8d3052e85e5\r\nRoute:
> \r\nMax-Forwards: 69\r\nFrom:
> 554"..., len = 457}
> __FUNCTION__ = "receive_msg"
> #8  0x08175cb6 in udp_rcv_loop () at udp_server.c:532
> len = 
> buf = "ACK sip:0...@10.80.13.54:5060;transport=udp SIP/2.0\r\nVia:
> SIP/2.0/UDP 10.200.3.39:5060;branch=z9hG4bK0a992e8d3052e85e5\r\nRoute:
> \r\nMax-Forwards: 69\r\nFrom:
> 554"...
> from = 0x88350e4
> fromlen = 16
> ri = {src_ip = {af = 2

Re: [SR-Users] CRASH on qm_free for simultaneous calls (V3.1.0)

2010-12-16 Thread Jijo
Hi Daniel..

This was due to an error in our config file.

We were doing t_release and then t_relay. So we removed the t_release from
config, which basically fixed the issue.

On Thu, Dec 16, 2010 at 2:16 PM, Jijo  wrote:

> Hi Daniel,
>
> Thanks..Please find the logs
>
> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
> BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
> free_cell(141) - aborting
> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [pass_fd.c:293]:
> ERROR: receive_fd: EOF on 11
> 2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:741]:
> child process 14398 exited by a signal 6
> 2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:744]:
> core was generated
> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
> BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
> free_cell(141) - aborting
>
>
> Jijo
>
>
> On Thu, Dec 16, 2010 at 1:27 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>  Hello,
>>
>> look into syslog file (/var/log/syslog or /var/log/messages if you didn't
>> set a custom one) and search for a message like "BUG: qm_free: freeing
>> already freed pointer ...".. Send it here, seems to be a double free of same
>> pointer.
>>
>> Thanks,
>> Daniel
>>
>>
>> On 12/16/10 12:34 AM, Jijo wrote:
>>
>> I'm observing a crash on qm_free, when we made two outgoing calls to the
>> same number. One SIP phone receives ring back tone and the other busy tone.
>> The back trace is shown below which shows that it is crashed in abort(). How
>> can the condition   if (f->u.is_free){ could be true?
>> Please let me know if anybody observed this issue and let me know how to
>> debug this isssue.
>>
>> f=(struct qm_frag*) ((char*)p-sizeof(struct qm_frag));
>> #ifdef DBG_QM_MALLOC
>> qm_debug_frag(qm, f);
>> if (f->u.is_free){
>> LOG(L_CRIT, "BUG: qm_free: freeing already freed pointer,"
>> " first free: %s: %s(%ld) - aborting\n",
>> f->file, f->func, f->line);*
>> abort();*
>> }
>> MDBG("qm_free: freeing frag. %p alloc'ed from %s: %s(%ld)\n",
>> f, f->file, f->func, f->line);
>> #endif
>>
>>
>> BACKTRACE
>> ---
>>
>>
>> Program received signal SIGABRT, Aborted.
>> 0xb76fd7a5 in raise () from /lib/libc.so.6
>> (gdb) bt full
>> #0  0xb76fd7a5 in raise () from /lib/libc.so.6
>> No symbol table info available.
>> #1  0xb76ff070 in abort () from /lib/libc.so.6
>> No symbol table info available.
>> #2  0x081824d5 in qm_free (qm=0xaf7ee000, p=0xaf9ed758, file=0xb7659aed
>> "tm: h_table.c", func=0xb7659c9c "free_cell", line=141) at
>> mem/q_malloc.c:447
>> f = 
>> prev = 
>> next = 
>> size = 
>> #3  0xb75ff6b9 in free_cell (dead_cell=0xaf9e7054) at h_table.c:141
>> b = 
>> i = 
>> rpl = 
>> tt = 
>> foo = 
>> cbs = 
>> cbs_tmp = 
>> __FUNCTION__ = "free_cell"
>> #4  0xb7625eb0 in t_unref (p_msg=0x847bb10) at t_lookup.c:1553
>> kr = 
>> #5  0xb764b3ad in w_t_unref (foo=0x847bb10, flags=2147483649, bar=0x0) at
>> tm.c:707
>> No locals.
>> #6  0x0811543a in exec_post_script_cb (msg=0x847bb10,
>> type=REQUEST_CB_TYPE) at script_cb.c:195
>> cb = 0x8867874
>> flags = 2147483649
>> #7  0x080e5a4e in receive_msg (
>> buf=0x82a89e0 "ACK 
>> sip:0...@10.80.13.54:5060;transport=udpSIP/2.0\r\nVia: SIP/2.0/UDP 
>> 10.200.3.39:5060;branch=z9hG4bK0a992e8d3052e85e5\r\nRoute:
>> \r\nMax-Forwards: 69\r\nFrom:
>> 554"..., len=, rcv_info=0xbf95b7fc) at receive.c:221
>> msg = 0x847bb10
>> ctx = {rec_lev = 137434160, run_flags = 0, last_retcode =
>> -1080707352, jmp_env = {{__jmpbuf = {-1224488143, 137089696, 137434092, 0,
>> -1080707248,
>> -1080707304}, __mask_was_saved = 0, __saved_mask = {__val
>> = {3079133424, 134556827, 3079002384, 0, 3214260024, 3070479287, 137089696,
>>   137434160, 3070572886, 3070573396, 228, 137347864,
>> 3214260056, 3077419768, 3079002384, 137089664, 4294967295, 3079131124,
>> 134556827,
>>   134535424, 1, 3079058382, 3079133864, 3079003192, 1, 1,
>> 0, 134555968, 0, 136548964, 3077419768, 142823652}

Re: [SR-Users] avp_db_query returning wrong data

2010-12-20 Thread Jijo
Hi All,

I applied the following patch which fixed the issue.

http://sip-router.org/tracker/index.php?do=details&task_id=97

Are we going to merge this patch to Kamailio 3.1.x?

Thanks
Jijo

On Wed, Nov 24, 2010 at 9:35 AM, Jijo  wrote:

> I'm using kamailio 3.1.0, so this is already in place.. Is there any other
> change happened after 3.1.0 release?
>
>
> On Wed, Nov 24, 2010 at 3:41 AM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>>
>>
>> On 11/24/10 12:59 AM, Alex Balashov wrote:
>>
>>> On 11/23/2010 06:41 PM, Jijo wrote:
>>>
>>>  Yes it work with many UDP children.
>>>>
>>>
>>> There were some concurrency issues with the Postgres module a while back,
>>> discovered after the 3.1.0 release.  I remember something about it because
>>> we are extremely heavy users of the Postgres module as well.
>>> Unfortunately, I can't find the thread.
>>>
>> here is the link to the commit:
>>
>>
>> http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=63c724b42d4c4ff45eaa660508d6358f3e894d0a
>>
>> Next day was backported to 3.0 branch as well. So if an earlier version is
>> used, you must updated to the latest.
>>
>> Cheers,
>> Daniel
>>
>>
>>> Try the latest git master HEAD:
>>>
>>>  git clone git://git.sip-router.org/sip-router
>>>  cd sip-router
>>>  make FLAVOUR=kamailio cfg
>>>  make all
>>>
>>> And see if it changes.
>>>
>>>
>> --
>> 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.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] CRASH on qm_free for simultaneous calls (V3.1.0)

2010-12-20 Thread Jijo
Hi Daniel,

Some more detail to this issue..

 if we call t_release after failure route with append branch, a double free
causes the crash because the transaction will be free again after the
t_relay of ACK message. This happens because we compile the code with
DBG_QM_MALLOC.
wt_timer keeps the transaction active for 5 seconds. And I think if the
DBG_QM_MALLOC is not used, the crash happens in the timer proccess during
the wt time (when the 1st call is diconnected before this time).

Thanks
Jijo


On Fri, Dec 17, 2010 at 5:09 PM, Daniel-Constantin Mierla  wrote:

>  Hello,
>
>
> On 12/17/10 12:58 AM, Jijo wrote:
>
> Hi Daniel..
>
> This was due to an error in our config file.
>
> We were doing t_release and then t_relay. So we removed the t_release from
> config, which basically fixed the issue.
>
> thanks for further troubleshooting and reporting, I will check it and try
> to prevent the crash -- even it is a misusage should be nicer dealt with
> printing an error message.
>
> Cheers,
> Daniel
>
>
>
> On Thu, Dec 16, 2010 at 2:16 PM, Jijo  wrote:
>
>> Hi Daniel,
>>
>> Thanks..Please find the logs
>>
>> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
>> BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
>> free_cell(141) - aborting
>> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [pass_fd.c:293]:
>> ERROR: receive_fd: EOF on 11
>> 2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:741]:
>> child process 14398 exited by a signal 6
>> 2010-12-17T10:29:04+00:00 [alert] sipserver: ALERT:  [main.c:744]:
>> core was generated
>> 2010-12-17T10:29:04+00:00 [crit] sipserver: :  [mem/q_malloc.c:446]:
>> BUG: qm_free: freeing already freed pointer, first free: tm: h_table.c:
>> free_cell(141) - aborting
>>
>>
>> Jijo
>>
>>
>> On Thu, Dec 16, 2010 at 1:27 AM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>>  Hello,
>>>
>>> look into syslog file (/var/log/syslog or /var/log/messages if you didn't
>>> set a custom one) and search for a message like "BUG: qm_free: freeing
>>> already freed pointer ...".. Send it here, seems to be a double free of same
>>> pointer.
>>>
>>> Thanks,
>>> Daniel
>>>
>>>
>>> On 12/16/10 12:34 AM, Jijo wrote:
>>>
>>>  I'm observing a crash on qm_free, when we made two outgoing calls to
>>> the same number. One SIP phone receives ring back tone and the other busy
>>> tone. The back trace is shown below which shows that it is crashed in
>>> abort(). How can the condition   if (f->u.is_free){ could be true?
>>> Please let me know if anybody observed this issue and let me know how to
>>> debug this isssue.
>>>
>>> f=(struct qm_frag*) ((char*)p-sizeof(struct qm_frag));
>>> #ifdef DBG_QM_MALLOC
>>> qm_debug_frag(qm, f);
>>> if (f->u.is_free){
>>> LOG(L_CRIT, "BUG: qm_free: freeing already freed pointer,"
>>> " first free: %s: %s(%ld) - aborting\n",
>>> f->file, f->func, f->line);*
>>> abort();*
>>> }
>>> MDBG("qm_free: freeing frag. %p alloc'ed from %s: %s(%ld)\n",
>>> f, f->file, f->func, f->line);
>>> #endif
>>>
>>>
>>> BACKTRACE
>>> ---
>>>
>>>
>>> Program received signal SIGABRT, Aborted.
>>> 0xb76fd7a5 in raise () from /lib/libc.so.6
>>> (gdb) bt full
>>> #0  0xb76fd7a5 in raise () from /lib/libc.so.6
>>> No symbol table info available.
>>> #1  0xb76ff070 in abort () from /lib/libc.so.6
>>> No symbol table info available.
>>> #2  0x081824d5 in qm_free (qm=0xaf7ee000, p=0xaf9ed758, file=0xb7659aed
>>> "tm: h_table.c", func=0xb7659c9c "free_cell", line=141) at
>>> mem/q_malloc.c:447
>>> f = 
>>> prev = 
>>> next = 
>>> size = 
>>> #3  0xb75ff6b9 in free_cell (dead_cell=0xaf9e7054) at h_table.c:141
>>> b = 
>>> i = 
>>> rpl = 
>>> tt = 
>>> foo = 
>>> cbs = 
>>> cbs_tmp = 
>>> __FUNCTION__ = "free_cell"
>>> #4  0xb7625eb0 in t_unref (p_msg=0x847bb10) at t_lookup.c:1553
>>> kr = 
>>> #5  0xb764b3ad in w_t_unref (foo=0x847bb10, flags=2147483649, bar

[SR-Users] function get_user_group: parameter 1 is not constant

2010-12-30 Thread Jijo
I'm getting following config error when i use the api from group module.

CSBC-JJ:/srv/www/htdocs/core # /usr/sbin/kamailio -c -f
/etc/kamailio/kamailio.cfg
loading modules under
/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/
 0(5020) :  [cfg.y:3412]: parse error in config file
/etc/kamailio/kamailio.cfg, line 455, column 20-36: function get_user_group:
parameter 1 is not constant

 0(5020) :  [cfg.y:3415]: parse error in config file
/etc/kamailio/kamailio.cfg, line 455, column 48: bad command
 0(5020) INFO: pv [pv_shv.c:61]: locks array size 16
ERROR: bad config file (2 errors)

I have used the API get_user_group as shown below


$avp(r_contact)=$ru;
$avp(temp)=$null;
get_user_group($avp(reg_contact),$avp(temp));
xlog("L_ERR", "request - M=$rm get_user_group=$avp(temp)\n\n");


Please let me know what could be reason for this error.

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


[SR-Users] Kamailio CFG file size ??

2011-01-26 Thread Jijo
Hi All,

is there any limitation on the size of kamailo.cfg file. When i tried to add
few avp_subst, then the kamailio starts showing up the error out of package
memory on receiving SIP message. If i remove those lines then everything
works fine.. avp_subst is simple one.  Our kamailio cfg file is quite big..

Please let me know how to debug this issue?

Here is the error
 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [db_row.c:116]: no
private memory left
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
[km_res.c:293]: could not allocate row
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
[km_res.c:258]: failed to convert row #1
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres [km_res.c:75]:
failed to convert rows
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
[km_dbase.c:416]: error while converting result
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [db_query.c:137]:
error while storing result
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: avpops [avpops_db.c:333]:
cannot do the query
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: maxfwd [mf_funcs.c:62]:
parsing MAX_FORWARD header failed!
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: rr [loose.c:98]: failed to
parse headers
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: siputils [checks.c:64]: To
parsing failed
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [action.c:831]:
ERROR: do_action: memory allocation  failure
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [action.c:1511]:
run action error at: :0
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: pv [pv_core.c:1761]: do
action failed
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [lvalue.c:358]:
setting pvar failed
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/parse_from.c:71]: ERROR:parse_from_header: out of pkg_memory
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [route.c:1846]:
ERROR: eval_elem: bad or missing From: header
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
[msg_translator.c:2229]: ERROR: build_res_buf_from_sip_req: alas,
parse_headers failed
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:170]: get_hdr_field: out of memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: rr [loose.c:70]: failed to
parse To header field
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:170]: get_hdr_field: out of memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: siputils [checks.c:64]: To
parsing failed
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [action.c:831]:
ERROR: do_action: memory allocation  failure
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [action.c:1511]:
run action error at: :0
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: pv [pv_core.c:1740]: do
action failed)
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [lvalue.c:358]:
setting pvar failed
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:170]: get_hdr_field: out of memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:170]: get_hdr_field: out of memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: pv [pv_core.c:1381]: error
parsing headers
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [data_lump.c:318]:
ERROR: del_lump: out of memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: textops [textops.c:1081]:
no memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/parse_from.c:71]: ERROR:parse_from_header: out of pkg_memory
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [route.c:1846]:
ERROR: eval_elem: bad or missing From: header
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: pv [pv_svar.c:117]: out of
pkg mem!
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: pv [pv_core.c:1640]: error
- cannot set svar [backLinkMode]
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [lvalue.c:358]:
setting pvar failed
2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
[parser/parse_from.c:71]: ERROR:parse_from_header: out 

Re: [SR-Users] Kamailio CFG file size ??

2011-01-26 Thread Jijo
I forgot to mention the kamailio information


kamailio -V
version: kamailio 3.1.0 (i386/linux) 21a375
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, PKG_SIZE 10MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 21a375
compiled on 15:13:13 Jan 14 2011 with gcc 4.5.0




On Wed, Jan 26, 2011 at 3:31 PM, Jijo  wrote:

>
> Hi All,
>
> is there any limitation on the size of kamailo.cfg file. When i tried to
> add few avp_subst, then the kamailio starts showing up the error out of
> package memory on receiving SIP message. If i remove those lines then
> everything works fine.. avp_subst is simple one.  Our kamailio cfg file is
> quite big..
>
> Please let me know how to debug this issue?
>
> Here is the error
>  2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [db_row.c:116]:
> no private memory left
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
> [km_res.c:293]: could not allocate row
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
> [km_res.c:258]: failed to convert row #1
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
> [km_res.c:75]: failed to convert rows
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: db_postgres
> [km_dbase.c:416]: error while converting result
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [db_query.c:137]:
> error while storing result
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: avpops [avpops_db.c:333]:
> cannot do the query
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: maxfwd [mf_funcs.c:62]:
> parsing MAX_FORWARD header failed!
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: rr [loose.c:98]: failed
> to parse headers
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: siputils [checks.c:64]:
> To parsing failed
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [action.c:831]:
> ERROR: do_action: memory allocation  failure
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [action.c:1511]:
> run action error at: :0
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: pv [pv_core.c:1761]: do
> action failed
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [lvalue.c:358]:
> setting pvar failed
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/parse_from.c:71]: ERROR:parse_from_header: out of pkg_memory
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR:  [route.c:1846]:
> ERROR: eval_elem: bad or missing From: header
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:342]: ERROR:parse_headers: memory allocation error
> 2011-01-26T15:18:02-05:00 [err] sipserver: ERROR: 
> [msg_translator.c:2229]: ERROR: build_res_buf_from_sip_req: alas,
> parse_headers failed
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:170]: get_hdr_field: out of memory
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: rr [loose.c:70]: failed
> to parse To header field
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:170]: get_hdr_field: out of memory
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: siputils [checks.c:64]:
> To parsing failed
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [action.c:831]:
> ERROR: do_action: memory allocation  failure
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [action.c:1511]:
> run action error at: :0
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: pv [pv_core.c:1740]: do
> action failed)
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR:  [lvalue.c:358]:
> setting pvar failed
> 2011-01-26T15:18:07-05:00 [err] sipserver: ERROR: 
> [parser/msg_parser.c:170]: get_hdr_field: out of memory
> 2011-01-26T15:18:07-05:00 [err] sipserver: ER

Re: [SR-Users] Kamailio CFG file size ??

2011-01-27 Thread Jijo
Package mem size used is 10MB

Regards,
Jijo

On Jan 27, 2011, at 6:44 AM, marius zbihlei  wrote:

> On 01/26/2011 10:31 PM, Jijo wrote:
>> Hi All,
>> is there any limitation on the size of kamailo.cfg file. When i tried to add 
>> few avp_subst, then the kamailio starts showing up the error out of package 
>> memory on receiving SIP message. If i remove those lines then everything 
>> works fine.. avp_subst is simple one.  Our kamailio cfg file is quite big..
>> Please let me know how to debug this issue?
>> 
> Hello ,
> 
> You can increase the private memory size. The default value (4 MB afaik) 
> might be to small. You should try with at least 10 MB. Check -DPKG_MEM_SIZE 
> flag and set it to 10 when compiling. (Or alternatively edit config.h)
> 
> 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


[SR-Users] AVP Error in version 3.1.0

2011-02-15 Thread Jijo
Hi All,

On register we store the contact in an avp variable and do a t_relay().
After t_relay() the $avp variable becomes null.
I printed the value before after t_relay() to determine this behavior.
This happens only on registration load test around 2000 subcribers with ( 4
REGISTER/sec).  This happens only for one subscriber out of 2000
subscribers.

I did the similar test with $var and its working fine.

Anybody observed similar behavior with avp? This was working in kamailio 1.4
version. We did the upgrade recently to 3.1.0 and started observing this
issue.

How do we debug this issue.?


Thanks
Jijo
___
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 Error in version 3.1.0

2011-02-16 Thread Jijo
 Hi Daniel,

Please find the code and corresponding error trace. This happens only for 1
subscriber randomly out of 2000 subscribers. This can be reproduced
consistently also.

route(1)
{
:
:
:

# -
# Registration handling dynamic endpoints
# -

$avp(reg_contact)= $ct;
$var(reg_contact)= $ct;
t_on_reply("3");

if(!is_avp_set("$avp(reg_contact)"))
xlog("L_ERR", "R1 - not set the reg_contact3 F=$fu T=$tu Ct=$ct
IP=$si CI=$ci var_contact:$var(reg_contact)\n");

 # relay
 if(!t_relay_to("0x3"))
{
xlog("L_ERR", "R1/R10 - Registration failed - M=$rm F=$fu T=$tu
CT=$ct IP=$si CI=$ci\n");
append_to_reply("Warning: 399 $Ri - R1 - Registration failed:
fail in relay in R10.\r\n");
sl_reply_error();
exit;
}

if(!is_avp_set("$avp(reg_contact)"))
xlog("L_ERR", "R1 - not set the reg_contact4 F=$fu T=$tu Ct=$ct
IP=$si CI=$ci var_contact:$var(reg_contact)\n");

xlog("L_ERR", "R1 - Saving Registration-2  save to location F=$fu
T=$tu Ct=$ct IP=$si CI=$ci reg_ct:$avp(reg_contact)\n");

 if(!isflagset(28) && is_avp_set("$avp(reg_contact)")) # Check if we
need to save it in location table
{
if(!save("location","0x02"))
{
xlog("L_ERR", "R1 - Location save for Registration failed -
M=$rm F=$fu T=$tu IP=$si CT=$ct\n");
}
}

LOGS for the error condtion.


2011-02-15T12:19:30-05:00 [err] sipserver: ERROR: 

Re: [SR-Users] AVP Error in version 3.1.0

2011-02-20 Thread Jijo
Yes this happens in a testing environment..
I got your point, we saved after t-relay to send the message faster as db save 
can cause delay.
We will make the changes as per your suggestion .
Thanks
Jijo

On Feb 18, 2011, at 4:11 AM, Daniel-Constantin Mierla  wrote:

> Hello,
> 
> is any particular reason to do the processing after t_relay() ? You can do 
> the save before, since it is the same register message.
> 
> Also, are you getting this in a testing environment while using tools like 
> sipp to simulate traffic?
> 
> Starting with 3.0, the AVPs (which are associated with the message and 
> transaction in this case) become available in onreply_route[3] (in 1.x that 
> was a config option for tm module), so if it is fast reply, it my happen that 
> the avps are no longer available in the script after t_relay().
> 
> As a recommended rule, it is better to avoid using avps after t_relay() - 
> this function creates the transaction and forwards the message. From there 
> on, the avps are in the hands of tm module, which moves them to onreply_route 
> or failure_route, depending on your config file.
> 
> Cheers,
> Daniel
> 
> On 2/16/11 4:28 PM, Jijo wrote:
>> 
>> Hi Daniel,
>> 
>> Please find the code and corresponding error trace. This happens only for 1 
>> subscriber randomly out of 2000 subscribers. This can be reproduced 
>> consistently also.
>> 
>> route(1)
>> {
>> :
>> :
>> :
>> 
>> # -
>> # Registration handling dynamic endpoints
>> # -
>>  
>> $avp(reg_contact)= $ct;
>> $var(reg_contact)= $ct;
>> t_on_reply("3");
>> 
>> if(!is_avp_set("$avp(reg_contact)")) 
>> xlog("L_ERR", "R1 - not set the reg_contact3 F=$fu T=$tu Ct=$ct 
>> IP=$si CI=$ci var_contact:$var(reg_contact)\n");
>>  
>>  # relay
>>  if(!t_relay_to("0x3"))
>> {
>> xlog("L_ERR", "R1/R10 - Registration failed - M=$rm F=$fu T=$tu 
>> CT=$ct IP=$si CI=$ci\n");
>> append_to_reply("Warning: 399 $Ri - R1 - Registration failed: 
>> fail in relay in R10.\r\n");
>> sl_reply_error();
>> exit;
>> }
>> 
>> if(!is_avp_set("$avp(reg_contact)")) 
>> xlog("L_ERR", "R1 - not set the reg_contact4 F=$fu T=$tu Ct=$ct 
>> IP=$si CI=$ci var_contact:$var(reg_contact)\n");
>> 
>> xlog("L_ERR", "R1 - Saving Registration-2  save to location F=$fu 
>> T=$tu Ct=$ct IP=$si CI=$ci reg_ct:$avp(reg_contact)\n");
>>  
>>  if(!isflagset(28) && is_avp_set("$avp(reg_contact)")) # Check if we 
>> need to save it in location table
>> {
>> if(!save("location","0x02"))
>> {
>> xlog("L_ERR", "R1 - Location save for Registration failed - 
>> M=$rm F=$fu T=$tu IP=$si CT=$ct\n");
>> }
>> }
>>  
>> LOGS for the error condtion.
>>  
>> 
>> 2011-02-15T12:19:30-05:00 [err] sipserver: ERROR: 

Re: [SR-Users] AVP Error in version 3.1.0

2011-02-21 Thread Jijo
One more reason for string after t_relay is, If t_relay failed then we don't
need to save in the location table.

Thanks
Jijo

On Sun, Feb 20, 2011 at 12:53 PM, Jijo  wrote:

> Yes this happens in a testing environment..
> I got your point, we saved after t-relay to send the message faster as db
> save can cause delay.
> We will make the changes as per your suggestion .
> Thanks
> Jijo
>
> On Feb 18, 2011, at 4:11 AM, Daniel-Constantin Mierla 
> wrote:
>
> Hello,
>
> is any particular reason to do the processing after t_relay() ? You can do
> the save before, since it is the same register message.
>
> Also, are you getting this in a testing environment while using tools like
> sipp to simulate traffic?
>
> Starting with 3.0, the AVPs (which are associated with the message and
> transaction in this case) become available in onreply_route[3] (in 1.x that
> was a config option for tm module), so if it is fast reply, it my happen
> that the avps are no longer available in the script after t_relay().
>
> As a recommended rule, it is better to avoid using avps after t_relay() -
> this function creates the transaction and forwards the message. From there
> on, the avps are in the hands of tm module, which moves them to
> onreply_route or failure_route, depending on your config file.
>
> Cheers,
> Daniel
>
> On 2/16/11 4:28 PM, Jijo wrote:
>
>  Hi Daniel,
>
> Please find the code and corresponding error trace. This happens only for 1
> subscriber randomly out of 2000 subscribers. This can be reproduced
> consistently also.
>
> route(1)
> {
> :
> :
> :
>
> # -
> # Registration handling dynamic endpoints
> # -
>
> $avp(reg_contact)= $ct;
> $var(reg_contact)= $ct;
> t_on_reply("3");
>
> if(!is_avp_set("$avp(reg_contact)"))
> xlog("L_ERR", "R1 - not set the reg_contact3 F=$fu T=$tu Ct=$ct
> IP=$si CI=$ci var_contact:$var(reg_contact)\n");
>
>  # relay
>  if(!t_relay_to("0x3"))
> {
> xlog("L_ERR", "R1/R10 - Registration failed - M=$rm F=$fu T=$tu
> CT=$ct IP=$si CI=$ci\n");
> append_to_reply("Warning: 399 $Ri - R1 - Registration failed:
> fail in relay in R10.\r\n");
> sl_reply_error();
> exit;
> }
>
> if(!is_avp_set("$avp(reg_contact)"))
> xlog("L_ERR", "R1 - not set the reg_contact4 F=$fu T=$tu Ct=$ct
> IP=$si CI=$ci var_contact:$var(reg_contact)\n");
>
> xlog("L_ERR", "R1 - Saving Registration-2  save to location F=$fu
> T=$tu Ct=$ct IP=$si CI=$ci reg_ct:$avp(reg_contact)\n");
>
>  if(!isflagset(28) && is_avp_set("$avp(reg_contact)")) # Check if
> we need to save it in location table
> {
> if(!save("location","0x02"))
> {
> xlog("L_ERR", "R1 - Location save for Registration failed -
> M=$rm F=$fu T=$tu IP=$si CT=$ct\n");
> }
> }
>
> LOGS for the error condtion.
>
>
> 2011-02-15T12:19:30-05:00 [err] sipserver: ERROR: 

[SR-Users] Fwd: 200OK Retransmission Error

2011-06-14 Thread Jijo
Hi All,

In an INVITE transaction, no ACK from A party and B party continue
retransmission of 200 OK. I have observed that kamailio is not passing the
retransmitted 200 OK message from B party to the Application(script) after 3
seconds. Instead kamailio directly sending to A party without passing to the
script.

I see in the logs that kamailio is cleaning up the transaction after 3
seconds..look for the string "DEBUG: t_lookup_request: no transaction
found"  before this log it is cleaning up the timer in the log "DEBUG:
cleanup_uac_timers: RETR/FR timers reset"

What does it mean by that??
How can we make the kamailio to pass the response to the application?

Please let me know your comments.. Here is the flow. I cannot send the
complete logs which is quite big. so i grep'd using the stirng
"tcp_read_req:
content-length|get_hdr_field|t_reply_matching|cleanup_uac_timers|RR11" from
the complete log..

A kamailo B

INVITE-->- INVITE

180 Ringing--<---180 Ringing
200 OK---<---200 OK 0
200 OK---<---200 OK 500ms
200 OK---<---200 OK 1s
200 OK---<---200 OK 2s

< From here it is not passing to the application- script>

200 OK---<---200 OK 4s
200 OK---<---200 OK 4s



  28 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
[parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [50]; uri=[
sip:5616990102@192.168.243.151:5060]
  36 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
[parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
  267 86:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[tcp_read.c:933]: tcp_read_req: content-length= 0
  282 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [65]; uri=[
sip:5616990102@192.168.243.151:5060]
  284 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
  285 89:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: tm
[t_lookup.c:967]: DEBUG: t_reply_matching: hash 5084 label 418362480 branch
0
  286 90:2011-06-13T19:47:38+01:00 [debug] sipserver: [26269] DEBUG: tm
[t_lookup.c:1018]: DEBUG: t_reply_matching: reply matched (T=0xb0f62e50)!
  292 96:2011-06-13T19:47:38+01:00 [info] sipserver: [26269] INFO: 

[SR-Users] 200 OK Retransmission Error

2011-06-14 Thread Jijo
Hi All,

In an INVITE transaction, no ACK from A party and B party continue
retransmission of 200 OK. I have observed that kamailio is not passing the
retransmitted 200 OK message from B party to the Application(script) after 3
seconds. Instead kamailio directly sending to A party without passing to the
script.

I see in the logs that kamailio is cleaning up the transaction after 3
seconds..look for the string "DEBUG: t_lookup_request: no transaction
found"  before this log it is cleaning up the timer in the log "DEBUG:
cleanup_uac_timers: RETR/FR timers reset"

What does it mean by that??
How can we make the kamailio to pass the response to the application?

Please let me know your comments.. Here is the flow. I cannot send the
complete logs which is quite big. so i grep'd using the stirng
"tcp_read_req:
content-length|get_hdr_field|t_reply_matching|cleanup_uac_timers|RR11" from
the complete log..

A kamailo B

INVITE-->- INVITE

180 Ringing--<---180 Ringing
200 OK---<---200 OK 0
200 OK---<---200 OK 500ms
200 OK---<---200 OK 1s
200 OK---<---200 OK 2s

< From here it is not passing to the application- script>

200 OK---<---200 OK 4s
200 OK---<---200 OK 4s



  28 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
[parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [50]; uri=[
sip:5616990102@192.168.243.151:5060]
  36 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
[parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
  267 86:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[tcp_read.c:933]: tcp_read_req: content-length= 0
  282 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [65]; uri=[
sip:5616990102@192.168.243.151:5060]
  284 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
[parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
  285 89:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: tm
[t_lookup.c:967]: DEBUG: t_reply_matching: hash 5084 label 418362480 branch
0
  286 90:2011-06-13T19:47:38+01:00 [debug] sipserver: [26269] DEBUG: tm
[t_lookup.c:1018]: DEBUG: t_reply_matching: reply matched (T=0xb0f62e50)!
  292 96:2011-06-13T19:47:38+01:00 [info] sipserver: [26269] INFO: 

Re: [SR-Users] 200 OK Retransmission Error

2011-06-15 Thread Jijo
Hi Daniel,

Thanks.. Is there any side effects if we increase the wt_timer to 32secs to
match with the INVITE transaction timer?

regards,
Jijo
On Wed, Jun 15, 2011 at 3:52 AM, Daniel-Constantin Mierla  wrote:

> Hello,
>
>
> On 6/15/11 6:16 AM, Jijo wrote:
>
>
>
>  Hi All,
>
> In an INVITE transaction, no ACK from A party and B party continue
> retransmission of 200 OK. I have observed that kamailio is not passing the
> retransmitted 200 OK message from B party to the Application(script) after 3
> seconds. Instead kamailio directly sending to A party without passing to the
> script.
>
> what do you mean "without passing to the script"?
>
> Note that a transaction is completed when a final reply is forwarded back
> to the sender of request. Then it is kept fore a short time in memory, if
> you want to increase that interval, see this parameter in tm:
>
> http://kamailio.org/docs/modules/stable/modules/tm.html#wt_timer
>
> Cheers,
> Daniel
>
>
>  I see in the logs that kamailio is cleaning up the transaction after 3
> seconds..look for the string "DEBUG: t_lookup_request: no transaction
> found"  before this log it is cleaning up the timer in the log "DEBUG:
> cleanup_uac_timers: RETR/FR timers reset"
>
> What does it mean by that??
> How can we make the kamailio to pass the response to the application?
>
> Please let me know your comments.. Here is the flow. I cannot send the
> complete logs which is quite big. so i grep'd using the stirng
> "tcp_read_req:
> content-length|get_hdr_field|t_reply_matching|cleanup_uac_timers|RR11" from
> the complete log..
>
> A kamailo B
>
> INVITE-->- INVITE
>
> 180 Ringing--<---180 Ringing
> 200 OK---<---200 OK 0
> 200 OK---<---200 OK 500ms
> 200 OK---<---200 OK 1s
> 200 OK---<---200 OK 2s
>
> < From here it is not passing to the application- script>
>
> 200 OK---<---200 OK 4s
> 200 OK---<---200 OK 4s
>
>
>
>   28 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
> [parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [50]; uri=[
> sip:5616990102@192.168.243.151:5060]
>   36 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26177] DEBUG: 
> [parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
>   267 86:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
> [tcp_read.c:933]: tcp_read_req: content-length= 0
>   282 102:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG:
>  [parser/msg_parser.c:185]: DEBUG: get_hdr_field:  [65]; uri=[
> sip:5616990102@192.168.243.151:5060]
>   284 95:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: 
> [parser/msg_parser.c:165]: get_hdr_field: cseq : <1> 
>   285 89:2011-06-13T19:47:37+01:00 [debug] sipserver: [26269] DEBUG: tm
> [t_lookup.c:967]: DEBUG: t_reply_matching: hash 5084 label 418362480 branch
> 0
>   286 90:2011-06-13T19:47:38+01:00 [debug] sipserver: [26269] DEBUG: tm
> [t_lookup.c:1018]: DEBUG: t_reply_matching: reply matched (T=0xb0f62e50)!
>   292 96:2011-06-13T19:47:38+01:00 [info] sipserver: [26269] INFO:
> 

[SR-Users] decode_mime_type error

2011-08-17 Thread Jijo
Hi All,

The function parse_content_type_hdr() is failing in decode_mime_type() when
Content-Type parameter "boundary" has value comma as below. The error
message is "ERROR:parse_content_type_hdr: CONTENT_TYPE hdr contains "
"more then one mime type :-(!

Content Type Header is as below, It works fine if the boundary value is
without comma.

Content-Type: multipart/mixed;boundary="*,*AW"

The parse_content_type_hdr() is failing in the following code,

ret = decode_mime_type(msg->content_type->body.s, end , &mime);
if (ret==0)
goto error;
if (ret!=end) {

 LOG(L_INFO,"ERROR:parse_content_type_hdr: CONTENT_TYPE hdr contains
"
"more then one mime type :-(!\n");
   goto error ;
}

I thought of fixing this issue by commenting the code for condition ret
!=end. I'm  not sure why we we need that check, as mime variable has the
information to process the content.

Please let me know if you see any impact.

Thanks
Jijo
___
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] decode_mime_type error

2011-08-18 Thread Jijo
Hi Marius,

Thanks for the response.. I checked the other functions, but they don't have
the check for ret !=end, but they check the pointer and if it is comma then
loop through again until it find all the media types.

As per the RFC3261 multiple media-types are not supoorted in the
Content-Type. So I'm not sure why the author used comma to determine
multiple media types . Probably just followed like Route or Record-Route
headers..??

Content-Type <http://rfc-ref.org/RFC-TEXTS/3261/kw-content_type.html>
   =  ( "Content-Type
<http://rfc-ref.org/RFC-TEXTS/3261/kw-content_type.html>" / "c" )
HCOLON media-type
<http://rfc-ref.org/RFC-TEXTS/3261/kw-media-type.html>
media-type <http://rfc-ref.org/RFC-TEXTS/3261/kw-media-type.html>
 =  m-type SLASH m-subtype *(SEMI m-parameter)
m-type   =  discrete-type / composite
<http://rfc-ref.org/RFC-TEXTS/3261/kw-composite.html>-type
discrete-type=  "text" / "image
<http://rfc-ref.org/RFC-TEXTS/3261/kw-image.html>" / "audio
<http://rfc-ref.org/RFC-TEXTS/3261/kw-audio.html>" / "video"
/ "application" / extension-token
<http://rfc-ref.org/RFC-TEXTS/3261/kw-token.html>
composite <http://rfc-ref.org/RFC-TEXTS/3261/kw-composite.html>-type
=  "message" / "multipart" / extension-token
<http://rfc-ref.org/RFC-TEXTS/3261/kw-token.html>

   Record-Route  =  "Record-Route" HCOLON rec-route *(COMMA rec-route)

Thanks
Jijo



On Thu, Aug 18, 2011 at 2:23 AM, Bucur Marius  wrote:

> Hello Jijo,
>
> It seems like the decode_mime_type is a somehow broken. The comma is very
> well allowed in boundary, as you said. The BNF specified in RFC2046 permits
> it.
> But, the decode_mime_type function ignores everything coming after comma.
> More than that, it notifies the function caller that this content type has
> multiple mime types.
> I think the author of the function thought of something like:
>
> Content-Type: text/html, image/jpeg // very weird, though
>
> This is wrong, hence the comma can be in a parameter (like in your case).
> I think the best fix, as you said is to remove that check, hence a non-NULL
> return value doesn't mean anything (that the content type has multiple mime
> types).
> Another fix is to write a "good" decode_mime_type, that checks if the comma
> is inside a parameter. I don't know if effort is worth it.
>
> One thing we need to do is to check if there are any functions in Kamailio
> that call decode_mime_type and also perform this check (ret != end).
>
> Cheers,
> Marius
>
>
> 
> From: Jijo 
> To: sr-users@lists.sip-router.org; sr-...@lists.sip-router.org
> Sent: Wednesday, August 17, 2011 10:54 AM
> Subject: [SR-Users] decode_mime_type error
>
>
> Hi All,
>
> The function parse_content_type_hdr() is failing in decode_mime_type() when
> Content-Type parameter "boundary" has value comma as below. The error
> message is "ERROR:parse_content_type_hdr: CONTENT_TYPE hdr contains "
> "more then one mime type :-(!
>
> Content Type Header is as below, It works fine if the boundary value is
> without comma.
>
> Content-Type: multipart/mixed;boundary=",AW"
>
> The parse_content_type_hdr() is failing in the following code,
>
> ret = decode_mime_type(msg->content_type->body.s, end , &mime);
> if (ret==0)
> goto error;
> if (ret!=end) {
>
>  LOG(L_INFO,"ERROR:parse_content_type_hdr: CONTENT_TYPE hdr
> contains "
> "more then one mime type :-(!\n");
>goto error ;
> }
>
> I thought of fixing this issue by commenting the code for condition ret
> !=end. I'm  not sure why we we need that check, as mime variable has the
> information to process the content.
>
> Please let me know if you see any impact.
>
> Thanks
> Jijo
>
>
>
>
>
> ___
> 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] decode_mime_type error

2011-08-19 Thread Jijo
Hi Marius,

The existing implementation is done considering the limitation of
decode_mime_type but somehow missed the change in parse_content_type_hdr. I
agree with you that its better to do the change in decode_mime_type as it is
common for lot of other callers..

Regarding the example you pointed,
According to my understanding from the code, I believe that existing
implementation for parse_accept_body shall work as the mime types are
predefined. So in the example you pointed for second invocation 'some value'
is not a defined mime type as it not matching with predefined types. The
decode_mime_type returns end pointer and parse_accept_body shall process
only with the valid mime type text/plain.

another  example with multiple mime types..,
Accept: text/html, multipart/mixed
In this case parse_accept_body returns 2 mime types as both are predefined
in the list.

Thanks
Jijo


On Thu, Aug 18, 2011 at 5:58 PM, Bucur Marius  wrote:

> Hi Jijo,
>
> In my opinion, decode_mime_type is broken, and parse_accept_body does not
> work as expected.
> For example, this is a valid accept header:
>
> accept: text/plain;param=",some value".
>
> but the parse_accept_body will return -1 because the first return value of
> decode_mime_type is ",some value\"". The second invocation will think "some
> value\"" is a mime type, which obviously isn't.
>
> I must say I never saw such an accept header, but the standard permits it.
> Indeed, a quick fix would be to ignore the return code when comma is found.
> This must be done for other functions that call decode_mime_type
> like has_body(mime) in textops.
>
> This is just my opinion, but I think this solution is a bit hackish since
> the convention, the "promise" that decode_mime_type should respect is to
> return a non-NULL, non-end pointer ONLY when there are more mime types in
> the body. And it doesn't.
> A lot of functions that call it rely on this. I think it is easier/more
> elegant to fix the bug in the decode_mime_type then to change the function
> convention in all callers.
> Also, this might work for most callers, but parse_accept_body will still be
> buggy, as I explained in the example above.
>
> Cheers,
> Marius
>
> 
> From: Jijo 
> To: Bucur Marius 
> Sent: Thursday, August 18, 2011 10:48 AM
> Subject: Re: [SR-Users] decode_mime_type error
>
>
> Hi Marius,
>
> Right, the same function is used for Accept and  Content-Type.
>
> I don't think there is any change required for parsing Accept. In case of
> Accept the function decode_mime_type is called in a loop until it find all
> the media types. On the returning from decode_mime_type(), the main function
> parse_accept_xxx() checks the pointer is 'comma' or not. if its comma, then
> the function  decode_mime_type called again and find the remaining media
> types. So i  think the existing implementation for Parsing Accept is fine.
>
> The only change required here is not return error for comma while parsing
> the Content-Type.
>
> Thanks
> Jijo
>
>
> On Thu, Aug 18, 2011 at 12:32 PM, Bucur Marius <
> bucur_marius_ovi...@yahoo.com> wrote:
>
> Hello Jijo,
> >
> >You are right, multiple mime-types are not allowed. But it seems like
> decode_mime_type had the purpose of also parsing the Accept header:
> >
> >Accept: text/html, image/jpeg, multipart
> >
> >hence the search for commas :).
> >The only function that uses this feature and calls decode_mime_type in a
> loop is parse_accept_body. The other functions that call decode_mime_type
> just fail when returning ret != end, and since multiple mime types in
> content-type are not allowed the behavior is fine.
> >The bad thing is the Accept header can have mime parameters too (which can
> contain comma).
> >
> >Accept=  "Accept" HCOLON [ accept-range *(COMMA accept-range)
> ]
> >accept-range   =  media-range *(SEMI accept-param)
> >media-range=  ( "*/*" / ( m-type SLASH "*" ) / ( m-type SLASH
> m-subtype ) ) *( SEMI m-parameter )
> >
> >So I think the best thing would be to change decode_mime_type so that it
> does a more thorough parsing (e.g. check for parameter) hence a parameter
> value can contain commas (only if quoted).
> >
> >
> >Cheers,
> >
> >Marius
> >
> >From: Jijo 
> >To: Bucur Marius ; SIP Router - Kamailio
> (OpenSER) and SIP Express Router (SER) - Users Mailing List <
> sr-users@lists.sip-router.org>
> >Sent: Thursday, August 18, 2011 8:04 AM
> >Subject: Re: [SR-Users] decode_mime_type error
> >
>

Re: [SR-Users] decode_mime_type error

2011-08-22 Thread Jijo
Hi Marius,

You are right.. It will fail for parse_accept_body... I hope you will be
able to open this issue on bug tracker..

Thanks
Jijo

On Fri, Aug 19, 2011 at 10:12 PM, Bucur Marius <
bucur_marius_ovi...@yahoo.com> wrote:

> Hello Jijo,
>
> About the example I pointed, the parse_accept_body will fail and let me
> explain why.
> For the second invocation, 'some value' is not a valid mime type (a mime
> type is of form 'type/subtype'). When decode_mime_type will not find the '/'
> separator (see parse_content.c:310) it will fail, making parse_accept_body
> to fail too.
>
> If you want to test, just call parse_accept_body with the example I
> pointed, and you will see it returns -1 for my example (a valid accept
> header). This is, of course, bad behavior.
>
> Best regards,
> Marius
>
> --
> *From:* Jijo 
> *To:* Bucur Marius ;
> sr-users@lists.sip-router.org
> *Sent:* Friday, August 19, 2011 11:17 AM
>
> *Subject:* Re: [SR-Users] decode_mime_type error
>
> Hi Marius,
>
> The existing implementation is done considering the limitation of
> decode_mime_type but somehow missed the change in parse_content_type_hdr. I
> agree with you that its better to do the change in decode_mime_type as it is
> common for lot of other callers..
>
> Regarding the example you pointed,
> According to my understanding from the code, I believe that existing
> implementation for parse_accept_body shall work as the mime types are
> predefined. So in the example you pointed for second invocation 'some value'
> is not a defined mime type as it not matching with predefined types. The
> decode_mime_type returns end pointer and parse_accept_body shall process
> only with the valid mime type text/plain.
>
> another  example with multiple mime types..,
> Accept: text/html, multipart/mixed
> In this case parse_accept_body returns 2 mime types as both are predefined
> in the list.
>
> Thanks
> Jijo
>
>
> On Thu, Aug 18, 2011 at 5:58 PM, Bucur Marius <
> bucur_marius_ovi...@yahoo.com> wrote:
>
> Hi Jijo,
>
> In my opinion, decode_mime_type is broken, and parse_accept_body does not
> work as expected.
> For example, this is a valid accept header:
>
> accept: text/plain;param=",some value".
>
> but the parse_accept_body will return -1 because the first return value of
> decode_mime_type is ",some value\"". The second invocation will think "some
> value\"" is a mime type, which obviously isn't.
>
> I must say I never saw such an accept header, but the standard permits it.
> Indeed, a quick fix would be to ignore the return code when comma is found.
> This must be done for other functions that call decode_mime_type
> like has_body(mime) in textops.
>
> This is just my opinion, but I think this solution is a bit hackish since
> the convention, the "promise" that decode_mime_type should respect is to
> return a non-NULL, non-end pointer ONLY when there are more mime types in
> the body. And it doesn't.
> A lot of functions that call it rely on this. I think it is easier/more
> elegant to fix the bug in the decode_mime_type then to change the function
> convention in all callers.
> Also, this might work for most callers, but parse_accept_body will still be
> buggy, as I explained in the example above.
>
> Cheers,
> Marius
>
> 
> From: Jijo 
> To: Bucur Marius 
> Sent: Thursday, August 18, 2011 10:48 AM
> Subject: Re: [SR-Users] decode_mime_type error
>
>
> Hi Marius,
>
> Right, the same function is used for Accept and  Content-Type.
>
> I don't think there is any change required for parsing Accept. In case of
> Accept the function decode_mime_type is called in a loop until it find all
> the media types. On the returning from decode_mime_type(), the main function
> parse_accept_xxx() checks the pointer is 'comma' or not. if its comma, then
> the function  decode_mime_type called again and find the remaining media
> types. So i  think the existing implementation for Parsing Accept is fine.
>
> The only change required here is not return error for comma while parsing
> the Content-Type.
>
> Thanks
> Jijo
>
>
> On Thu, Aug 18, 2011 at 12:32 PM, Bucur Marius <
> bucur_marius_ovi...@yahoo.com> wrote:
>
> Hello Jijo,
> >
> >You are right, multiple mime-types are not allowed. But it seems like
> decode_mime_type had the purpose of also parsing the Accept header:
> >
> >Accept: text/html, image/jpeg, multipart
> >
> >hence the search for commas :).
> >The only function that uses this feature and c

Re: [SR-Users] Help

2012-12-07 Thread Jijo
Hi,

Considering the security aspect of SIP Trunk and the cost of dedicated TDM
trunk, the cheapest option for you is to use your home PSTN line as TDM
trunk..

To do that buy a PCI FXO card for Asterisk and setup the routing in
asterisk either directly to your lan SIP phone(Xlite) or via
openser/kamailio to Xlite. You can route all calls from SIP to PSTN and
Vice versa. You will be able to do international calls if your home pstn
phone has international plan.

The disadvantage here is you can do only 1 incoming call. I believe you can
do multiple outgoing call with FXO line. Good thing is you can test all
your capabilities before making the decision for dedicated trunk from
service provider.


Thanks
Jijo

On Fri, Dec 7, 2012 at 3:16 AM, Amar Tuladhar  wrote:

> HI,
>
> ** **
>
> For this you need connect to a telecom operator in India or a sip trunk
> provider. But I doubt that any telecom operator would do it. You can
> connect to an international SIP trunk provider. There will be lot’s of
> packages for rates and payments. You can easily search the internet for
> possible partners.
>
> ** **
>
> Cheers.
>
> Amar Tuladhar,
>
> Smart Telecom**
>
> ** **
>
> *From:* sr-users-boun...@lists.sip-router.org [mailto:
> sr-users-boun...@lists.sip-router.org] *On Behalf Of *ameneh pourmoghadas
> *Sent:* Friday, December 07, 2012 9:38 AM
> *To:* serus...@iptel.org
> *Subject:* [SR-Users] Help
>
> ** **
>
> Dear Admin,
>
> ** **
>
> My name is Ameneh from India. I am new in SIP. I have installed asterisk
> 1.8 on my ubuntu system and could have registered the internal users in my
> LAN to talk over x-lite. 
>
> ** **
>
> Now my question is how can I make a call to a mobile in India or a PSTN
> number in another country that would require a public SIP I think. 
>
> how can I make my SIP server as public? would you please help me? 
>
> ** **
>
> thanks and regards,
>
> Ameneh 
>
> ___
> 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] $var binary operation

2014-02-13 Thread Jijo
Hi

I tried the binary operation using $var as per the documentation and its
seems not working. Can somebody help me to understand it.

http://kamailio.org/dokuwiki/doku.php/pseudovariables:3.1.x

$var(a) = 3 + (7&(~2));

if( [ $var(a) & 4 ] ) {
  xlog("var a has third bit set\n");
}


The format with square bracket in the conditional statement is showing
parse error when i load the cfg. So it tried like below and that too not
working

$var(a) = 8;

if( $var(a) & 4 ) {
  xlog("var a has third bit set\n");
}

Please let me know if something missing here.?


Thanks
Jijo
___
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] $var binary operation

2014-02-13 Thread Jijo
I'm not getting any syntax error.
I found that we have to use the actual value instead of the bit.

$var(a) = 9;
   if( $var(a) & 8 ) {
 xlog("L_INFO","var a has third bit set\n");
   }
   if( $var(a) & 1 ) {
 xlog("L_INFO","var a has zero bit set\n");
   }

Output is

[SR-Users] Performance impact with AVP and VAR's

2014-02-20 Thread Jijo
Hi All,

I have around 300 AVP's and quite amount of VAR's are used in the config
file?  Does that impact performance?, If so how can i improve it?

Thanks
Jijo
___
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] Performance impact with AVP and VAR's

2014-02-20 Thread Jijo
We have defined dedicated AVP variables for each feature. For example, SIP
Trunks or Subscribers or Media Handling or Header Manipulation etc, So the
no of variables (AVP)  has been increased in the initialization.
At an instance the no of AVP's used/active might be quite low as each avp's
are dedicated for the feature.

Does avp read or write cause any Lock?

The VAR's has been used locally through out the route for header
manipulation and other functions.





On Thu, Feb 20, 2014 at 5:37 PM, Alex Balashov wrote:

> Can you give some example of your use cases for them?
>
> I cannot say for sure, but my intuition is that if you have three hundred
> variables in any program, you're doing something wrong. At that point
> you're in territory that clearly calls for some sort of non- scalar data
> structure, such as an associative array.
>
>
> Jijo  wrote:
>>
>> Hi All,
>>
>> I have around 300 AVP's and quite amount of VAR's are used in the config
>> file?  Does that impact performance?, If so how can i improve it?
>>
>> Thanks
>> Jijo
>>
>>
>> --
>>
>> 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
>>
>>
> --
> Sent from my mobile, and thus lacking in the refinement one might expect
> from a fully fledged keyboard.
>
> Alex Balashov - Principal
> Evariste Systems LLC
> 235 E Ponce de Leon Ave
> Suite 106
> Decatur, GA 30030
> United States
> Tel: +1-678-954-0671
> Web: http://www.evaristesys.com/, http://www.alexbalashov.com
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] XAVP in 3.1.6

2014-03-01 Thread Jijo
Hi

I'm trying to use XAVP but the script is showing parsing error.

Do i need to include any module? I rebuild kamailio using the flag
WITH_XAVP but didn' help.

route[0]
{


$xavp(a=>bar) = 'bar';

}

S-154:~ # /usr/sbin/kamailio -c -f /etc/kamailio/kam86x2.cfg
loading modules under
/usr/lib/kamailio/modules_k/:/usr/lib/kamailio/modules/
 0(20184) ERROR:  [pvapi.c:516]: error searching pvar "xavp"
 0(20184) ERROR:  [pvapi.c:720]: wrong char [a/97] in [$xavp(a=>bar)]
at [6 (5)]
 0(20184) :  [cfg.y:3461]: parse error in config file
/etc/kamailio/kam86x2.cfg, line 555, column 5-17: unknown script pseudo
variable $xavp(a=>bar)
ERROR: bad config file (1 errors)
Segmentation fault (core dumped)

S-154:~ #  /usr/sbin/kamailio -V
version: kamailio 3.1.6 (i386/linux) af51bc
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, PKG_SIZE 25MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: af51bc
compiled on 14:11:43 Feb 28 2014 with gcc 4.7.1





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