Re: [SR-Users] digest authentication based on two password columns

2016-10-28 Thread Jayesh Nambiar
Thanks Alex for the suggestion. Thanks Daniel, the flow you mentioned
worked just as expected.

- Jayesh

On Fri, Oct 28, 2016 at 6:34 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> you can do:
>
>
> if(!pv_auth_check(...passwd1...)) {
>
>if(!pv_auth_check(...passwd2...)) {
>
>  # do the challenge
>
>}
>
> }
> Cheers,
> Daniel
>
>
> On 28/10/16 13:41, Jayesh Nambiar wrote:
>
> Hello,
> I was wondering if it is possible to do a failover in digest
> authentication. For eg: I get two possible valid password values. Can I do
> a pv_proxy_authenticate in such a way where if authentication fails, I do a
> pv_proxy_autenticate again on the different value to check if that succeeds?
> Is it even allowed in digest authentication mechanism. Just getting
> opinions.
>
> Thanks for any help.
>
> - Jayesh
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Kamailio Advanced Training, Berlin, Nov 28-30, 2016 - http://www.asipto.com
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] digest authentication based on two password columns

2016-10-28 Thread Jayesh Nambiar
Hello,
I was wondering if it is possible to do a failover in digest
authentication. For eg: I get two possible valid password values. Can I do
a pv_proxy_authenticate in such a way where if authentication fails, I do a
pv_proxy_autenticate again on the different value to check if that succeeds?
Is it even allowed in digest authentication mechanism. Just getting
opinions.

Thanks for any help.

- Jayesh
___
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 with ubuntu 16.04

2016-09-19 Thread Jayesh Nambiar
Hi Daniel,
The latest stable release still shows up the TLS related problems. Is there
a way to load tls modules such that these errors get corrected?

- Jayesh

On Mon, Aug 1, 2016 at 5:10 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> not yet ... I didn't get the chance before starting a rather long trip to
> download the image for ubuntu 16.04 to spin a vm and now I don't have the
> bandwidth for fetching it.
>
> Cheers,
> Daniel
>
> On 01/08/16 13:32, Jayesh Nambiar wrote:
>
> Hi Daniel,
> Just checking if you had a chance to look at ssl libraries in Ubuntu16.04
> to check the conflict with TLS module? Thanks.
>
> - Jayesh
>
> On Tue, Jul 19, 2016 at 6:11 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> following up -- apparently there is some issue with the lib in ubuntu
>> 16.04, same module working fine in 15.10, as reported on the tracker:
>>
>>   - https://github.com/kamailio/kamailio/issues/714
>>
>> When I get a chance I will install a ubuntu 16.04 myself and dig more
>> into the libssl sources.
>>
>> Cheers,
>> Daniel
>>
>> On 18/07/16 14:46, Jayesh Nambiar wrote:
>>
>> Hi Daniel,
>>
>> Thanks for looking into this. I tried with this patch and still get the
>> same error. Here are the relevant part of logs:
>>
>>  0(25032) DEBUG:  [cfg.y:1603]: yyparse(): loading module tls.so
>>
>>  0(25032) DEBUG:  [sr_module.c:575]: load_module(): trying to load
>> 
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:189]: qm_malloc_init():
>> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:191]: qm_malloc_init():
>> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:193]: qm_malloc_init():
>> qm_malloc_init(0x7fda8249d000, 67108864), start=0x7fda8249d000
>>
>>  0(25032) DEBUG:  [mem/q_malloc.c:202]: qm_malloc_init():
>> qm_malloc_init: size= 67108864, init_overhead=235256
>>
>>  0(25032) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to set the
>> memory allocation functions
>>
>>  0(25032) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl current
>> mem functions - m: 0x7fda87673550 r: 0x7fda87673c40 f: 0x7fda87673a70
>>
>>  0(25032) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure tls
>> module is loaded before any other module using libssl (can be loaded first
>> to be safe)
>>
>>  0(25032) ERROR:  [sr_module.c:607]: load_module():
>> /usr/local/kamailio/lib64/kamailio/modules/tls.so: mod_register failed
>>
>>  0(25032) :  [cfg.y:3391]: yyerror_at(): parse error in config
>> file /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47,
>> column 12-19: failed to load module
>>
>>
>> Yes I can provide ssh access to this machine. I'll send it to you
>> seperately.
>>
>> Thanks,
>>
>> - Jayesh
>>
>>
>> On Mon, Jul 18, 2016 at 2:25 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> no time over the weekend to look at logs, but I pushed just now a patch
>>> to try to see if the memory functions were set or something else prevented
>>> the set of memory functions.
>>>
>>> Can you try with the patch:
>>>
>>>   -
>>> https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2735adfd2e
>>>
>>> I am at IEFT96 so I will try to do some stuff during the breaks... if
>>> doesn't work, then it may take a bit to get more into it.
>>>
>>> Just in case, would it be possible to get ssh access to such system?
>>>
>>> Cheers,
>>> Daniel
>>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>>
>>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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] tls with ubuntu 16.04

2016-08-01 Thread Jayesh Nambiar
Hi Daniel,
Just checking if you had a chance to look at ssl libraries in Ubuntu16.04
to check the conflict with TLS module? Thanks.

- Jayesh

On Tue, Jul 19, 2016 at 6:11 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> following up -- apparently there is some issue with the lib in ubuntu
> 16.04, same module working fine in 15.10, as reported on the tracker:
>
>   - https://github.com/kamailio/kamailio/issues/714
>
> When I get a chance I will install a ubuntu 16.04 myself and dig more into
> the libssl sources.
>
> Cheers,
> Daniel
>
> On 18/07/16 14:46, Jayesh Nambiar wrote:
>
> Hi Daniel,
>
> Thanks for looking into this. I tried with this patch and still get the
> same error. Here are the relevant part of logs:
>
>  0(25032) DEBUG:  [cfg.y:1603]: yyparse(): loading module tls.so
>
>  0(25032) DEBUG:  [sr_module.c:575]: load_module(): trying to load
> 
>
>  0(25032) DEBUG:  [mem/q_malloc.c:189]: qm_malloc_init():
> qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>
>  0(25032) DEBUG:  [mem/q_malloc.c:191]: qm_malloc_init():
> qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>
>  0(25032) DEBUG:  [mem/q_malloc.c:193]: qm_malloc_init():
> qm_malloc_init(0x7fda8249d000, 67108864), start=0x7fda8249d000
>
>  0(25032) DEBUG:  [mem/q_malloc.c:202]: qm_malloc_init():
> qm_malloc_init: size= 67108864, init_overhead=235256
>
>  0(25032) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to set the
> memory allocation functions
>
>  0(25032) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl current mem
> functions - m: 0x7fda87673550 r: 0x7fda87673c40 f: 0x7fda87673a70
>
>  0(25032) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure tls module
> is loaded before any other module using libssl (can be loaded first to be
> safe)
>
>  0(25032) ERROR:  [sr_module.c:607]: load_module():
> /usr/local/kamailio/lib64/kamailio/modules/tls.so: mod_register failed
>
>  0(25032) :  [cfg.y:3391]: yyerror_at(): parse error in config file
> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
> 12-19: failed to load module
>
>
> Yes I can provide ssh access to this machine. I'll send it to you
> seperately.
>
> Thanks,
>
> - Jayesh
>
>
> On Mon, Jul 18, 2016 at 2:25 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> no time over the weekend to look at logs, but I pushed just now a patch
>> to try to see if the memory functions were set or something else prevented
>> the set of memory functions.
>>
>> Can you try with the patch:
>>
>>   -
>> https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2735adfd2e
>>
>> I am at IEFT96 so I will try to do some stuff during the breaks... if
>> doesn't work, then it may take a bit to get more into it.
>>
>> Just in case, would it be possible to get ssh access to such system?
>>
>> Cheers,
>> Daniel
>>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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] tls with ubuntu 16.04

2016-07-18 Thread Jayesh Nambiar
Hi Daniel,
Thanks for looking into this. I tried with this patch and still get the
same error. Here are the relevant part of logs:

 0(25032) DEBUG:  [cfg.y:1603]: yyparse(): loading module tls.so

 0(25032) DEBUG:  [sr_module.c:575]: load_module(): trying to load


 0(25032) DEBUG:  [mem/q_malloc.c:189]: qm_malloc_init():
qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048

 0(25032) DEBUG:  [mem/q_malloc.c:191]: qm_malloc_init():
qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152

 0(25032) DEBUG:  [mem/q_malloc.c:193]: qm_malloc_init():
qm_malloc_init(0x7fda8249d000, 67108864), start=0x7fda8249d000

 0(25032) DEBUG:  [mem/q_malloc.c:202]: qm_malloc_init():
qm_malloc_init: size= 67108864, init_overhead=235256

 0(25032) ERROR: tls [tls_init.c:493]: tls_pre_init(): Unable to set the
memory allocation functions

 0(25032) ERROR: tls [tls_init.c:495]: tls_pre_init(): libssl current mem
functions - m: 0x7fda87673550 r: 0x7fda87673c40 f: 0x7fda87673a70

 0(25032) ERROR: tls [tls_init.c:497]: tls_pre_init(): Be sure tls module
is loaded before any other module using libssl (can be loaded first to be
safe)

 0(25032) ERROR:  [sr_module.c:607]: load_module():
/usr/local/kamailio/lib64/kamailio/modules/tls.so: mod_register failed

 0(25032) :  [cfg.y:3391]: yyerror_at(): parse error in config file
/usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
12-19: failed to load module


Yes I can provide ssh access to this machine. I'll send it to you
seperately.

Thanks,

- Jayesh

On Mon, Jul 18, 2016 at 2:25 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> no time over the weekend to look at logs, but I pushed just now a patch to
> try to see if the memory functions were set or something else prevented the
> set of memory functions.
>
> Can you try with the patch:
>
>   -
> https://github.com/kamailio/kamailio/commit/966513b374eef598434c5310a43eac2735adfd2e
>
> I am at IEFT96 so I will try to do some stuff during the breaks... if
> doesn't work, then it may take a bit to get more into it.
>
> Just in case, would it be possible to get ssh access to such system?
>
> Cheers,
> Daniel
>
> On 18/07/16 09:29, Jayesh Nambiar wrote:
>
> Hi Daniel,
> Any idea of why TLS would not load based on the logs pasted?
>
> - Jayesh
>
> On Fri, Jul 15, 2016 at 4:46 PM Jayesh Nambiar <jayesh1...@gmail.com>
> wrote:
>
>> Hi Daniel,
>> Here are the logs:
>> http://pastebin.com/tGRWr9JS
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Fri, Jul 15, 2016 at 12:29 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Yes, put them on pastebin.
>>>
>>> Daniel
>>>
>>> On 15/07/16 07:53, Jayesh Nambiar wrote:
>>>
>>> The libssl version is as follows:
>>>
>>> 1.0.2g-1ubuntu4.1
>>>
>>> And openssl version shows this:
>>>
>>> OpenSSL 1.0.2g-fips  1 Mar 2016
>>>
>>> As for the logs with debug 3, kamailio scans each and every line in the
>>> config and generates a big file. You want me to send that in full. If yes,
>>> I'd put it in a pastebin and send it across.
>>>
>>>
>>> Thanks,
>>>
>>> - Jayesh
>>>
>>> On Thu, Jul 14, 2016 at 8:50 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Are these all the logs from kamailio startup? It looks like only the
>>>> ones from the moment it tries to load tls module ...
>>>>
>>>> Also, you haven't provided the version of libssl.
>>>>
>>>> Daniel
>>>>
>>>> On 14/07/16 17:08, Jayesh Nambiar wrote:
>>>>
>>>> Hi Daniel,
>>>> It indeed disables TLS if written this way. Here are the logs when
>>>> enable_tls is written on above the loadmodule and kamailio fails to load
>>>> module:
>>>>
>>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [sr_module.c:575]:
>>>> load_module(): trying to load
>>>> 
>>>>
>>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:189]:
>>>> qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>>>
>>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:191]:
>>>> qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=
>>>> 235152
>>>>
>>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:193]:
>>>> qm_malloc_init(): qm_malloc_init(0x7f5741381000, 67108864), start=
>>>> 0x7f5741381000
>>>>
>>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.

Re: [SR-Users] tls with ubuntu 16.04

2016-07-18 Thread Jayesh Nambiar
Hi Daniel,
Any idea of why TLS would not load based on the logs pasted?

- Jayesh

On Fri, Jul 15, 2016 at 4:46 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hi Daniel,
> Here are the logs:
> http://pastebin.com/tGRWr9JS
>
> Thanks,
>
> - Jayesh
>
> On Fri, Jul 15, 2016 at 12:29 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Yes, put them on pastebin.
>>
>> Daniel
>>
>> On 15/07/16 07:53, Jayesh Nambiar wrote:
>>
>> The libssl version is as follows:
>>
>> 1.0.2g-1ubuntu4.1
>>
>> And openssl version shows this:
>>
>> OpenSSL 1.0.2g-fips  1 Mar 2016
>>
>> As for the logs with debug 3, kamailio scans each and every line in the
>> config and generates a big file. You want me to send that in full. If yes,
>> I'd put it in a pastebin and send it across.
>>
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Thu, Jul 14, 2016 at 8:50 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Are these all the logs from kamailio startup? It looks like only the
>>> ones from the moment it tries to load tls module ...
>>>
>>> Also, you haven't provided the version of libssl.
>>>
>>> Daniel
>>>
>>> On 14/07/16 17:08, Jayesh Nambiar wrote:
>>>
>>> Hi Daniel,
>>> It indeed disables TLS if written this way. Here are the logs when
>>> enable_tls is written on above the loadmodule and kamailio fails to load
>>> module:
>>>
>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [sr_module.c:575]:
>>> load_module(): trying to load
>>> 
>>>
>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:189]:
>>> qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>>
>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:191]:
>>> qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=
>>> 235152
>>>
>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:193]:
>>> qm_malloc_init(): qm_malloc_init(0x7f5741381000, 67108864), start=
>>> 0x7f5741381000
>>>
>>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:202]:
>>> qm_malloc_init(): qm_malloc_init: size= 67108864, init_overhead=235256
>>>
>>> Jul 14 10:25:03 v38 kamailio: ERROR: tls [tls_init.c:490]:
>>> tls_pre_init(): Unable to set the memory allocation functions
>>>
>>> Jul 14 10:25:03 v38 kamailio: ERROR:  [sr_module.c:607]:
>>> load_module(): /usr/local/kamailio/lib64/kamailio/modules/tls.so:
>>> mod_register failed
>>>
>>> Jul 14 10:25:03 v38 kamailio: :  [cfg.y:3388]: yyerror_at():
>>> parse error in config file
>>> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
>>> 12-19: failed to load module
>>>
>>> I happened to check the tls module doc where in Quickstart the
>>> enable_tls was written after loadmodule and modparams.
>>>
>>>
>>> - Jayesh
>>>
>>> On Thu, Jul 14, 2016 at 7:46 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> this should not be needed and actually may lead to disabling tls
>>>> support overall as it is enabled after tls module is loaded.
>>>> Are you sure this really works and enabling tls before is not working?
>>>> Send the log messages with debug=3.
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>>
>>>> On 14/07/16 16:11, Jayesh Nambiar wrote:
>>>>
>>>> Hi Daniel,
>>>> I had enable_tls=yes written before loading any modules earlier and it
>>>> was working good on 14.04. Now I just changed the sequence on 16.04 and it
>>>> works as expected. Here is snippet below:
>>>>
>>>> loadmodule "tls.so"
>>>>
>>>> enable_tls=yes
>>>>
>>>> --- Jayesh
>>>>
>>>> On Thu, Jul 14, 2016 at 3:21 PM Daniel-Constantin Mierla <
>>>> mico...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> don't really get what you did? Can you paste the relevant snippet of
>>>>> config?
>>>>>
>>>>> Cheers,
>>>>> Daniel
>>>>>
>>>>> On 14/07/16 07:40, Jayesh Nambiar wrote:
>>>>>
>>>>> Hello,
>>>>> Just 

Re: [SR-Users] tls with ubuntu 16.04

2016-07-15 Thread Jayesh Nambiar
Hi Daniel,
Here are the logs:
http://pastebin.com/tGRWr9JS

Thanks,

- Jayesh

On Fri, Jul 15, 2016 at 12:29 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Yes, put them on pastebin.
>
> Daniel
>
> On 15/07/16 07:53, Jayesh Nambiar wrote:
>
> The libssl version is as follows:
>
> 1.0.2g-1ubuntu4.1
>
> And openssl version shows this:
>
> OpenSSL 1.0.2g-fips  1 Mar 2016
>
> As for the logs with debug 3, kamailio scans each and every line in the
> config and generates a big file. You want me to send that in full. If yes,
> I'd put it in a pastebin and send it across.
>
>
> Thanks,
>
> - Jayesh
>
> On Thu, Jul 14, 2016 at 8:50 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Are these all the logs from kamailio startup? It looks like only the ones
>> from the moment it tries to load tls module ...
>>
>> Also, you haven't provided the version of libssl.
>>
>> Daniel
>>
>> On 14/07/16 17:08, Jayesh Nambiar wrote:
>>
>> Hi Daniel,
>> It indeed disables TLS if written this way. Here are the logs when
>> enable_tls is written on above the loadmodule and kamailio fails to load
>> module:
>>
>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [sr_module.c:575]:
>> load_module(): trying to load
>> 
>>
>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:189]:
>> qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>>
>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:191]:
>> qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>>
>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:193]:
>> qm_malloc_init(): qm_malloc_init(0x7f5741381000, 67108864), start=
>> 0x7f5741381000
>>
>> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:202]:
>> qm_malloc_init(): qm_malloc_init: size= 67108864, init_overhead=235256
>>
>> Jul 14 10:25:03 v38 kamailio: ERROR: tls [tls_init.c:490]:
>> tls_pre_init(): Unable to set the memory allocation functions
>>
>> Jul 14 10:25:03 v38 kamailio: ERROR:  [sr_module.c:607]:
>> load_module(): /usr/local/kamailio/lib64/kamailio/modules/tls.so:
>> mod_register failed
>>
>> Jul 14 10:25:03 v38 kamailio: :  [cfg.y:3388]: yyerror_at(): parse
>> error in config file
>> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
>> 12-19: failed to load module
>>
>> I happened to check the tls module doc where in Quickstart the enable_tls
>> was written after loadmodule and modparams.
>>
>>
>> - Jayesh
>>
>> On Thu, Jul 14, 2016 at 7:46 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> this should not be needed and actually may lead to disabling tls support
>>> overall as it is enabled after tls module is loaded.
>>> Are you sure this really works and enabling tls before is not working?
>>> Send the log messages with debug=3.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 14/07/16 16:11, Jayesh Nambiar wrote:
>>>
>>> Hi Daniel,
>>> I had enable_tls=yes written before loading any modules earlier and it
>>> was working good on 14.04. Now I just changed the sequence on 16.04 and it
>>> works as expected. Here is snippet below:
>>>
>>> loadmodule "tls.so"
>>>
>>> enable_tls=yes
>>>
>>> --- Jayesh
>>>
>>> On Thu, Jul 14, 2016 at 3:21 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> don't really get what you did? Can you paste the relevant snippet of
>>>> config?
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 14/07/16 07:40, Jayesh Nambiar wrote:
>>>>
>>>> Hello,
>>>> Just did enable_tls after loadmodule "tls.so" and this now works.
>>>> Thanks.
>>>>
>>>> - Jayesh
>>>>
>>>> On Thu, Jul 14, 2016 at 11:06 AM Jayesh Nambiar <jayesh1...@gmail.com>
>>>> wrote:
>>>>
>>>>> I did load the tls first but still get the same error. Here is the
>>>>> loadmodule sequence:
>>>>>
>>>>> loadmodule "tls.so"
>>>>>
>>>>> loadmodule "mi_fifo.so"
>>>>>
>>>>> loadmodule "kex.so"
>>>>>
>>>>> loadmodule "corex.so

Re: [SR-Users] tls with ubuntu 16.04

2016-07-14 Thread Jayesh Nambiar
The libssl version is as follows:

1.0.2g-1ubuntu4.1

And openssl version shows this:

OpenSSL 1.0.2g-fips  1 Mar 2016

As for the logs with debug 3, kamailio scans each and every line in the
config and generates a big file. You want me to send that in full. If yes,
I'd put it in a pastebin and send it across.


Thanks,

- Jayesh

On Thu, Jul 14, 2016 at 8:50 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Are these all the logs from kamailio startup? It looks like only the ones
> from the moment it tries to load tls module ...
>
> Also, you haven't provided the version of libssl.
>
> Daniel
>
> On 14/07/16 17:08, Jayesh Nambiar wrote:
>
> Hi Daniel,
> It indeed disables TLS if written this way. Here are the logs when
> enable_tls is written on above the loadmodule and kamailio fails to load
> module:
>
> Jul 14 10:25:03 v38 kamailio: DEBUG:  [sr_module.c:575]:
> load_module(): trying to load
> 
>
> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:189]:
> qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048
>
> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:191]:
> qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152
>
> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:193]:
> qm_malloc_init(): qm_malloc_init(0x7f5741381000, 67108864), start=
> 0x7f5741381000
>
> Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:202]:
> qm_malloc_init(): qm_malloc_init: size= 67108864, init_overhead=235256
>
> Jul 14 10:25:03 v38 kamailio: ERROR: tls [tls_init.c:490]:
> tls_pre_init(): Unable to set the memory allocation functions
>
> Jul 14 10:25:03 v38 kamailio: ERROR:  [sr_module.c:607]:
> load_module(): /usr/local/kamailio/lib64/kamailio/modules/tls.so:
> mod_register failed
>
> Jul 14 10:25:03 v38 kamailio: :  [cfg.y:3388]: yyerror_at(): parse
> error in config file
> /usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
> 12-19: failed to load module
>
> I happened to check the tls module doc where in Quickstart the enable_tls
> was written after loadmodule and modparams.
>
>
> - Jayesh
>
> On Thu, Jul 14, 2016 at 7:46 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> this should not be needed and actually may lead to disabling tls support
>> overall as it is enabled after tls module is loaded.
>> Are you sure this really works and enabling tls before is not working?
>> Send the log messages with debug=3.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 14/07/16 16:11, Jayesh Nambiar wrote:
>>
>> Hi Daniel,
>> I had enable_tls=yes written before loading any modules earlier and it
>> was working good on 14.04. Now I just changed the sequence on 16.04 and it
>> works as expected. Here is snippet below:
>>
>> loadmodule "tls.so"
>>
>> enable_tls=yes
>>
>> --- Jayesh
>>
>> On Thu, Jul 14, 2016 at 3:21 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> don't really get what you did? Can you paste the relevant snippet of
>>> config?
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 14/07/16 07:40, Jayesh Nambiar wrote:
>>>
>>> Hello,
>>> Just did enable_tls after loadmodule "tls.so" and this now works. Thanks.
>>>
>>> - Jayesh
>>>
>>> On Thu, Jul 14, 2016 at 11:06 AM Jayesh Nambiar <jayesh1...@gmail.com>
>>> wrote:
>>>
>>>> I did load the tls first but still get the same error. Here is the
>>>> loadmodule sequence:
>>>>
>>>> loadmodule "tls.so"
>>>>
>>>> loadmodule "mi_fifo.so"
>>>>
>>>> loadmodule "kex.so"
>>>>
>>>> loadmodule "corex.so"
>>>>
>>>> loadmodule "tm.so"
>>>>
>>>> loadmodule "tmx.so"
>>>>
>>>> loadmodule "sl.so"
>>>>
>>>> loadmodule "rr.so"
>>>>
>>>> loadmodule "pv.so"
>>>>
>>>> loadmodule "maxfwd.so"
>>>>
>>>> loadmodule "dialog.so"
>>>>
>>>> loadmodule "textops.so"
>>>>
>>>> loadmodule "siputils.so"
>>>>
>>>> loadmodule "xlog.so"
>>>>
>>>> loadmodule "sanity.so"
>>>>
>>>> loadmodule "ctl.so"
>>>>
&g

Re: [SR-Users] tls with ubuntu 16.04

2016-07-14 Thread Jayesh Nambiar
Hi Daniel,
It indeed disables TLS if written this way. Here are the logs when
enable_tls is written on above the loadmodule and kamailio fails to load
module:

Jul 14 10:25:03 v38 kamailio: DEBUG:  [sr_module.c:575]:
load_module(): trying to load


Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:189]:
qm_malloc_init(): qm_malloc_init: QM_OPTIMIZE=16384, /ROUNDTO=2048

Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:191]:
qm_malloc_init(): qm_malloc_init: QM_HASH_SIZE=2099, qm_block size=235152

Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:193]:
qm_malloc_init(): qm_malloc_init(0x7f5741381000, 67108864), start=
0x7f5741381000

Jul 14 10:25:03 v38 kamailio: DEBUG:  [mem/q_malloc.c:202]:
qm_malloc_init(): qm_malloc_init: size= 67108864, init_overhead=235256

Jul 14 10:25:03 v38 kamailio: ERROR: tls [tls_init.c:490]: tls_pre_init():
Unable to set the memory allocation functions

Jul 14 10:25:03 v38 kamailio: ERROR:  [sr_module.c:607]:
load_module(): /usr/local/kamailio/lib64/kamailio/modules/tls.so:
mod_register failed

Jul 14 10:25:03 v38 kamailio: :  [cfg.y:3388]: yyerror_at(): parse
error in config file
/usr/local/kamailio/etc/kamailio/tlkn-edge/kamailio.cfg, line 47, column
12-19: failed to load module

I happened to check the tls module doc where in Quickstart the enable_tls
was written after loadmodule and modparams.


- Jayesh

On Thu, Jul 14, 2016 at 7:46 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> this should not be needed and actually may lead to disabling tls support
> overall as it is enabled after tls module is loaded.
> Are you sure this really works and enabling tls before is not working?
> Send the log messages with debug=3.
>
> Cheers,
> Daniel
>
>
> On 14/07/16 16:11, Jayesh Nambiar wrote:
>
> Hi Daniel,
> I had enable_tls=yes written before loading any modules earlier and it was
> working good on 14.04. Now I just changed the sequence on 16.04 and it
> works as expected. Here is snippet below:
>
> loadmodule "tls.so"
>
> enable_tls=yes
>
> --- Jayesh
>
> On Thu, Jul 14, 2016 at 3:21 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> don't really get what you did? Can you paste the relevant snippet of
>> config?
>>
>> Cheers,
>> Daniel
>>
>> On 14/07/16 07:40, Jayesh Nambiar wrote:
>>
>> Hello,
>> Just did enable_tls after loadmodule "tls.so" and this now works. Thanks.
>>
>> - Jayesh
>>
>> On Thu, Jul 14, 2016 at 11:06 AM Jayesh Nambiar <jayesh1...@gmail.com>
>> wrote:
>>
>>> I did load the tls first but still get the same error. Here is the
>>> loadmodule sequence:
>>>
>>> loadmodule "tls.so"
>>>
>>> loadmodule "mi_fifo.so"
>>>
>>> loadmodule "kex.so"
>>>
>>> loadmodule "corex.so"
>>>
>>> loadmodule "tm.so"
>>>
>>> loadmodule "tmx.so"
>>>
>>> loadmodule "sl.so"
>>>
>>> loadmodule "rr.so"
>>>
>>> loadmodule "pv.so"
>>>
>>> loadmodule "maxfwd.so"
>>>
>>> loadmodule "dialog.so"
>>>
>>> loadmodule "textops.so"
>>>
>>> loadmodule "siputils.so"
>>>
>>> loadmodule "xlog.so"
>>>
>>> loadmodule "sanity.so"
>>>
>>> loadmodule "ctl.so"
>>>
>>> loadmodule "cfg_rpc.so"
>>>
>>> loadmodule "mi_rpc.so"
>>>
>>> loadmodule "nathelper.so"
>>>
>>> loadmodule "nat_traversal.so"
>>>
>>> loadmodule "xhttp.so"
>>>
>>> loadmodule "websocket.so"
>>>
>>> loadmodule "path.so"
>>>
>>> loadmodule "tcpops.so"
>>>
>>> loadmodule "rtpengine.so"
>>>
>>> loadmodule "debugger.so"
>>>
>>>
>>> Anything else that I can do to debug this, kindly let me know. Thanks.
>>>
>>> - Jayesh
>>>
>>> On Thu, Jul 14, 2016 at 2:37 AM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> load first the tls module and then the others.
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>> On 13/07/16 19:54, Jayesh Nambiar wrote:
>>>>
>>>> Opensl Version:
>>>>
>>>> OpenSSL 

Re: [SR-Users] tls with ubuntu 16.04

2016-07-14 Thread Jayesh Nambiar
Hi Daniel,
I had enable_tls=yes written before loading any modules earlier and it was
working good on 14.04. Now I just changed the sequence on 16.04 and it
works as expected. Here is snippet below:

loadmodule "tls.so"

enable_tls=yes

--- Jayesh

On Thu, Jul 14, 2016 at 3:21 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> don't really get what you did? Can you paste the relevant snippet of
> config?
>
> Cheers,
> Daniel
>
> On 14/07/16 07:40, Jayesh Nambiar wrote:
>
> Hello,
> Just did enable_tls after loadmodule "tls.so" and this now works. Thanks.
>
> - Jayesh
>
> On Thu, Jul 14, 2016 at 11:06 AM Jayesh Nambiar <jayesh1...@gmail.com>
> wrote:
>
>> I did load the tls first but still get the same error. Here is the
>> loadmodule sequence:
>>
>> loadmodule "tls.so"
>>
>> loadmodule "mi_fifo.so"
>>
>> loadmodule "kex.so"
>>
>> loadmodule "corex.so"
>>
>> loadmodule "tm.so"
>>
>> loadmodule "tmx.so"
>>
>> loadmodule "sl.so"
>>
>> loadmodule "rr.so"
>>
>> loadmodule "pv.so"
>>
>> loadmodule "maxfwd.so"
>>
>> loadmodule "dialog.so"
>>
>> loadmodule "textops.so"
>>
>> loadmodule "siputils.so"
>>
>> loadmodule "xlog.so"
>>
>> loadmodule "sanity.so"
>>
>> loadmodule "ctl.so"
>>
>> loadmodule "cfg_rpc.so"
>>
>> loadmodule "mi_rpc.so"
>>
>> loadmodule "nathelper.so"
>>
>> loadmodule "nat_traversal.so"
>>
>> loadmodule "xhttp.so"
>>
>> loadmodule "websocket.so"
>>
>> loadmodule "path.so"
>>
>> loadmodule "tcpops.so"
>>
>> loadmodule "rtpengine.so"
>>
>> loadmodule "debugger.so"
>>
>>
>> Anything else that I can do to debug this, kindly let me know. Thanks.
>>
>> - Jayesh
>>
>> On Thu, Jul 14, 2016 at 2:37 AM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> load first the tls module and then the others.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 13/07/16 19:54, Jayesh Nambiar wrote:
>>>
>>> Opensl Version:
>>>
>>> OpenSSL 1.0.2g-fips  1 Mar 2016
>>>
>>> Order of loadmodules:
>>>
>>> loadmodule "mi_fifo.so"
>>>
>>> loadmodule "kex.so"
>>>
>>> loadmodule "corex.so"
>>>
>>> loadmodule "tm.so"
>>>
>>> loadmodule "tmx.so"
>>>
>>> loadmodule "sl.so"
>>>
>>> loadmodule "rr.so"
>>>
>>> loadmodule "pv.so"
>>>
>>> loadmodule "maxfwd.so"
>>>
>>> loadmodule "dialog.so"
>>>
>>> loadmodule "textops.so"
>>>
>>> loadmodule "siputils.so"
>>>
>>> loadmodule "xlog.so"
>>>
>>> loadmodule "sanity.so"
>>>
>>> loadmodule "ctl.so"
>>>
>>> loadmodule "cfg_rpc.so"
>>>
>>> loadmodule "mi_rpc.so"
>>>
>>> loadmodule "nathelper.so"
>>>
>>> loadmodule "nat_traversal.so"
>>>
>>> loadmodule "xhttp.so"
>>>
>>> loadmodule "websocket.so"
>>>
>>> loadmodule "path.so"
>>>
>>> loadmodule "tcpops.so"
>>>
>>> loadmodule "rtpengine.so"
>>>
>>> loadmodule "tls.so"
>>>
>>> loadmodule "debugger.so"
>>>
>>>
>>> -- Jayesh
>>>
>>>
>>>
>>> On Wed, Jul 13, 2016 at 10:18 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> can you provide details about:
>>>>
>>>>  - order of loaded modules:
>>>>
>>>> grep "loadmodule" kamailio.cfg
>>>>   - the version of libssl
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>>
>>>> On 13/07/16 16:48, Jayesh Nambiar wrote:
>>>>
>>>> Hi,
>>>> Trying kamailio with Ubuntu 16.04 and I'm getting errors as follows:
>>>>
>>>> ERROR: tls [tls_init.c:490]: tls_pre_init(): Unable to set the memory
>>>> allocation functions
>>>>
>>>> The error is identical to the one mentioned here:
>>>>
>>>> https://bugs.launchpad.net/ubuntu/+source/kamailio/+bug/1591992
>>>>
>>>> Is there a solution to this. Thanks for any response.
>>>>
>>>> - Jayesh
>>>>
>>>>
>>>> ___
>>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>>>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>>
>>>> --
>>>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>>>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>>>> http://www.linkedin.com/in/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
>>>>
>>>
>>> --
>>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>>> http://www.linkedin.com/in/miconda
>>>
>>>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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] tls with ubuntu 16.04

2016-07-13 Thread Jayesh Nambiar
Hello,
Just did enable_tls after loadmodule "tls.so" and this now works. Thanks.

- Jayesh

On Thu, Jul 14, 2016 at 11:06 AM Jayesh Nambiar <jayesh1...@gmail.com>
wrote:

> I did load the tls first but still get the same error. Here is the
> loadmodule sequence:
>
> loadmodule "tls.so"
>
> loadmodule "mi_fifo.so"
>
> loadmodule "kex.so"
>
> loadmodule "corex.so"
>
> loadmodule "tm.so"
>
> loadmodule "tmx.so"
>
> loadmodule "sl.so"
>
> loadmodule "rr.so"
>
> loadmodule "pv.so"
>
> loadmodule "maxfwd.so"
>
> loadmodule "dialog.so"
>
> loadmodule "textops.so"
>
> loadmodule "siputils.so"
>
> loadmodule "xlog.so"
>
> loadmodule "sanity.so"
>
> loadmodule "ctl.so"
>
> loadmodule "cfg_rpc.so"
>
> loadmodule "mi_rpc.so"
>
> loadmodule "nathelper.so"
>
> loadmodule "nat_traversal.so"
>
> loadmodule "xhttp.so"
>
> loadmodule "websocket.so"
>
> loadmodule "path.so"
>
> loadmodule "tcpops.so"
>
> loadmodule "rtpengine.so"
>
> loadmodule "debugger.so"
>
>
> Anything else that I can do to debug this, kindly let me know. Thanks.
>
> - Jayesh
>
> On Thu, Jul 14, 2016 at 2:37 AM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> load first the tls module and then the others.
>>
>> Cheers,
>> Daniel
>>
>> On 13/07/16 19:54, Jayesh Nambiar wrote:
>>
>> Opensl Version:
>>
>> OpenSSL 1.0.2g-fips  1 Mar 2016
>>
>> Order of loadmodules:
>>
>> loadmodule "mi_fifo.so"
>>
>> loadmodule "kex.so"
>>
>> loadmodule "corex.so"
>>
>> loadmodule "tm.so"
>>
>> loadmodule "tmx.so"
>>
>> loadmodule "sl.so"
>>
>> loadmodule "rr.so"
>>
>> loadmodule "pv.so"
>>
>> loadmodule "maxfwd.so"
>>
>> loadmodule "dialog.so"
>>
>> loadmodule "textops.so"
>>
>> loadmodule "siputils.so"
>>
>> loadmodule "xlog.so"
>>
>> loadmodule "sanity.so"
>>
>> loadmodule "ctl.so"
>>
>> loadmodule "cfg_rpc.so"
>>
>> loadmodule "mi_rpc.so"
>>
>> loadmodule "nathelper.so"
>>
>> loadmodule "nat_traversal.so"
>>
>> loadmodule "xhttp.so"
>>
>> loadmodule "websocket.so"
>>
>> loadmodule "path.so"
>>
>> loadmodule "tcpops.so"
>>
>> loadmodule "rtpengine.so"
>>
>> loadmodule "tls.so"
>>
>> loadmodule "debugger.so"
>>
>>
>> -- Jayesh
>>
>>
>>
>> On Wed, Jul 13, 2016 at 10:18 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> can you provide details about:
>>>
>>>  - order of loaded modules:
>>>
>>> grep "loadmodule" kamailio.cfg
>>>   - the version of libssl
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 13/07/16 16:48, Jayesh Nambiar wrote:
>>>
>>> Hi,
>>> Trying kamailio with Ubuntu 16.04 and I'm getting errors as follows:
>>>
>>> ERROR: tls [tls_init.c:490]: tls_pre_init(): Unable to set the memory
>>> allocation functions
>>>
>>> The error is identical to the one mentioned here:
>>>
>>> https://bugs.launchpad.net/ubuntu/+source/kamailio/+bug/1591992
>>>
>>> Is there a solution to this. Thanks for any response.
>>>
>>> - Jayesh
>>>
>>>
>>> ___
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> --
>>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>>> http://www.linkedin.com/in/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
>>>
>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/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] tls with ubuntu 16.04

2016-07-13 Thread Jayesh Nambiar
I did load the tls first but still get the same error. Here is the
loadmodule sequence:

loadmodule "tls.so"

loadmodule "mi_fifo.so"

loadmodule "kex.so"

loadmodule "corex.so"

loadmodule "tm.so"

loadmodule "tmx.so"

loadmodule "sl.so"

loadmodule "rr.so"

loadmodule "pv.so"

loadmodule "maxfwd.so"

loadmodule "dialog.so"

loadmodule "textops.so"

loadmodule "siputils.so"

loadmodule "xlog.so"

loadmodule "sanity.so"

loadmodule "ctl.so"

loadmodule "cfg_rpc.so"

loadmodule "mi_rpc.so"

loadmodule "nathelper.so"

loadmodule "nat_traversal.so"

loadmodule "xhttp.so"

loadmodule "websocket.so"

loadmodule "path.so"

loadmodule "tcpops.so"

loadmodule "rtpengine.so"

loadmodule "debugger.so"


Anything else that I can do to debug this, kindly let me know. Thanks.

- Jayesh

On Thu, Jul 14, 2016 at 2:37 AM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> load first the tls module and then the others.
>
> Cheers,
> Daniel
>
> On 13/07/16 19:54, Jayesh Nambiar wrote:
>
> Opensl Version:
>
> OpenSSL 1.0.2g-fips  1 Mar 2016
>
> Order of loadmodules:
>
> loadmodule "mi_fifo.so"
>
> loadmodule "kex.so"
>
> loadmodule "corex.so"
>
> loadmodule "tm.so"
>
> loadmodule "tmx.so"
>
> loadmodule "sl.so"
>
> loadmodule "rr.so"
>
> loadmodule "pv.so"
>
> loadmodule "maxfwd.so"
>
> loadmodule "dialog.so"
>
> loadmodule "textops.so"
>
> loadmodule "siputils.so"
>
> loadmodule "xlog.so"
>
> loadmodule "sanity.so"
>
> loadmodule "ctl.so"
>
> loadmodule "cfg_rpc.so"
>
> loadmodule "mi_rpc.so"
>
> loadmodule "nathelper.so"
>
> loadmodule "nat_traversal.so"
>
> loadmodule "xhttp.so"
>
> loadmodule "websocket.so"
>
> loadmodule "path.so"
>
> loadmodule "tcpops.so"
>
> loadmodule "rtpengine.so"
>
> loadmodule "tls.so"
>
> loadmodule "debugger.so"
>
>
> -- Jayesh
>
>
>
> On Wed, Jul 13, 2016 at 10:18 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> can you provide details about:
>>
>>  - order of loaded modules:
>>
>> grep "loadmodule" kamailio.cfg
>>   - the version of libssl
>>
>> Cheers,
>> Daniel
>>
>>
>> On 13/07/16 16:48, Jayesh Nambiar wrote:
>>
>> Hi,
>> Trying kamailio with Ubuntu 16.04 and I'm getting errors as follows:
>>
>> ERROR: tls [tls_init.c:490]: tls_pre_init(): Unable to set the memory
>> allocation functions
>>
>> The error is identical to the one mentioned here:
>>
>> https://bugs.launchpad.net/ubuntu/+source/kamailio/+bug/1591992
>>
>> Is there a solution to this. Thanks for any response.
>>
>> - Jayesh
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/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
>>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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] tls with ubuntu 16.04

2016-07-13 Thread Jayesh Nambiar
Hi,
Trying kamailio with Ubuntu 16.04 and I'm getting errors as follows:

ERROR: tls [tls_init.c:490]: tls_pre_init(): Unable to set the memory
allocation functions

The error is identical to the one mentioned here:

https://bugs.launchpad.net/ubuntu/+source/kamailio/+bug/1591992

Is there a solution to this. Thanks for any response.

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


Re: [SR-Users] getting the local 408 response

2016-07-12 Thread Jayesh Nambiar
Hi,
I didnt cross my mind that I can use t_on_failure before t_suspend. I'll
try that right away. Used to writing that before t_relay every time.

Thanks,

- Jayesh

On Tue, Jul 12, 2016 at 4:50 PM Sebastian Damm  wrote:

> Hello,
>
> On Tue, Jul 12, 2016 at 12:55 PM, Daniel-Constantin Mierla
>  wrote:
> > if you set t_on_failure() before t_suspend(), then you should get
> > failure_route executed when the transaction timed out in suspended state.
>
> That's exactly how it works. We set up something like this last week.
>
> route{
> t_on_failure("handlefailedcalls");
> t_suspend();
> [..]
> }
>
> failure_route[handlefailedcalls] {
> if (t_check_status("408") {
> xlog("L_DBG", "Call timed out.\n");
> }
> }
>
>
> If you set AVPs in the correct place during a call (e.g. before
> suspending, when receiving a ringing), you can check wether it was a
> timeout during suspend or a 408 received from the far end or a timeout
> during ringing.
>
> Best Regards,
> Sebastian
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
___
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] getting the local 408 response

2016-07-12 Thread Jayesh Nambiar
Hello,
So the question fundamentally is, if I t_suspend a transaction and kamailio
sends a 408 to that leg because of the fr_timer configured, would I have
access to that response?

Thanks again.

- Jayesh

On Mon, Jul 11, 2016 at 6:26 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hi Carsten,
> Thanks for responding.
> 1) I basically call a t_suspend for an incoming INVITE and resume it when
> the call is ready to be patched.
> 2) I set my fr_timer as 30 seconds as I do not want the caller to wait for
> a long time to get connected.
> 3) So when kamailio responds back with a 408 after 30 seconds, I want to
> do an http request to let the called party know about the missed call.
>
> Hence I need to get access to variables like $tU when kamailio generates a
> 408 to send the missed call notification to the right recipient.
>
> Thanks,
>
> - Jayesh
>
> On Mon, Jul 11, 2016 at 6:13 PM Carsten Bock <cars...@ng-voice.com> wrote:
>
>> Hi Jayesh,
>>
>> you should be able to catch this in a regular failure_route(). What do
>> you want to achieve? Replace the response?
>>
>> failure_route[myfailure] {
>> # Execute, in case we
>> # - get a local generated "408"
>> # - receive a 5xx or 6xx reply from the proxy.
>> if (t_branch_timeout() || t_check_status("[5-6]..")) {
>> send_reply("486", "User offline");
>> exit;
>> }
>> }
>>
>> Thanks,
>> Carsten
>>
>> 2016-07-11 14:37 GMT+02:00 Jayesh Nambiar <jayesh1...@gmail.com>:
>> > Hi,
>> > I'm looking to catch the local 408 response generated by kamailio after
>> the
>> > fr_timer strikes in. I was assuming to get it in the sl:local-request,
>> but I
>> > dont see it in my log messages.
>> > I can catch responses like a 200 for register or a 487 for a message
>> who's
>> > transaction is not yet created. Any proper way on how do I get to know
>> when
>> > kamailio generates a local 408?
>> > I'm on the master branch (commit:
>> 54562b873c2c3d0a04f0587e7706188a3eb19a74).
>> >
>> > Thanks,
>> >
>> > - Jayesh
>> >
>> > ___
>> > 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
>> >
>>
>>
>>
>> --
>> Carsten Bock
>> CEO (Geschäftsführer)
>>
>> ng-voice GmbH
>> Millerntorplatz 1
>> 20359 Hamburg / Germany
>>
>> http://www.ng-voice.com
>> mailto:cars...@ng-voice.com
>>
>> Office +49 40 5247593-40
>> Fax +49 40 5247593-99
>>
>> Sitz der Gesellschaft: Hamburg
>> Registergericht: Amtsgericht Hamburg, HRB 120189
>> Geschäftsführer: Carsten Bock
>> Ust-ID: DE279344284
>>
>> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
>> http://www.ng-voice.com/imprint/
>>
>> ___
>> 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] getting the local 408 response

2016-07-11 Thread Jayesh Nambiar
Hi Carsten,
Thanks for responding.
1) I basically call a t_suspend for an incoming INVITE and resume it when
the call is ready to be patched.
2) I set my fr_timer as 30 seconds as I do not want the caller to wait for
a long time to get connected.
3) So when kamailio responds back with a 408 after 30 seconds, I want to do
an http request to let the called party know about the missed call.

Hence I need to get access to variables like $tU when kamailio generates a
408 to send the missed call notification to the right recipient.

Thanks,

- Jayesh

On Mon, Jul 11, 2016 at 6:13 PM Carsten Bock <cars...@ng-voice.com> wrote:

> Hi Jayesh,
>
> you should be able to catch this in a regular failure_route(). What do
> you want to achieve? Replace the response?
>
> failure_route[myfailure] {
> # Execute, in case we
> # - get a local generated "408"
> # - receive a 5xx or 6xx reply from the proxy.
> if (t_branch_timeout() || t_check_status("[5-6]..")) {
> send_reply("486", "User offline");
> exit;
> }
> }
>
> Thanks,
> Carsten
>
> 2016-07-11 14:37 GMT+02:00 Jayesh Nambiar <jayesh1...@gmail.com>:
> > Hi,
> > I'm looking to catch the local 408 response generated by kamailio after
> the
> > fr_timer strikes in. I was assuming to get it in the sl:local-request,
> but I
> > dont see it in my log messages.
> > I can catch responses like a 200 for register or a 487 for a message
> who's
> > transaction is not yet created. Any proper way on how do I get to know
> when
> > kamailio generates a local 408?
> > I'm on the master branch (commit:
> 54562b873c2c3d0a04f0587e7706188a3eb19a74).
> >
> > Thanks,
> >
> > - Jayesh
> >
> > ___
> > 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
> >
>
>
>
> --
> Carsten Bock
> CEO (Geschäftsführer)
>
> ng-voice GmbH
> Millerntorplatz 1
> 20359 Hamburg / Germany
>
> http://www.ng-voice.com
> mailto:cars...@ng-voice.com
>
> Office +49 40 5247593-40
> Fax +49 40 5247593-99
>
> Sitz der Gesellschaft: Hamburg
> Registergericht: Amtsgericht Hamburg, HRB 120189
> Geschäftsführer: Carsten Bock
> Ust-ID: DE279344284
>
> Hier finden Sie unsere handelsrechtlichen Pflichtangaben:
> http://www.ng-voice.com/imprint/
>
> ___
> 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] getting the local 408 response

2016-07-11 Thread Jayesh Nambiar
Hi,
I'm looking to catch the local 408 response generated by kamailio after the
fr_timer strikes in. I was assuming to get it in the sl:local-request, but
I dont see it in my log messages.
I can catch responses like a 200 for register or a 487 for a message who's
transaction is not yet created. Any proper way on how do I get to know when
kamailio generates a local 408?
I'm on the master branch (commit: 54562b873c2c3d0a04f0587e7706188a3eb19a74).

Thanks,

- Jayesh
___
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] dispatcher module not fetching attrs col from DB

2016-07-05 Thread Jayesh Nambiar
Thank you very much Daniel. That solved the problem. Consequences of random
upgrade. Will keep in mind for the future :)

- Jayesh

On Tue, Jul 5, 2016 at 8:10 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> It looks like you installed it for first time long time ago, without
> proper upgrade. If you run kamailio 4.4, the version value has to be 4.
>
> The module works also with older table versions/structures, but it doesn't
> select the new columns.
>
> Cheers,
> Daniel
>
> On 05/07/16 16:34, Jayesh Nambiar wrote:
>
> Version is 3.
>
> - Jayesh
>
> On Tue, Jul 5, 2016 at 7:19 PM Daniel-Constantin Mierla <mico...@gmail.com>
> wrote:
>
>> Hello,
>>
>> what is the table_version in version table for dispatcher?
>>
>> select * from version
>>
>> Cheers,
>> Daniel
>>
>> On 05/07/16 14:51, Jayesh Nambiar wrote:
>>
>> Hi,
>> I'm trying to use the dispatcher module with algo 9 for weighted
>> distribution. I have a column attrs in the dispatcher table with value in
>> the format "weight=90" for my destination addresses.
>> But somehow the ds_list command always shows attrs as blank. I checked
>> that kamailio doesn't fetch the attrs column at all; neither while starting
>> up nor while calling ds_reload. This is the query that kamailio sends to
>> my DB while starting up or calling the fifo ds_reload:
>>
>> select `setid`,`destination`,`flags`,`priority` from `dispatcher`
>>
>> I dont even see an attr column modparam in the documentation although
>> kamailio didnt throw an error when I defined attr_col modparam for
>> dispatcher module. Is there a different way to tell kamailio to fetch the
>> attrs from the DB??
>>
>> I'm using the 4.4.1 version. Thanks for any suggestion or pointers to
>> solve this.
>>
>> - Jayesh
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://www.asipto.com - 
>> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/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
>>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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] dispatcher module not fetching attrs col from DB

2016-07-05 Thread Jayesh Nambiar
Version is 3.

- Jayesh

On Tue, Jul 5, 2016 at 7:19 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> what is the table_version in version table for dispatcher?
>
> select * from version
>
> Cheers,
> Daniel
>
> On 05/07/16 14:51, Jayesh Nambiar wrote:
>
> Hi,
> I'm trying to use the dispatcher module with algo 9 for weighted
> distribution. I have a column attrs in the dispatcher table with value in
> the format "weight=90" for my destination addresses.
> But somehow the ds_list command always shows attrs as blank. I checked
> that kamailio doesn't fetch the attrs column at all; neither while starting
> up nor while calling ds_reload. This is the query that kamailio sends to
> my DB while starting up or calling the fifo ds_reload:
>
> select `setid`,`destination`,`flags`,`priority` from `dispatcher`
>
> I dont even see an attr column modparam in the documentation although
> kamailio didnt throw an error when I defined attr_col modparam for
> dispatcher module. Is there a different way to tell kamailio to fetch the
> attrs from the DB??
>
> I'm using the 4.4.1 version. Thanks for any suggestion or pointers to
> solve this.
>
> - Jayesh
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlahttp://www.asipto.com - 
> http://www.kamailio.orghttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/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
>
___
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] dispatcher module not fetching attrs col from DB

2016-07-05 Thread Jayesh Nambiar
Hi,
I'm trying to use the dispatcher module with algo 9 for weighted
distribution. I have a column attrs in the dispatcher table with value in
the format "weight=90" for my destination addresses.
But somehow the ds_list command always shows attrs as blank. I checked that
kamailio doesn't fetch the attrs column at all; neither while starting up
nor while calling ds_reload. This is the query that kamailio sends to my DB
while starting up or calling the fifo ds_reload:

select `setid`,`destination`,`flags`,`priority` from `dispatcher`

I dont even see an attr column modparam in the documentation although
kamailio didnt throw an error when I defined attr_col modparam for
dispatcher module. Is there a different way to tell kamailio to fetch the
attrs from the DB??

I'm using the 4.4.1 version. Thanks for any suggestion or pointers to solve
this.

- Jayesh
___
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] kazoo database not bound error

2016-04-20 Thread Jayesh Nambiar
Hello,
Using kazoo only to connect to amqp gives an error if the db_url is not
specified. If db_url is specified it tries to do presence related stuff
even if not intended. The solution was to use:
modparam("kazoo", "pua_mode", 0) which I found here:
http://lists.sip-router.org/pipermail/sr-users/2015-September/090092.html

This is not documented in the kazoo module. Would be great if this is added
in the module documentation to simplify the use of module.

Thanks,

- Jayesh
___
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] having a count of lost response for dialog keep alives

2015-12-10 Thread Jayesh Nambiar
Thanks Daniel. Have opened an issue related to this. I cannot label though
!!
https://github.com/kamailio/kamailio/issues/438
Please label it as a Feature Request. Thanks.

- Jayesh

On Thu, Dec 10, 2015 at 1:44 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> On 10/12/15 08:25, Jayesh Nambiar wrote:
> > Hi,
> > I'm using dlg_set_property(ka-src) and dlg_set_property(ka-dst) to
> > keep alive my clients. In case of a network change the client does a
> > Re-Invite with the new contact address and kamailio does keep-alives
> > to the new address properly as the fix reported here:
> > https://github.com/kamailio/kamailio/issues/273
> >
> > The problem happens when the Re-Invite transaction on the client side
> > is not complete and kamailio happens to send an OPTIONS keep-alive at
> > that same time, the client fails to send back a 200 OK, because the
> > client itself is trying to gain access on the new network.
> > So as a work-around I thought would it be possible to end the dialog
> > on missing at least 3 responses and not killing the dialog if one
> > response is missed. Can it be a configurable parameter in the dialog
> > module or something on those lines. Just a suggestion !!
> >
> at this moment it is not such counter. But I think it is enough to
> keeping it in memory only (no database backup for failed keep alives),
> which means should be easier to add. You can open an item on the tracker
> with a feature request for this.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - http://www.asipto.com
> http://miconda.eu
>
>
> ___
> 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] having a count of lost response for dialog keep alives

2015-12-09 Thread Jayesh Nambiar
Hi,
I'm using dlg_set_property(ka-src) and dlg_set_property(ka-dst) to keep
alive my clients. In case of a network change the client does a Re-Invite
with the new contact address and kamailio does keep-alives to the new
address properly as the fix reported here:
https://github.com/kamailio/kamailio/issues/273

The problem happens when the Re-Invite transaction on the client side is
not complete and kamailio happens to send an OPTIONS keep-alive at that
same time, the client fails to send back a 200 OK, because the client
itself is trying to gain access on the new network.
So as a work-around I thought would it be possible to end the dialog on
missing at least 3 responses and not killing the dialog if one response is
missed. Can it be a configurable parameter in the dialog module or
something on those lines. Just a suggestion !!

Thanks.

- Jayesh
___
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 using http_query when response is 200

2015-12-07 Thread Jayesh Nambiar
Hi,
I'm using http_query to send a post request on a https URL. The weird part
is it crashes with segmentation fault when the response from the server is
200. If the response was a 500, it works and continues processing.
Here's the function:
http_query("https://notify.abcd.com/onnet/call;, "$avp(devices)",
"Content-Type: application/json" "$var(response)");
xlog("L_INFO", "Response is $var(response)");

And here's the backtrace on crash:
0x7f62f2bf8e38 in ?? ()
#1  0x7f62ea22251b in http_query (_m=0x7f62f2c3a038,
_url=0x7f62f2bf3548 "\330\064\277\362b\177", _dst=0x7f62f2bf9250
"\030\215\277\362b\177", _post=0x7f62f2bf35c8 "\200r\277\362b\177",
_hdr=0x7f62f2bf91d0 "h\221\277\362b\177") at functions.c:226
#2  0x7f62ea229e0b in w_http_query_post_hdr (_m=0x7f62f2c3a038,
_url=0x7f62f2bf3548 "\330\064\277\362b\177", _post=0x7f62f2bf35c8
"\200r\277\362b\177", _hdr=0x7f62f2bf91d0 "h\221\277\362b\177",
_result=0x7f62f2bf9250 "\030\215\277\362b\177") at utils.c:483
#3  0x0041f6b5 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2bf8a58,
msg=0x7f62f2c3a038) at action.c:1079
#4  0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2bf6fc0,
msg=0x7f62f2c3a038) at action.c:1549
#5  0x0041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2bfb9b0,
msg=0x7f62f2c3a038) at action.c:1045
#6  0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2bb9388,
msg=0x7f62f2c3a038) at action.c:1549
#7  0x0041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b8f248,
msg=0x7f62f2c3a038) at action.c:678
#8  0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b8e268,
msg=0x7f62f2c3a038) at action.c:1549
#9  0x0041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b91040,
msg=0x7f62f2c3a038) at action.c:1045
#10 0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b8b7a8,
msg=0x7f62f2c3a038) at action.c:1549
#11 0x0041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b3a2c0,
msg=0x7f62f2c3a038) at action.c:678
#12 0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b3a2c0,
msg=0x7f62f2c3a038) at action.c:1549
#13 0x0041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b47f00,
msg=0x7f62f2c3a038) at action.c:1045
#14 0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b37e80,
msg=0x7f62f2c3a038) at action.c:1549
#15 0x0041bc28 in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b1c9c8,
msg=0x7f62f2c3a038) at action.c:678
#16 0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b1c9c8,
msg=0x7f62f2c3a038) at action.c:1549
#17 0x0041f3ce in do_action (h=0x7ffeb128c8c0, a=0x7f62f2b1cc28,
msg=0x7f62f2c3a038) at action.c:1045
#18 0x0042c2ea in run_actions (h=0x7ffeb128c8c0, a=0x7f62f2b170a0,
msg=0x7f62f2c3a038) at action.c:1549
#19 0x0042ca93 in run_top_route (a=0x7f62f2b170a0,
msg=0x7f62f2c3a038, c=0x0) at action.c:1635
#20 0x0051c115 in receive_msg (
buf=0xab7520  "INVITE
sip:bdbbf60001b5b91...@devsip.abcd.com:8321 SIP/2.0\r\nRecord-Route:
\r\nRecord-Route:
\r\nVia:
SIP/2.0/UDP"..., len=1901, rcv_info=0x7ffeb128cc10) at receive.c:196
#21 0x0062d427 in udp_rcv_loop () at udp_server.c:495
#22 0x004b28c1 in main_loop () at main.c:1593
#23 0x004b9aa5 in main (argc=5, argv=0x7ffeb128d118) at main.c:2597

Can someone please confirm the crash so that I'll go ahead and report this
as an issue on the tracker. Basically when it crashes, kamailio doesn't
even execute the xlog function after the http_query call.
P.S. abcd.com is a changed domain for confidential reasons.

Thanks,

- Jayesh
___
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] using APP_LUA for complex arithmetic operations

2015-12-01 Thread Jayesh Nambiar
Hi,
Playing around a little more with app_lua, I realized that once you set any
variables inside lua, they are readable from within the kamailio config. So
that worked out well. This is place for everything LUA in kamailio:
http://sip-router.org/wiki/api/lua/devel

Thanks,

- Jayesh

On Tue, Dec 1, 2015 at 7:23 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hi,
> I understand that kamailio does not allow float-point values in variables
> and I think kamailio is not a great place to do complex arithemtic
> operations and so I thought of using app_lua for the same.
> So can I pass the control to app_lua and come back to config script with
> some values? For eg. can I call a lua script that does a complex
> arithemetic operation on my AVP values and based on certain conditions;
> return back a true or false and then I continue in my existing script.
> I came across an exmaple
> http://kb.asipto.com/kamailio:usage:k32-lua-routing but this is more like
> doing the entire thing inside LUA. What I'm looking at is getting certain
> things done in lua and continue the script processing.
> Thanks for any help here.
>
> - Jayesh
>
___
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] using APP_LUA for complex arithmetic operations

2015-12-01 Thread Jayesh Nambiar
Hi,
I understand that kamailio does not allow float-point values in variables
and I think kamailio is not a great place to do complex arithemtic
operations and so I thought of using app_lua for the same.
So can I pass the control to app_lua and come back to config script with
some values? For eg. can I call a lua script that does a complex
arithemetic operation on my AVP values and based on certain conditions;
return back a true or false and then I continue in my existing script.
I came across an exmaple
http://kb.asipto.com/kamailio:usage:k32-lua-routing but
this is more like doing the entire thing inside LUA. What I'm looking at is
getting certain things done in lua and continue the script processing.
Thanks for any help here.

- Jayesh
___
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 using the $expires variable

2015-11-27 Thread Jayesh Nambiar
So someone planning to patch it? Just asking?

Thanks,

- Jayesh

On Thu, Nov 26, 2015 at 6:48 PM Sergey Okhapkin <s...@sokhapkin.dyndns.org>
wrote:

> Confirmed, I'm getting crash too.
>
> On Thursday 26 November 2015 13:05:57 Jayesh Nambiar wrote:
> > Hi,
> > I am trying to extract out the expires value from the incoming REGISTER
> > request. It might be present in the Contact header or as a separate
> Expires
> > header and hence I planned to use the $expires(max) PV to get this. But
> > kamailio just crashes as soon as I use the variable. Here's when it
> crashes:
> >
> > if(is_method("REGISTER")) {
> >  xlog("L_INFO", "Expires is $expires(max)");
> >  if(!save("location", "0x01")) {
> > t_reply("500", "Error while saving AOR");
> >  }
> > }
> >
> > It crashes at the xlog point. Here's the backtrace for reference:
> > Reading symbols from /usr/local/kamailio/sbin/kamailio...done.
> > [New LWP 16609]
> > [Thread debugging using libthread_db enabled]
> > Using host libthread_db library
> "/lib/x86_64-linux-gnu/libthread_db.so.1".
> > Core was generated by `/usr/local/kamailio/sbin/kamailio -P
> > /var/run/kamailio.pid -f /usr/local/kamail'.
> > Program terminated with signal SIGSEGV, Segmentation fault.
> > #0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
> > param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
> > 3060 if(c->expires && c->expires->body.len) {
> > (gdb) backtrace
> > #0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
> > param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
> > #1  0x004fb6e1 in pv_get_spec_value (msg=0x7f34bd879e58,
> > sp=0x7f34bd7e9208, value=0x7ffcf67af530) at pvapi.c:1304
> > #2  0x004fbb46 in pv_printf (msg=0x7f34bd879e58,
> > list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ",
> len=0x7ffcf67af618)
> > at pvapi.c:1363
> > #3  0x7f34b67ea745 in xl_print_log (msg=0x7f34bd879e58,
> > list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ",
> len=0x7ffcf67af618)
> > at xl_lib.c:37
> > #4  0x7f34b67eb0f9 in xlog_helper (msg=0x7f34bd879e58,
> > xm=0x7f34bd808648, level=2, line=0, facility=-1) at xlog.c:215
> > #5  0x7f34b67ec160 in xlog_2_helper (msg=0x7f34bd879e58,
> > lev=0x7f34bd7e9130 "", frm=0x7f34bd808648 "84\177", mode=0, facility=-1)
> > at xlog.c:284
> > #6  0x7f34b67ec19c in xlog_2 (msg=0x7f34bd879e58, lev=0x7f34bd7e9130
> > "", frm=0x7f34bd808648 "84\177") at xlog.c:292
> > #7  0x0041e23b in do_action (h=0x7ffcf67b0b40, a=0x7f34bd817cd0,
> > msg=0x7f34bd879e58) at action.c:1065
> > #8  0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
> a=0x7f34bd813e18,
> > msg=0x7f34bd879e58) at action.c:1548
> > #9  0x0041ab16 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e8738,
> > msg=0x7f34bd879e58) at action.c:677
> > #10 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
> a=0x7f34bd7e8738,
> > msg=0x7f34bd879e58) at action.c:1548
> > #11 0x0041e094 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e89c8,
> > msg=0x7f34bd879e58) at action.c:1044
> > #12 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
> a=0x7f34bd7e19d8,
> > msg=0x7f34bd879e58) at action.c:1548
> > #13 0x0042b04d in run_top_route (a=0x7f34bd7e19d8,
> > msg=0x7f34bd879e58, c=0x0) at action.c:1634
> > #14 0x0050f3d4 in receive_msg (
> > buf=0xa80c00  "REGISTER sip:devsip.tlkn.com SIP/2.0\r\nVia:
> > SIP/2.0/UDP
> > 203.153.53.145:8300
> ;branch=z9hG4bK119a.e23ed10b856f38b41c93d1d259d8869f.0;i
> > =b1\r\nVia: SIP/2.0/TCP
> > 172.16.16.32:52358;rport=52359;received=203.153."..., len=712,
> > rcv_info=0x7ffcf67b0e60) at receive.c:196
> > #15 0x00613b9e in udp_rcv_loop () at udp_server.c:495
> > #16 0x004aa119 in main_loop () at main.c:1577
> > #17 0x004b0e1e in main (argc=5, argv=0x7ffcf67b1318) at
> main.c:2553
> >
> > Thanks,
> >
> > - Jayesh
>
> ___
> 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] crash on using the $expires variable

2015-11-27 Thread Jayesh Nambiar
Will keep that in mind for the future. Thanks a lot.

- Jayesh

On Fri, Nov 27, 2015 at 7:10 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Pushed a fix for it in master and 4.3 branches. It is recommended to open
> an issue on tracker, because is usually easier to spot the open bugs there
> than on mailing list, especially after a period of traveling.
>
> Cheers,
> Daniel
>
>
> On 27/11/15 14:31, Jayesh Nambiar wrote:
>
> So someone planning to patch it? Just asking?
>
> Thanks,
>
> - Jayesh
>
> On Thu, Nov 26, 2015 at 6:48 PM Sergey Okhapkin <s...@sokhapkin.dyndns.org>
> wrote:
>
>> Confirmed, I'm getting crash too.
>>
>> On Thursday 26 November 2015 13:05:57 Jayesh Nambiar wrote:
>> > Hi,
>> > I am trying to extract out the expires value from the incoming REGISTER
>> > request. It might be present in the Contact header or as a separate
>> Expires
>> > header and hence I planned to use the $expires(max) PV to get this. But
>> > kamailio just crashes as soon as I use the variable. Here's when it
>> crashes:
>> >
>> > if(is_method("REGISTER")) {
>> >  xlog("L_INFO", "Expires is $expires(max)");
>> >  if(!save("location", "0x01")) {
>> > t_reply("500", "Error while saving AOR");
>> >  }
>> > }
>> >
>> > It crashes at the xlog point. Here's the backtrace for reference:
>> > Reading symbols from /usr/local/kamailio/sbin/kamailio...done.
>> > [New LWP 16609]
>> > [Thread debugging using libthread_db enabled]
>> > Using host libthread_db library
>> "/lib/x86_64-linux-gnu/libthread_db.so.1".
>> > Core was generated by `/usr/local/kamailio/sbin/kamailio -P
>> > /var/run/kamailio.pid -f /usr/local/kamail'.
>> > Program terminated with signal SIGSEGV, Segmentation fault.
>> > #0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
>> > param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
>> > 3060 if(c->expires && c->expires->body.len) {
>> > (gdb) backtrace
>> > #0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
>> > param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
>> > #1  0x004fb6e1 in pv_get_spec_value (msg=0x7f34bd879e58,
>> > sp=0x7f34bd7e9208, value=0x7ffcf67af530) at pvapi.c:1304
>> > #2  0x004fbb46 in pv_printf (msg=0x7f34bd879e58,
>> > list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ",
>> len=0x7ffcf67af618)
>> > at pvapi.c:1363
>> > #3  0x7f34b67ea745 in xl_print_log (msg=0x7f34bd879e58,
>> > list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ",
>> len=0x7ffcf67af618)
>> > at xl_lib.c:37
>> > #4  0x7f34b67eb0f9 in xlog_helper (msg=0x7f34bd879e58,
>> > xm=0x7f34bd808648, level=2, line=0, facility=-1) at xlog.c:215
>> > #5  0x7f34b67ec160 in xlog_2_helper (msg=0x7f34bd879e58,
>> > lev=0x7f34bd7e9130 "", frm=0x7f34bd808648 "84\177", mode=0,
>> facility=-1)
>> > at xlog.c:284
>> > #6  0x7f34b67ec19c in xlog_2 (msg=0x7f34bd879e58, lev=0x7f34bd7e9130
>> > "", frm=0x7f34bd808648 "84\177") at xlog.c:292
>> > #7  0x0041e23b in do_action (h=0x7ffcf67b0b40, a=0x7f34bd817cd0,
>> > msg=0x7f34bd879e58) at action.c:1065
>> > #8  0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
>> a=0x7f34bd813e18,
>> > msg=0x7f34bd879e58) at action.c:1548
>> > #9  0x0041ab16 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e8738,
>> > msg=0x7f34bd879e58) at action.c:677
>> > #10 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
>> a=0x7f34bd7e8738,
>> > msg=0x7f34bd879e58) at action.c:1548
>> > #11 0x0041e094 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e89c8,
>> > msg=0x7f34bd879e58) at action.c:1044
>> > #12 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40,
>> a=0x7f34bd7e19d8,
>> > msg=0x7f34bd879e58) at action.c:1548
>> > #13 0x0042b04d in run_top_route (a=0x7f34bd7e19d8,
>> > msg=0x7f34bd879e58, c=0x0) at action.c:1634
>> > #14 0x0050f3d4 in receive_msg (
>> > buf=0xa80c00  "REGISTER sip:devsip.tlkn.com SIP/2.0\r\nVia:
>> > SIP/2.0/UDP
>> > 203.153.53.145:8300
>> ;branch=z9hG4bK119a.e23ed10b856f38b41c93d1d259d8869f.0;i
>> > =b1\r\nVia: SIP/2.0/TCP
>> > 172.16.16.32:52358;rport=52359;received=203.153."..., len=712,
>> > rcv_

[SR-Users] crash on using the $expires variable

2015-11-26 Thread Jayesh Nambiar
Hi,
I am trying to extract out the expires value from the incoming REGISTER
request. It might be present in the Contact header or as a separate Expires
header and hence I planned to use the $expires(max) PV to get this. But
kamailio just crashes as soon as I use the variable. Here's when it crashes:

if(is_method("REGISTER")) {
 xlog("L_INFO", "Expires is $expires(max)");
 if(!save("location", "0x01")) {
t_reply("500", "Error while saving AOR");
 }
}

It crashes at the xlog point. Here's the backtrace for reference:
Reading symbols from /usr/local/kamailio/sbin/kamailio...done.
[New LWP 16609]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/local/kamailio/sbin/kamailio -P
/var/run/kamailio.pid -f /usr/local/kamail'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
3060 if(c->expires && c->expires->body.len) {
(gdb) backtrace
#0  0x7f34b658b311 in pv_get_expires (msg=0x7f34bd879e58,
param=0x7f34bd7e9220, res=0x7ffcf67af530) at pv_core.c:3060
#1  0x004fb6e1 in pv_get_spec_value (msg=0x7f34bd879e58,
sp=0x7f34bd7e9208, value=0x7ffcf67af530) at pvapi.c:1304
#2  0x004fbb46 in pv_printf (msg=0x7f34bd879e58,
list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ", len=0x7ffcf67af618)
at pvapi.c:1363
#3  0x7f34b67ea745 in xl_print_log (msg=0x7f34bd879e58,
list=0x7f34bd80ef38, buf=0x7f34bd8735a0 "Expires is ", len=0x7ffcf67af618)
at xl_lib.c:37
#4  0x7f34b67eb0f9 in xlog_helper (msg=0x7f34bd879e58,
xm=0x7f34bd808648, level=2, line=0, facility=-1) at xlog.c:215
#5  0x7f34b67ec160 in xlog_2_helper (msg=0x7f34bd879e58,
lev=0x7f34bd7e9130 "", frm=0x7f34bd808648 "84\177", mode=0, facility=-1)
at xlog.c:284
#6  0x7f34b67ec19c in xlog_2 (msg=0x7f34bd879e58, lev=0x7f34bd7e9130
"", frm=0x7f34bd808648 "84\177") at xlog.c:292
#7  0x0041e23b in do_action (h=0x7ffcf67b0b40, a=0x7f34bd817cd0,
msg=0x7f34bd879e58) at action.c:1065
#8  0x0042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd813e18,
msg=0x7f34bd879e58) at action.c:1548
#9  0x0041ab16 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e8738,
msg=0x7f34bd879e58) at action.c:677
#10 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd7e8738,
msg=0x7f34bd879e58) at action.c:1548
#11 0x0041e094 in do_action (h=0x7ffcf67b0b40, a=0x7f34bd7e89c8,
msg=0x7f34bd879e58) at action.c:1044
#12 0x0042a8e7 in run_actions (h=0x7ffcf67b0b40, a=0x7f34bd7e19d8,
msg=0x7f34bd879e58) at action.c:1548
#13 0x0042b04d in run_top_route (a=0x7f34bd7e19d8,
msg=0x7f34bd879e58, c=0x0) at action.c:1634
#14 0x0050f3d4 in receive_msg (
buf=0xa80c00  "REGISTER sip:devsip.tlkn.com SIP/2.0\r\nVia:
SIP/2.0/UDP 
203.153.53.145:8300;branch=z9hG4bK119a.e23ed10b856f38b41c93d1d259d8869f.0;i=b1\r\nVia:
SIP/2.0/TCP 172.16.16.32:52358;rport=52359;received=203.153."..., len=712,
rcv_info=0x7ffcf67b0e60) at receive.c:196
#15 0x00613b9e in udp_rcv_loop () at udp_server.c:495
#16 0x004aa119 in main_loop () at main.c:1577
#17 0x004b0e1e in main (argc=5, argv=0x7ffcf67b1318) at main.c:2553

Thanks,

- Jayesh
___
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] evapi tcp parsing??

2015-10-13 Thread Jayesh Nambiar
Yes that problem is definitely solved. Sorry to not post the response. I'm
having some other issues in scaling and still trying to figure where the
problem must be, but I can scale upto 2000 cps easily now.

Thanks for the efforts and the credits :)

- Jayesh

On Sun, Oct 11, 2015 at 10:59 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> wondering if you had the time to test and see if the issue has been
> fixed...
>
> Cheers,
> Daniel
>
>
> On 30/09/15 08:31, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> thanks for troubleshooting further and pointing to the issue. I pushed a
> patch last night, hopefully fixes it. Try with latest master branch and let
> me know the results.
>
> Cheers,
> Daniel
>
> On 29/09/15 14:15, Jayesh Nambiar wrote:
>
> Hi Daniel,
> Taking a second look at the NGREP Trace I think I can see what is going
> wrong. The message in the third packet was discarded by Evapi module. If
> you look at the first two packets carefully, the first packet ends at Dev
> and the second packet is the continuation of first packet which starts with
> "iceId". The first two packets are processed perfectly fine.
> Now the third packet is a new message, but Kamailio is trying to continue
> the third packet again with the first packet. So even when the third packet
> starts with '146:' Kamailio considers it to be starting with 'Dev146'. This
> causes the evapi to discard this message since it does not remain a valid
> netstring then. Here the three packets that I'm talking about:
>
> T 198.24.63.45:48905 -> 198.24.63.39:3927 [A]
>   
> 146:{"event":"REGISTER","tindex":"43213","tlabel":"220429340","PhoneNumber":"11151","DeviceId":"abcd1234abcd1234","CallId":"10932-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"52174","tlabel":"708781916","PhoneNumber":"11150","DeviceId":"abcd1234abcd1234","CallId":"10933-15480@198.24.63.39"},147:{"event":"REGISTER","tindex":"34251","tlabel":"1354642017","PhoneNumber":"11153","DeviceId":"abcd1234abcd1234","CallId":"10935-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"7366","tlabel":"1368396808","PhoneNumber":"11154","DeviceId":"abcd1234abcd1234","CallId":"10936-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"25289","tlabel":"11971","PhoneNumber":"11152","DeviceId":"abcd1234abcd1234","C
>
> allId":"10934-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"16327","tlabel":"971937029","PhoneNumber":"11155","DeviceId":"abcd1234abcd1234","CallId":"10937-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"22242","tlabel":"609737074","PhoneNumber":"11156","DeviceId":"abcd1234abcd1234","CallId":"10938-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"10720","tlabel":"930036340","PhoneNumber":"11157","DeviceId":"abcd1234abcd1234","CallId":"10939-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"61133","tlabel":"450961398","PhoneNumber":"11158","DeviceId":"abcd1234abcd1234","CallId":"10940-15480@198.24.63.39"},146:{"event":"R
>
> EGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","Dev
>
> T 198.24.63.45:48905 -> 198.24.63.39:3927 [AP]
>   
> iceId":"abcd1234abcd1234","CallId":"10942-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"4559","tlabel":"1701553747","PhoneNumber":"11159","DeviceId":"abcd1234abcd1234","CallId":"10941-15480@198.24.63.39"},
>
> T 198.24.63.45:48905 -> 198.24.63.39:3927 [AP]
>   
> 146:{"event":"REGISTER","tindex":"52171","tlabel":"748030241",&quo

Re: [SR-Users] evapi tcp parsing??

2015-09-29 Thread Jayesh Nambiar
Thank you daniel.
Yes, they all get printed by the evapi module even when they get discarded.
If you once again check the paste-bin, the logs pasted as Kamailio Logs are
all discarded packets but show up as received by evapi module.
I believe they got discarded because a packet that came before them was
partial and evapi discarded the remaining part of the message in the new
packet and encountered error.
- Jayesh

On Mon, Sep 28, 2015 at 11:13 AM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> I will look over it during next days.
>
> One more thing, are the packages sent by you printed by evapi module, even
> not they are not processed (but discarded)?
>
> Cheers,
> Daniel
>
>
> On 25/09/15 13:55, Jayesh Nambiar wrote:
>
> Hi Daniel,
> I think this is not solved completely after you applied the patch and my
> testing shows that there are some problems left out to solve. Please do let
> me know if you are looking at more inputs which I might be able to test and
> provide. Thanks,
>
> - Jayesh
>
> On Wed, Sep 23, 2015 at 8:24 PM Jayesh Nambiar <jayesh1...@gmail.com>
> wrote:
>
>> Hello Daniel,
>> Just checking if you got what you were looking for. Do let me know if you
>> need more info on the same.
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Tue, Sep 22, 2015 at 8:23 PM Jayesh Nambiar <jayesh1...@gmail.com>
>> wrote:
>>
>>> Hi,
>>> Here's the NGREP trace where 
>>> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252"
>>> ... is present on the first line itself.
>>>
>>> 198.24.63.45:48886 -> 198.24.63.39:3927 [AP]
>>>
>>> 146:{"event":"REGISTER","tindex":"3639","tlabel":"1889788252","PhoneNumber":"42008","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11542-19872@198.24.63.39>11542-19872@198.24.63.39
>>> "},147:{"event":"REGISTER","tindex":"12600","tlabel":"1916422130","PhoneNumber":"42009","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11543-19872@198.24.63.39>11543-19872@198.24.63.39
>>> "},147:{"event":"REGISTER","tindex":"51251","tlabel":"1549871937","PhoneNumber":"42010","DeviceId":"abcd1234abcd
>>>   1234","CallId":"11544-19872@198.24.63.39
>>> "},147:{"event":"REGISTER","tindex":"60213","tlabel":"2100336684","PhoneNumber":"42011","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11545-19872@198.24.63.39>11545-19872@198.24.63.39"},146:{"event
>>>
>>> ":"REGISTER","tindex":"33328","tlabel":"622251552","PhoneNumber":"42012","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11546-19872@198.24.63.39>11546-19872@198.24.63.39
>>> "},147:{"event":"REGISTER","tindex":"42289","tlabel":"1360864805","PhoneNumber":"42013","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11547-19872@198.24.63.39>11547-19872@198.24.63.39
>>> "},146:{"event":"REGISTER","tindex":"48204","tlabel":"315887672","PhoneNumber":"42014","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11548-19872@198.24.63.39>11548-19872@198.24.63.39
>>> "},145:{"event":"REGISTER","tindex":"36682","tlabel":"18660440","PhoneNumber":"42015","DeviceId":"abcd1234abcd1234","CallId":"
>>> <11549-19872@198.24.63.39>11549-19872@198.24.63.39"},
>>>
>>> And yes, this packet is right after the second packet in the pastebin
>>> trace.
>>>
>>> Thanks,
>>>
>>> - Jayesh
>>>
>>>
>>>
>>> On Tue, Sep 22, 2015 at 5:03 PM Daniel-Constantin Mierla <
>>> mico...@gmail.com> wrote:
>>>
>>>> Hello,
>>>>
>>>> I haven't seen in the ngrep when the data containing next line is
>>>> received:
>>

Re: [SR-Users] evapi tcp parsing??

2015-09-29 Thread Jayesh Nambiar
vapi_recv_client(): executing event route for frame:
[{"event":"REGISTER","tindex":"61133","tlabel":"450961398","PhoneNumber":"11158","DeviceId":"abcd1234abcd1234","CallId":"
10940-15480@198.24.63.39"}] (146)

Sep 29 05:35:14 v39 /usr/local/kamailio-dev/sbin/kamailio[15387]: DEBUG:
evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43da4b67e0]
[146:{"event":"REGISTER","tindex":"4559","tlabel":"1701553747","PhoneNumber":"11159","DeviceId":"abcd1234abcd1234","CallId":"
10941-15480@198.24.63.39"},] (151)

NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48905] - received [iceId":"abcd1234abcd1234","CallId":"
10942-15480@198.24.63.39
"},146:{"event":"REGISTER","tindex":"4559","tlabel":"1701553747","PhoneNumber":"11159","DeviceId":"abcd1234abcd1234","CallId":"
10941-15480@198.24.63.39"},] (214) (88)

DEBUG: evapi [evapi_dispatch.c:370]: evapi_recv_client(): executing event
route for frame:
[{"event":"REGISTER","tindex":"4559","tlabel":"1701553747","PhoneNumber":"11159","DeviceId":"abcd1234abcd1234","CallId":"
10941-15480@198.24.63.39"}] (146)

DEBUG: evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43d93c2a70]
[146:{"event":"REGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","DeviceId":"abcd1234abcd1234","CallId":"
10942-15480@198.24.63.39"},] (151)

DEBUG: evapi [evapi_dispatch.c:370]: evapi_recv_client(): executing event
route for frame:
[{"event":"REGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","DeviceId":"abcd1234abcd1234","CallId":"
10942-15480@198.24.63.39"}] (146)

DEBUG: evapi [evapi_dispatch.c:353]: evapi_recv_client(): residual data
[146:{"event":"REGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","Dev]
(88)

DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
mismatch the ending char ("):
[{"event":"REGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","Dev146:{"event":"REGISTER","tindex":"52171","tlabel":"748030241",]
(146)

*Logs for discarded message:*
DEBUG: evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43da3e69a0]
[146:{"event":"REGISTER","tindex":"52171","tlabel":"748030241","PhoneNumber":"11161","DeviceId":"abcd1234abcd1234","CallId":"
10943-15480@198.24.63.39"},] (151)

NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48905] - received
[146:{"event":"REGISTER","tindex":"52171","tlabel":"748030241","PhoneNumber":"11161","DeviceId":"abcd1234abcd1234","CallId":"
10943-15480@198.24.63.39"},] (151) (88)

*Logs for messages after the discarded message:*
DEBUG: evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43da3e6aa0]
[146:{"event":"REGISTER","tindex":"25286","tlabel":"809034258","PhoneNumber":"11163","DeviceId":"abcd1234abcd1234","CallId":"
10944-15480@198.24.63.39"},] (151)

NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48905] - received
[146:{"event":"REGISTER","tindex":"25286","tlabel":"809034258","PhoneNumber":"11163","DeviceId":"abcd1234abcd1234","CallId":"
10944-15480@198.24.63.39"},] (151) (0)

DEBUG: evapi [evapi_dispatch.c:370]: evapi_recv_client(): executing event
route for frame:
[{"event":"REGISTER","tindex":"25286","tlabel":"809034258","PhoneNumber":"11163","DeviceId":"abcd1234abcd1234","CallId":"
10944-15480@198.24.63.39"}] (146)

DEBUG: evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43d9598778]
[146:{"event":"REGISTER","tindex":"34248","tlabel":"187029249","PhoneNumber":"11162","DeviceId":"abcd1234abcd1234","CallId":"
10945-15480@198.24.63.39"},] (151)

NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48905] - received
[146:{"event":"REGISTER","tindex":"34248","tlabel":"187029249","PhoneNumber":"11162","DeviceId":"abcd1234abcd1234","CallId":"
10945-15480@198.24.63.39"},] (151) (0)

DEBUG: evapi [evapi_dispatch.c:370]: evapi_recv_client(): executing event
route for frame:
[{"event":"REGISTER","tindex":"34248","tlabel":"187029249","PhoneNumber":"11162","DeviceId":"abcd1234abcd1234","CallId":"
10945-15480@198.24.63.39"}] (146)

DEBUG: evapi [evapi_dispatch.c:492]: evapi_recv_notify(): received
[0x7f43d9598878]
[145:{"event":"REGISTER","tindex":"7363","tlabel":"949153805","PhoneNumber":"11164","DeviceId":"abcd1234abcd1234","CallId":"
10946-15480@198.24.63.39"},] (150)

NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48905] - received
[145:{"event":"REGISTER","tindex":"7363","tlabel":"949153805","PhoneNumber":"11164","DeviceId":"abcd1234abcd1234","CallId":"
10946-15480@198.24.63.39"},] (150) (0)

DEBUG: evapi [evapi_dispatch.c:370]: evapi_recv_client(): executing event
route for frame:
[{"event":"REGISTER","tindex":"7363","tlabel":"949153805","PhoneNumber":"11164","DeviceId":"abcd1234abcd1234","CallId":"
10946-15480@198.24.63.39"}] (145)

Just in case if you need to see the NGREP trace for the above messages, it
is here:
http://pastebin.com/4zTKmBJX

Thanks,

- Jayesh


On Tue, Sep 29, 2015 at 12:16 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> can you send here the log messages printed by evapi that contain "] -
> received [" which have:
>
> - the previous bunch of json documents that were processed ok (just before
> the one that was discarded)
> - the bunch of json documents that were discarded
> - the next bunch of json documents that were processed ok
>
> The logs were sent on could of emails and pastebin, so it is hard to track
> them -- if you have the logs, just locate the log messages with the
> discarded json and send it here along with the previous and next logs.
>
> Cheers,
> Daniel
>
>
> On 28/09/15 17:04, Jayesh Nambiar wrote:
>
> Thank you daniel.
> Yes, they all get printed by the evapi module even when they get
> discarded. If you once again check the paste-bin, the logs pasted as
> Kamailio Logs are all discarded packets but show up as received by evapi
> module.
> I believe they got discarded because a packet that came before them was
> partial and evapi discarded the remaining part of the message in the new
> packet and encountered error.
> - Jayesh
>
> On Mon, Sep 28, 2015 at 11:13 AM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I will look over it during next days.
>>
>> One more thing, are the packages sent by you printed by evapi module,
>> even not they are not processed (but discarded)?
>>
>> Cheers,
>> Daniel
>>
>>
> --
> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
> http://www.linkedin.com/in/miconda
> Book: SIP Routing With Kamailio - 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] evapi tcp parsing??

2015-09-29 Thread Jayesh Nambiar
Hi Daniel,
Taking a second look at the NGREP Trace I think I can see what is going
wrong. The message in the third packet was discarded by Evapi module. If
you look at the first two packets carefully, the first packet ends at Dev
and the second packet is the continuation of first packet which starts with
"iceId". The first two packets are processed perfectly fine.
Now the third packet is a new message, but Kamailio is trying to continue
the third packet again with the first packet. So even when the third packet
starts with '146:' Kamailio considers it to be starting with 'Dev146'. This
causes the evapi to discard this message since it does not remain a valid
netstring then. Here the three packets that I'm talking about:

T 198.24.63.45:48905 -> 198.24.63.39:3927 [A]
  
146:{"event":"REGISTER","tindex":"43213","tlabel":"220429340","PhoneNumber":"11151","DeviceId":"abcd1234abcd1234","CallId":"10932-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"52174","tlabel":"708781916","PhoneNumber":"11150","DeviceId":"abcd1234abcd1234","CallId":"10933-15480@198.24.63.39"},147:{"event":"REGISTER","tindex":"34251","tlabel":"1354642017","PhoneNumber":"11153","DeviceId":"abcd1234abcd1234","CallId":"10935-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"7366","tlabel":"1368396808","PhoneNumber":"11154","DeviceId":"abcd1234abcd1234","CallId":"10936-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"25289","tlabel":"11971","PhoneNumber":"11152","DeviceId":"abcd1234abcd1234","CallId":"10934-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"16327","tlabel":"971937029","PhoneNumber":"11155","DeviceId":"abcd1234abcd1234","CallId":"10937-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"22242","tlabel":"609737074","PhoneNumber":"11156","DeviceId":"abcd1234abcd1234","CallId":"10938-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"10720","tlabel":"930036340","PhoneNumber":"11157","DeviceId":"abcd1234abcd1234","CallId":"10939-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"61133","tlabel":"450961398","PhoneNumber":"11158","DeviceId":"abcd1234abcd1234","CallId":"10940-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"43210","tlabel":"639090568","PhoneNumber":"11160","Dev

T 198.24.63.45:48905 -> 198.24.63.39:3927 [AP]
  
iceId":"abcd1234abcd1234","CallId":"10942-15480@198.24.63.39"},146:{"event":"REGISTER","tindex":"4559","tlabel":"1701553747","PhoneNumber":"11159","DeviceId":"abcd1234abcd1234","CallId":"10941-15480@198.24.63.39"},

T 198.24.63.45:48905 -> 198.24.63.39:3927 [AP]
  
146:{"event":"REGISTER","tindex":"52171","tlabel":"748030241","PhoneNumber":"11161","DeviceId":"abcd1234abcd1234","CallId":"10943-15480@198.24.63.39"},


On Tue, Sep 29, 2015 at 4:43 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hi Daniel:
> I did a new test where I stopped as soon as I saw one message that got
> discarded. Basically the following message got discarded:
>
> {"event":"REGISTER","tindex":"52171","tlabel":"748030241","PhoneNumber":"11161","DeviceId":"abcd1234abcd1234","CallId":"
> 10943-15480@198.24.63.39"}
> The CallId parameter in the above json is auto incremented, so I tried
> gathering logs for messages with following CallIds:
> "CallId":"10940-15480@198.24.63.39"
> "CallId":"10941-15480@198.24.63.39"
> "CallId":"10942-15480@198.24.63.39&q

Re: [SR-Users] evapi tcp parsing??

2015-09-25 Thread Jayesh Nambiar
Hi Daniel,
I think this is not solved completely after you applied the patch and my
testing shows that there are some problems left out to solve. Please do let
me know if you are looking at more inputs which I might be able to test and
provide. Thanks,

- Jayesh

On Wed, Sep 23, 2015 at 8:24 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hello Daniel,
> Just checking if you got what you were looking for. Do let me know if you
> need more info on the same.
>
> Thanks,
>
> - Jayesh
>
> On Tue, Sep 22, 2015 at 8:23 PM Jayesh Nambiar <jayesh1...@gmail.com>
> wrote:
>
>> Hi,
>> Here's the NGREP trace where 
>> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252"
>> ... is present on the first line itself.
>>
>> 198.24.63.45:48886 -> 198.24.63.39:3927 [AP]
>>
>> 146:{"event":"REGISTER","tindex":"3639","tlabel":"1889788252","PhoneNumber":"42008","DeviceId":"abcd1234abcd1234","CallId":"
>> 11542-19872@198.24.63.39
>> "},147:{"event":"REGISTER","tindex":"12600","tlabel":"1916422130","PhoneNumber":"42009","DeviceId":"abcd1234abcd1234","CallId":"
>> 11543-19872@198.24.63.39
>> "},147:{"event":"REGISTER","tindex":"51251","tlabel":"1549871937","PhoneNumber":"42010","DeviceId":"abcd1234abcd
>>   1234","CallId":"11544-19872@198.24.63.39
>> "},147:{"event":"REGISTER","tindex":"60213","tlabel":"2100336684","PhoneNumber":"42011","DeviceId":"abcd1234abcd1234","CallId":"
>> 11545-19872@198.24.63.39"},146:{"event
>>
>> ":"REGISTER","tindex":"33328","tlabel":"622251552","PhoneNumber":"42012","DeviceId":"abcd1234abcd1234","CallId":"
>> 11546-19872@198.24.63.39
>> "},147:{"event":"REGISTER","tindex":"42289","tlabel":"1360864805","PhoneNumber":"42013","DeviceId":"abcd1234abcd1234","CallId":"
>> 11547-19872@198.24.63.39
>> "},146:{"event":"REGISTER","tindex":"48204","tlabel":"315887672","PhoneNumber":"42014","DeviceId":"abcd1234abcd1234","CallId":"
>> 11548-19872@198.24.63.39
>> "},145:{"event":"REGISTER","tindex":"36682","tlabel":"18660440","PhoneNumber":"42015","DeviceId":"abcd1234abcd1234","CallId":"
>> 11549-19872@198.24.63.39"},
>>
>> And yes, this packet is right after the second packet in the pastebin
>> trace.
>>
>> Thanks,
>>
>> - Jayesh
>>
>>
>>
>> On Tue, Sep 22, 2015 at 5:03 PM Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> I haven't seen in the ngrep when the data containing next line is
>>> received:
>>>
>>> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252" ...
>>>
>>> Do you still have it? Is it after:
>>>
>>> {"event":"REGISTER","tindex":"12603","tlabel":"626010915", ...
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 22/09/15 09:09, Jayesh Nambiar wrote:
>>>
>>> Hi,
>>> Took time to get back with the test results as I was trying to analyze
>>> too much myself before getting back on the list. Also I was stuck with
>>> weird error of module version mismatch, but I figured and solved that issue.
>>> So I do see the logs "frame size mismatch" when I miss the events. Since
>>> the logs are too huge, I am sending it in pastebin. Here it is:
>>> http://pastebin.com/MzTpYsrk
>>>
>>> In Kamailio Logs, I see:
>>> DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
>>> mismatch the ending char
>>> (h):[{"event":"REGISTER","tindex":"12603","tlabel":"

Re: [SR-Users] evapi tcp parsing??

2015-09-24 Thread Jayesh Nambiar
Hello Daniel,
Just checking if you got what you were looking for. Do let me know if you
need more info on the same.

Thanks,

- Jayesh

On Tue, Sep 22, 2015 at 8:23 PM Jayesh Nambiar <jayesh1...@gmail.com> wrote:

> Hi,
> Here's the NGREP trace where 
> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252"
> ... is present on the first line itself.
>
> 198.24.63.45:48886 -> 198.24.63.39:3927 [AP]
>
> 146:{"event":"REGISTER","tindex":"3639","tlabel":"1889788252","PhoneNumber":"42008","DeviceId":"abcd1234abcd1234","CallId":"
> 11542-19872@198.24.63.39
> "},147:{"event":"REGISTER","tindex":"12600","tlabel":"1916422130","PhoneNumber":"42009","DeviceId":"abcd1234abcd1234","CallId":"
> 11543-19872@198.24.63.39
> "},147:{"event":"REGISTER","tindex":"51251","tlabel":"1549871937","PhoneNumber":"42010","DeviceId":"abcd1234abcd
>   1234","CallId":"11544-19872@198.24.63.39
> "},147:{"event":"REGISTER","tindex":"60213","tlabel":"2100336684","PhoneNumber":"42011","DeviceId":"abcd1234abcd1234","CallId":"
> 11545-19872@198.24.63.39"},146:{"event
>
> ":"REGISTER","tindex":"33328","tlabel":"622251552","PhoneNumber":"42012","DeviceId":"abcd1234abcd1234","CallId":"
> 11546-19872@198.24.63.39
> "},147:{"event":"REGISTER","tindex":"42289","tlabel":"1360864805","PhoneNumber":"42013","DeviceId":"abcd1234abcd1234","CallId":"
> 11547-19872@198.24.63.39
> "},146:{"event":"REGISTER","tindex":"48204","tlabel":"315887672","PhoneNumber":"42014","DeviceId":"abcd1234abcd1234","CallId":"
> 11548-19872@198.24.63.39
> "},145:{"event":"REGISTER","tindex":"36682","tlabel":"18660440","PhoneNumber":"42015","DeviceId":"abcd1234abcd1234","CallId":"
> 11549-19872@198.24.63.39"},
>
> And yes, this packet is right after the second packet in the pastebin
> trace.
>
> Thanks,
>
> - Jayesh
>
>
>
> On Tue, Sep 22, 2015 at 5:03 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I haven't seen in the ngrep when the data containing next line is
>> received:
>>
>> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252" ...
>>
>> Do you still have it? Is it after:
>>
>> {"event":"REGISTER","tindex":"12603","tlabel":"626010915", ...
>>
>> Cheers,
>> Daniel
>>
>>
>> On 22/09/15 09:09, Jayesh Nambiar wrote:
>>
>> Hi,
>> Took time to get back with the test results as I was trying to analyze
>> too much myself before getting back on the list. Also I was stuck with
>> weird error of module version mismatch, but I figured and solved that issue.
>> So I do see the logs "frame size mismatch" when I miss the events. Since
>> the logs are too huge, I am sending it in pastebin. Here it is:
>> http://pastebin.com/MzTpYsrk
>>
>> In Kamailio Logs, I see:
>> DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
>> mismatch the ending char
>> (h):[{"event":"REGISTER","tindex":"12603","tlabel":"626010915
>> ","PhoneNumber":"42000","D146:"event":"REGISTER","tindex":"3639","tlabel":"
>> 1889788252","P] (146)
>>
>> Whereas the messages in ngrep looks good where the messages are split in
>> two TCP packets. The first packet ends at D and the second packet is the
>> proper continuation which send the rest. But it feels Kamailio skipped the
>> beginning of the message and started parsing at colon again and it thinks
>> the netstring started with D146 which is incorrect. Hence, it never emitted
>> any event for

Re: [SR-Users] evapi tcp parsing??

2015-09-23 Thread Jayesh Nambiar
Hi,
Here's the NGREP trace where
{"event":"REGISTER","tindex":"3639","tlabel":"1889788252"
... is present on the first line itself.

198.24.63.45:48886 -> 198.24.63.39:3927 [AP]

146:{"event":"REGISTER","tindex":"3639","tlabel":"1889788252","PhoneNumber":"42008","DeviceId":"abcd1234abcd1234","CallId":"
11542-19872@198.24.63.39
"},147:{"event":"REGISTER","tindex":"12600","tlabel":"1916422130","PhoneNumber":"42009","DeviceId":"abcd1234abcd1234","CallId":"
11543-19872@198.24.63.39
"},147:{"event":"REGISTER","tindex":"51251","tlabel":"1549871937","PhoneNumber":"42010","DeviceId":"abcd1234abcd
  1234","CallId":"11544-19872@198.24.63.39
"},147:{"event":"REGISTER","tindex":"60213","tlabel":"2100336684","PhoneNumber":"42011","DeviceId":"abcd1234abcd1234","CallId":"
11545-19872@198.24.63.39"},146:{"event

":"REGISTER","tindex":"33328","tlabel":"622251552","PhoneNumber":"42012","DeviceId":"abcd1234abcd1234","CallId":"
11546-19872@198.24.63.39
"},147:{"event":"REGISTER","tindex":"42289","tlabel":"1360864805","PhoneNumber":"42013","DeviceId":"abcd1234abcd1234","CallId":"
11547-19872@198.24.63.39
"},146:{"event":"REGISTER","tindex":"48204","tlabel":"315887672","PhoneNumber":"42014","DeviceId":"abcd1234abcd1234","CallId":"
11548-19872@198.24.63.39
"},145:{"event":"REGISTER","tindex":"36682","tlabel":"18660440","PhoneNumber":"42015","DeviceId":"abcd1234abcd1234","CallId":"
11549-19872@198.24.63.39"},

And yes, this packet is right after the second packet in the pastebin trace.

Thanks,

- Jayesh



On Tue, Sep 22, 2015 at 5:03 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> I haven't seen in the ngrep when the data containing next line is received:
>
> {"event":"REGISTER","tindex":"3639","tlabel":"1889788252" ...
>
> Do you still have it? Is it after:
>
> {"event":"REGISTER","tindex":"12603","tlabel":"626010915", ...
>
> Cheers,
> Daniel
>
>
> On 22/09/15 09:09, Jayesh Nambiar wrote:
>
> Hi,
> Took time to get back with the test results as I was trying to analyze too
> much myself before getting back on the list. Also I was stuck with weird
> error of module version mismatch, but I figured and solved that issue.
> So I do see the logs "frame size mismatch" when I miss the events. Since
> the logs are too huge, I am sending it in pastebin. Here it is:
> http://pastebin.com/MzTpYsrk
>
> In Kamailio Logs, I see:
> DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
> mismatch the ending char
> (h):[{"event":"REGISTER","tindex":"12603","tlabel":"626010915
> ","PhoneNumber":"42000","D146:"event":"REGISTER","tindex":"3639","tlabel":"
> 1889788252","P] (146)
>
> Whereas the messages in ngrep looks good where the messages are split in
> two TCP packets. The first packet ends at D and the second packet is the
> proper continuation which send the rest. But it feels Kamailio skipped the
> beginning of the message and started parsing at colon again and it thinks
> the netstring started with D146 which is incorrect. Hence, it never emitted
> any event for the messages in the first chunk.
>
> Hoping this to be helpful !! Thanks.
>
> - Jayesh
>
>
> On Mon, Sep 21, 2015 at 4:37 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I pushed another commit to add more debug messages to see if the event
>> route is supposed to be executed or not. Can you run the tests again and
>> give again the log messages for missing event route executions?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 21/09/15

Re: [SR-Users] evapi tcp parsing??

2015-09-22 Thread Jayesh Nambiar
Hi,
Took time to get back with the test results as I was trying to analyze too
much myself before getting back on the list. Also I was stuck with weird
error of module version mismatch, but I figured and solved that issue.
So I do see the logs "frame size mismatch" when I miss the events. Since
the logs are too huge, I am sending it in pastebin. Here it is:
http://pastebin.com/MzTpYsrk

In Kamailio Logs, I see:
DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
mismatch the ending char
(h):[{"event":"REGISTER","tindex":"12603","tlabel":"626010915
","PhoneNumber":"42000","D146:"event":"REGISTER","tindex":"3639","tlabel":"
1889788252","P] (146)

Whereas the messages in ngrep looks good where the messages are split in
two TCP packets. The first packet ends at D and the second packet is the
proper continuation which send the rest. But it feels Kamailio skipped the
beginning of the message and started parsing at colon again and it thinks
the netstring started with D146 which is incorrect. Hence, it never emitted
any event for the messages in the first chunk.

Hoping this to be helpful !! Thanks.

- Jayesh


On Mon, Sep 21, 2015 at 4:37 PM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> Hello,
>
> I pushed another commit to add more debug messages to see if the event
> route is supposed to be executed or not. Can you run the tests again and
> give again the log messages for missing event route executions?
>
> Cheers,
> Daniel
>
>
> On 21/09/15 09:04, Jayesh Nambiar wrote:
>
> Hi Daniel,
> I have captured debug messages after testing with your latest commit on
> master. Once again, here's what I'm doing exactly for my test:
> 1) Use SIPp to send OPTIONS towards Kamailio.
> 2) On getting options send event as follows:
>
> evapi_async_relay("{\"event\":\"REGISTER\",\"tindex\":\"$T(id_index)\",\"tlabel\":\"$T(id_label)\",\"PhoneNumber\":\"$avp(phone_number)\",\"DeviceId\":\"$avp(device_id)\",\"CallId\":\"$ci\"}");
> 3) There's a client connected which listens for messages on this socket,
> parses the netstring, and sends same data back as netstring to Kamailio.
> 4) On the event_route[evapi:message-received, I do the following:
> xlog("L_INFO", "GOT [$evapi(msg)] from $evapi(srcaddr):$evapi(srcport)\n");
> if($evapi(msg)=~"REGISTER" && $evapi(msg)=~"tindex") {
>   jansson_get_field("$evapi(msg)", "tlabel", "$var(tlabel)");
> jansson_get_field("$evapi(msg)", "tindex", "$var(tindex)");
>$var(t_index) = $(var(tindex){s.int});
> $var(t_label) = $(var(tlabel){s.int});
>t_continue('$var(t_index)', '$var(t_label)', 'REGISTER_RESPONSE');
> exit;
> }
> 5) On route[REGISTER_RESPONSE], I send 200 OK to SIPp
>
> Now here are detailed logs for which neither SIPp didnt get a response nor
> the GOT [$evapi(msg)] from $evapi(srcaddr):$evapi(srcport)\n"); got logged
> in the syslog:
>
> First Event:
> DEBUG: evapi [evapi_dispatch.c:598]: evapi_relay(): relaying event data
> [{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"
> <23021-12910@198.24.63.39>23021-12910@198.24.63.39"}] (146)
> DEBUG: evapi [evapi_dispatch.c:623]: evapi_relay(): sending
> [0x7f132588de68]
> [146:{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"
> <23021-12910@198.24.63.39>23021-12910@198.24.63.39"},] (151)
>
> DEBUG: evapi [evapi_dispatch.c:488]: evapi_recv_notify(): received
> [0x7f132588de68]
> [146:{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"
> <23021-12910@198.24.63.39>23021-12910@198.24.63.39"},] (151)
> NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
> 198.24.63.45:48881] - received
> [146:{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"

Re: [SR-Users] evapi tcp parsing??

2015-09-22 Thread Jayesh Nambiar
Also forgot to mention, this starts happening at around 1200cps. And using
SIPp I accelerate from 500cps to 1200cps very quick. So it might be related
to concurrency is what I'm assuming. Thanks.

- Jayesh

On Tue, Sep 22, 2015 at 12:40 PM Jayesh Nambiar <jayesh1...@gmail.com>
wrote:

> Hi,
> Took time to get back with the test results as I was trying to analyze too
> much myself before getting back on the list. Also I was stuck with weird
> error of module version mismatch, but I figured and solved that issue.
> So I do see the logs "frame size mismatch" when I miss the events. Since
> the logs are too huge, I am sending it in pastebin. Here it is:
> http://pastebin.com/MzTpYsrk
>
> In Kamailio Logs, I see:
> DEBUG: evapi [evapi_dispatch.c:361]: evapi_recv_client(): frame size
> mismatch the ending char
> (h):[{"event":"REGISTER","tindex":"12603","tlabel":"626010915
> ","PhoneNumber":"42000","D146:"event":"REGISTER","tindex":"3639","tlabel":"
> 1889788252","P] (146)
>
> Whereas the messages in ngrep looks good where the messages are split in
> two TCP packets. The first packet ends at D and the second packet is the
> proper continuation which send the rest. But it feels Kamailio skipped the
> beginning of the message and started parsing at colon again and it thinks
> the netstring started with D146 which is incorrect. Hence, it never emitted
> any event for the messages in the first chunk.
>
> Hoping this to be helpful !! Thanks.
>
> - Jayesh
>
>
> On Mon, Sep 21, 2015 at 4:37 PM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I pushed another commit to add more debug messages to see if the event
>> route is supposed to be executed or not. Can you run the tests again and
>> give again the log messages for missing event route executions?
>>
>> Cheers,
>> Daniel
>>
>>
>> On 21/09/15 09:04, Jayesh Nambiar wrote:
>>
>> Hi Daniel,
>> I have captured debug messages after testing with your latest commit on
>> master. Once again, here's what I'm doing exactly for my test:
>> 1) Use SIPp to send OPTIONS towards Kamailio.
>> 2) On getting options send event as follows:
>>
>> evapi_async_relay("{\"event\":\"REGISTER\",\"tindex\":\"$T(id_index)\",\"tlabel\":\"$T(id_label)\",\"PhoneNumber\":\"$avp(phone_number)\",\"DeviceId\":\"$avp(device_id)\",\"CallId\":\"$ci\"}");
>> 3) There's a client connected which listens for messages on this socket,
>> parses the netstring, and sends same data back as netstring to Kamailio.
>> 4) On the event_route[evapi:message-received, I do the following:
>> xlog("L_INFO", "GOT [$evapi(msg)] from
>> $evapi(srcaddr):$evapi(srcport)\n");
>> if($evapi(msg)=~"REGISTER" && $evapi(msg)=~"tindex") {
>>   jansson_get_field("$evapi(msg)", "tlabel", "$var(tlabel)");
>> jansson_get_field("$evapi(msg)", "tindex", "$var(tindex)");
>>$var(t_index) = $(var(tindex){s.int});
>> $var(t_label) = $(var(tlabel){s.int});
>>t_continue('$var(t_index)', '$var(t_label)', 'REGISTER_RESPONSE');
>> exit;
>> }
>> 5) On route[REGISTER_RESPONSE], I send 200 OK to SIPp
>>
>> Now here are detailed logs for which neither SIPp didnt get a response
>> nor the GOT [$evapi(msg)] from $evapi(srcaddr):$evapi(srcport)\n"); got
>> logged in the syslog:
>>
>> First Event:
>> DEBUG: evapi [evapi_dispatch.c:598]: evapi_relay(): relaying event data
>> [{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"
>> <23021-12910@198.24.63.39>23021-12910@198.24.63.39"}] (146)
>> DEBUG: evapi [evapi_dispatch.c:623]: evapi_relay(): sending
>> [0x7f132588de68]
>> [146:{"event":"REGISTER","tindex":"26266","tlabel":"587925078","PhoneNumber":"21956","DeviceId":"abcd1234abcd1234","CallId":"
>> <23021-12910@198.24.63.39>23021-12910@198.24.63.39"},] (151)
>>
>> DEBUG: evapi [evapi_dispatch.c:488]: evapi_recv_notify(): received
>> [0x7f132588de68]
>> [146:{"event":"REGI

Re: [SR-Users] evapi tcp parsing??

2015-09-21 Thread Jayesh Nambiar
g event data
[{"event":"REGISTER","tindex":"22127","tlabel":"1896682192","PhoneNumber":"73168","DeviceId":"abcd1234abcd1234","CallId":"
49957-13056@198.24.63.39"}] (147)
  DEBUG: evapi [evapi_dispatch.c:623]: evapi_relay(): sending
[0x7f132568e850]
[147:{"event":"REGISTER","tindex":"22127","tlabel":"1896682192","PhoneNumber":"73168","DeviceId":"abcd1234abcd1234","CallId":"
49957-13056@198.24.63.39"},] (152)

  DEBUG: evapi [evapi_dispatch.c:488]: evapi_recv_notify(): received
[0x7f132568e850]
[147:{"event":"REGISTER","tindex":"22127","tlabel":"1896682192","PhoneNumber":"73168","DeviceId":"abcd1234abcd1234","CallId":"
49957-13056@198.24.63.39"},] (152)
  NOTICE: evapi [evapi_dispatch.c:290]: evapi_recv_client(): {0} [
198.24.63.45:48881] - received
[147:{"event":"REGISTER","tindex":"22127","tlabel":"1896682192","PhoneNumber":"73168","DeviceId":"abcd1234abcd1234","CallId":"
49957-13056@198.24.63.39"},] (152) (0)

Thanks,

- Jayesh
On Sat, Sep 19, 2015 at 3:55 AM Daniel-Constantin Mierla <mico...@gmail.com>
wrote:

> I pushed a commit to add more debug message while processing received
> data. You can use debugger module to set a higher debug level for evapi
> module in order to see what happens.
>
> I checked the netstring packet size and it is invalid (unless email
> stripped some white chars there) -- for example in:
>
>
>
> 145:{"event":"REGISTER","tindex":"55567","tlabel":"627458699","PhoneNumber":"20711","DeviceId":"abcd1234abcd1234","CallId":
> "21225-3848@5.6.7.8" <21225-3848@5.6.7.8>},
>
> the size is 141, not 145 -- it looks like the size includes the size
> itself plus the delimiters ':,'. The size is only the effective data, see:
>
> https://en.wikipedia.org/wiki/Netstring
>
> If evapi gets a packet with an invalid size, then it discards the buffer
> content.
>
> See if the app on the other side of evapi connection builds netstrings
> with wrong size.
>
> Cheers,
> Daniel
>
>
> On 18/09/15 23:19, Jayesh Nambiar wrote:
>
> Here are the tests that I did:
>
> With the patch applied, I see that Kamailio is invoking event individually
> for each netstring even when they come in different chunks. But I did see
> instances where when there were complete netstrings in a single chunk;
> kamailio did not raise an event for them. Here's the illustration:
>
> T 1.2.3.4:48873 -> 5.6.7.8:3927 [AP]
>
> 146:{"event":"REGISTER","tindex":"16916","tlabel":"1753048277","PhoneNumber":"20708","DeviceId":"abcd1234abcd1234","CallId":"
> <21220-3848@5.6.7.8>21220-3848@5.6.7.8
> "},144:{"event":"REGISTER","tindex":"7954","tlabel":"254315075","PhoneNumber":"20709","DeviceId":"abcd1234abcd1234","CallId":"
> <21223-3848@5.6.7.8>21223-3848@5.6.7.8
> "},145:{"event":"REGISTER","tindex":"64529","tlabel":"599481568","PhoneNumber":"20709","DeviceId":"abcd1234abcd1234","CallId":"
> <21222-3848@5.6.7.8>21222-3848@5.6.7.8"},145:{"event":"REGISTER","tindex":"46605","tlabel":"112015324","PhoneNumber":"20710","DeviceId"
>
>
>
>
> T 1.2.3.4:48873 -> 5.6.7.8:3927 [AP]
>   :"abcd1234abcd1234","CallId":"21224-3848@5.6.7.8"},
>
> *The above two chunks contain 4 proper netstrings where the second chunk
> contains part of the 4th netstring. In this case Evapi properly raised 4
> individual events.*
>
> 1.2.3.4:48873 -> 5.6.7.8:3927 [AP]
>
> 145:{"event":"REGISTER","tindex":"55567","tlabel":"627458699","PhoneNumber":"20711","DeviceId":"abcd1234abcd1234","CallId":"
> <21225-3848@5.6.7.8>21225-3848@5.6.7.8
> "},143:{"event":"REGISTER","tindex":"28682","tlabel":"9676691","PhoneNumber":

Re: [SR-Users] evapi tcp parsing??

2015-09-18 Thread Jayesh Nambiar
Will have this tested by tomorrow and will get back to you. Thanks.

- Jayesh

On Fri, Sep 18, 2015 at 1:41 PM, Daniel-Constantin Mierla <mico...@gmail.com
> wrote:

> Hello,
>
> I just pushed a patch to master branch that should cope with partial data
> received on tcp connection. No time to test at all, therefore any feedback
> will be appreciated.
>
> Cheers,
> Daniel
>
>
> On 15/09/15 14:52, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> I will look if there are options in libev to buffer data or try to
> implement a buffering mechanism locally for such cases.
>
> Cheers,
> Daniel
>
> On 14/09/15 23:00, Jayesh Nambiar wrote:
>
> Hello Daniel,
> After further testing with evapi module, I figured that when Netstrings
> are used, an event route is invoked individually for each message even if
> if multiple netstring messages are received in a single TCP packet. But
> this doesn't work effectively when a single proper message is split-up in
> two packets. For Example, if a message arrives as:
> 12:Hello World!, 12:Hello World!, 12:Hello World! in a single packet,
> kamailio properly invokes the event route "evapi:message-received" thrice
> for every individual proper netstring message.
> But if the first packet contains:
> 12:Hello World!, 12:Hello
> And Second Packet contains:
>  World!, 12:Hello World!
> the event route is invoked only once !!
>
> The above pattern is very much possible while sending and receiving
> packets over TCP Socket. Our tests for receiving an approximately 150 byte
> message over evapi socket at the rate of roughly 1000cps causes a lot of
> real events to be missed because of the above problem. You can never be
> sure when TCP will split messages in different chunks.
> This definitely looks like a bug which makes it not very reliable at large
> scale deployments. Would really appreciate your inputs on this. Thanks;
>
> - Jayesh
>
>
>
> On Thu, Sep 10, 2015 at 4:01 PM, Jayesh Nambiar < <jayesh1...@gmail.com>
> jayesh1...@gmail.com> wrote:
>
>> Hi Daniel,
>> Thanks for the quick response. So if I do not use Netstrings, does
>> Kamailio allow me to create a custom logic in the script. For eg. if I
>> decide to use newline as a delimiter, can I keep buffering the message
>> until I encounter the delimiter from the event route and then execute
>> whatever I have to within the script??
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Thu, Sep 10, 2015 at 1:29 PM, Daniel-Constantin Mierla <
>> <mico...@gmail.com>mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> tcb is stream protocol and several messages can be queued on the pipe at
>>> the same time. That is the reason for netstring format, to be able to
>>> easily detect the boundaries of each message. If netstring format is
>>> enabled and kamailio receives several messages at once, it splits them and
>>> for each is executing the event route.
>>>
>>> If netstring format is not used, the kamailio is executing the event
>>> route with the entire content that was read at once from the tcp connection.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 09/09/15 22:01, Jayesh Nambiar wrote:
>>>
>>> Hello,
>>> I'm exploring the evapi module for my kamailio to interface with an
>>> external node.js app for third party stuff like AAA, billing engine tasks,
>>> notifications and so on. I followed and took some ideas from the rtjson and
>>> evapi tutorial found here(
>>> http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs) to build
>>> the node.js app consuming events.
>>> When I stress tested the scenario using SIPp and tried sending a lot of
>>> events at 300-350cps from Kamailio, I noticed that at times the client is
>>> receiving 2-3 events in a single message together although I do
>>> event_sync_relay once per SIP message received and have netstrings enabled.
>>> I believe this is a typical behavior of TCP and needs to be handled by the
>>> client using some kind of Netstring handler. Please correct me if I'm wrong.
>>> And hence I'd like to know what particularly needs to be taken care of
>>> while writing a client that is listening for events on raw tcp socket and
>>> how does kamailio handle this situation while receiving messages over TCP
>>> socket?? Does kamailio recognize the end of netstring properly on
>>> evapi:message-received and give exactly one message to take care of on
>>> every "message-received" event or should that be handle

Re: [SR-Users] evapi tcp parsing??

2015-09-18 Thread Jayesh Nambiar
Here are the tests that I did:

With the patch applied, I see that Kamailio is invoking event individually
for each netstring even when they come in different chunks. But I did see
instances where when there were complete netstrings in a single chunk;
kamailio did not raise an event for them. Here's the illustration:

T 1.2.3.4:48873 -> 5.6.7.8:3927 [AP]
146:{"event":"REGISTER","tindex":"16916","tlabel":"1753048277","PhoneNumber":"20708","DeviceId":"abcd1234abcd1234","CallId":"
21220-3848@5.6.7.8
"},144:{"event":"REGISTER","tindex":"7954","tlabel":"254315075","PhoneNumber":"20709","DeviceId":"abcd1234abcd1234","CallId":"
21223-3848@5.6.7.8
"},145:{"event":"REGISTER","tindex":"64529","tlabel":"599481568","PhoneNumber":"20709","DeviceId":"abcd1234abcd1234","CallId":"
21222-3848@5.6.7.8"},145:{"event":"REGISTER","tindex":"46605","tlabel":"112015324","PhoneNumber":"20710","DeviceId"




T 1.2.3.4:48873 -> 5.6.7.8:3927 [AP]
  :"abcd1234abcd1234","CallId":"21224-3848@5.6.7.8"},

*The above two chunks contain 4 proper netstrings where the second chunk
contains part of the 4th netstring. In this case Evapi properly raised 4
individual events.*

1.2.3.4:48873 -> 5.6.7.8:3927 [AP]

145:{"event":"REGISTER","tindex":"55567","tlabel":"627458699","PhoneNumber":"20711","DeviceId":"abcd1234abcd1234","CallId":"
21225-3848@5.6.7.8
"},143:{"event":"REGISTER","tindex":"28682","tlabel":"9676691","PhoneNumber":"20712","DeviceId":"abcd1234abcd1234","CallId":"
21226-3848@5.6.7.8"},

*This above chunk contains two complete netstrings but Kamailio never
raised events for these two netstrings.*

For the events that were not raised I see proper Kamailio Logs which is:
evapi_recv_client(): {0} [1.2.3.4:48873] - received
[145:{"event":"REGISTER","tindex":"55567","tlabel":"627458699","PhoneNumber":"20711","DeviceId":"abcd1234abcd1234","CallId":"
21225-3848@5.6.7.8
"},143:{"event":"REGISTER","tindex":"28682","tlabel":"9676691","PhoneNumber":"20712","DeviceId":"abcd1234abcd1234","CallId":"
21226-3848@5.6.7.8"},]

But I don't see the logs that I've written in the script after the event
was raised, which means Kamailio did not invoke events for these two
netstrings.

So in my tests, out of 27232 messages sent, there were approximately 27
messages for which the events were not raised by Evapi. The rate of
messages started at 500cps and I stopped after I saw missed events at
around 1200cps.

Thanks, and do let me know for any further tests or information required
about the same.

- Jayesh



On Fri, Sep 18, 2015 at 2:55 PM, Jayesh Nambiar <jayesh1...@gmail.com>
wrote:

> Will have this tested by tomorrow and will get back to you. Thanks.
>
> - Jayesh
>
> On Fri, Sep 18, 2015 at 1:41 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> I just pushed a patch to master branch that should cope with partial data
>> received on tcp connection. No time to test at all, therefore any feedback
>> will be appreciated.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 15/09/15 14:52, Daniel-Constantin Mierla wrote:
>>
>> Hello,
>>
>> I will look if there are options in libev to buffer data or try to
>> implement a buffering mechanism locally for such cases.
>>
>> Cheers,
>> Daniel
>>
>> On 14/09/15 23:00, Jayesh Nambiar wrote:
>>
>> Hello Daniel,
>> After further testing with evapi module, I figured that when Netstrings
>> are used, an event route is invoked individually for each message even if
>> if multiple netstring messages are received in a single TCP packet. But
>> this doesn't work effectively when a single proper message is split-up in
>> two packets. For Example, if a message arrives as:
>> 12:Hello World!, 12:Hello World!, 12:Hello World! in a single packet,
>> kamailio properly invokes the event route "evapi:message-received" thrice
>> for every individua

Re: [SR-Users] evapi tcp parsing??

2015-09-15 Thread Jayesh Nambiar
Do let me know if I should run some specific tests for you all to get a
little more clarity and information and I'd be happy to do those test and
update you with results. I eagerly want to take a positive decision on
going ahead with evapi module as it looks very promising. Only if we can
solve these minor issues.

Thanks,

- Jayesh

On Tue, Sep 15, 2015 at 2:30 AM, Jayesh Nambiar <jayesh1...@gmail.com>
wrote:

> Hello Daniel,
> After further testing with evapi module, I figured that when Netstrings
> are used, an event route is invoked individually for each message even if
> if multiple netstring messages are received in a single TCP packet. But
> this doesn't work effectively when a single proper message is split-up in
> two packets. For Example, if a message arrives as:
> 12:Hello World!, 12:Hello World!, 12:Hello World! in a single packet,
> kamailio properly invokes the event route "evapi:message-received" thrice
> for every individual proper netstring message.
> But if the first packet contains:
> 12:Hello World!, 12:Hello
> And Second Packet contains:
>  World!, 12:Hello World!
> the event route is invoked only once !!
>
> The above pattern is very much possible while sending and receiving
> packets over TCP Socket. Our tests for receiving an approximately 150 byte
> message over evapi socket at the rate of roughly 1000cps causes a lot of
> real events to be missed because of the above problem. You can never be
> sure when TCP will split messages in different chunks.
> This definitely looks like a bug which makes it not very reliable at large
> scale deployments. Would really appreciate your inputs on this. Thanks;
>
> - Jayesh
>
>
>
> On Thu, Sep 10, 2015 at 4:01 PM, Jayesh Nambiar <jayesh1...@gmail.com>
> wrote:
>
>> Hi Daniel,
>> Thanks for the quick response. So if I do not use Netstrings, does
>> Kamailio allow me to create a custom logic in the script. For eg. if I
>> decide to use newline as a delimiter, can I keep buffering the message
>> until I encounter the delimiter from the event route and then execute
>> whatever I have to within the script??
>>
>> Thanks,
>>
>> - Jayesh
>>
>> On Thu, Sep 10, 2015 at 1:29 PM, Daniel-Constantin Mierla <
>> mico...@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> tcb is stream protocol and several messages can be queued on the pipe at
>>> the same time. That is the reason for netstring format, to be able to
>>> easily detect the boundaries of each message. If netstring format is
>>> enabled and kamailio receives several messages at once, it splits them and
>>> for each is executing the event route.
>>>
>>> If netstring format is not used, the kamailio is executing the event
>>> route with the entire content that was read at once from the tcp connection.
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 09/09/15 22:01, Jayesh Nambiar wrote:
>>>
>>> Hello,
>>> I'm exploring the evapi module for my kamailio to interface with an
>>> external node.js app for third party stuff like AAA, billing engine tasks,
>>> notifications and so on. I followed and took some ideas from the rtjson and
>>> evapi tutorial found here(
>>> <http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs>
>>> http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs) to build
>>> the node.js app consuming events.
>>> When I stress tested the scenario using SIPp and tried sending a lot of
>>> events at 300-350cps from Kamailio, I noticed that at times the client is
>>> receiving 2-3 events in a single message together although I do
>>> event_sync_relay once per SIP message received and have netstrings enabled.
>>> I believe this is a typical behavior of TCP and needs to be handled by the
>>> client using some kind of Netstring handler. Please correct me if I'm wrong.
>>> And hence I'd like to know what particularly needs to be taken care of
>>> while writing a client that is listening for events on raw tcp socket and
>>> how does kamailio handle this situation while receiving messages over TCP
>>> socket?? Does kamailio recognize the end of netstring properly on
>>> evapi:message-received and give exactly one message to take care of on
>>> every "message-received" event or should that be handled in the script
>>> somewhere !!
>>> I also referred cgrates client over evapi example which is written in
>>> GO, but I couldnt find them handling TCP streams clearly either.
>>> I'd really appreciate some expert suggestion here to ma

Re: [SR-Users] evapi tcp parsing??

2015-09-14 Thread Jayesh Nambiar
Hello Daniel,
After further testing with evapi module, I figured that when Netstrings are
used, an event route is invoked individually for each message even if if
multiple netstring messages are received in a single TCP packet. But this
doesn't work effectively when a single proper message is split-up in two
packets. For Example, if a message arrives as:
12:Hello World!, 12:Hello World!, 12:Hello World! in a single packet,
kamailio properly invokes the event route "evapi:message-received" thrice
for every individual proper netstring message.
But if the first packet contains:
12:Hello World!, 12:Hello
And Second Packet contains:
 World!, 12:Hello World!
the event route is invoked only once !!

The above pattern is very much possible while sending and receiving packets
over TCP Socket. Our tests for receiving an approximately 150 byte message
over evapi socket at the rate of roughly 1000cps causes a lot of real
events to be missed because of the above problem. You can never be sure
when TCP will split messages in different chunks.
This definitely looks like a bug which makes it not very reliable at large
scale deployments. Would really appreciate your inputs on this. Thanks;

- Jayesh



On Thu, Sep 10, 2015 at 4:01 PM, Jayesh Nambiar <jayesh1...@gmail.com>
wrote:

> Hi Daniel,
> Thanks for the quick response. So if I do not use Netstrings, does
> Kamailio allow me to create a custom logic in the script. For eg. if I
> decide to use newline as a delimiter, can I keep buffering the message
> until I encounter the delimiter from the event route and then execute
> whatever I have to within the script??
>
> Thanks,
>
> - Jayesh
>
> On Thu, Sep 10, 2015 at 1:29 PM, Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> tcb is stream protocol and several messages can be queued on the pipe at
>> the same time. That is the reason for netstring format, to be able to
>> easily detect the boundaries of each message. If netstring format is
>> enabled and kamailio receives several messages at once, it splits them and
>> for each is executing the event route.
>>
>> If netstring format is not used, the kamailio is executing the event
>> route with the entire content that was read at once from the tcp connection.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 09/09/15 22:01, Jayesh Nambiar wrote:
>>
>> Hello,
>> I'm exploring the evapi module for my kamailio to interface with an
>> external node.js app for third party stuff like AAA, billing engine tasks,
>> notifications and so on. I followed and took some ideas from the rtjson and
>> evapi tutorial found here(
>> <http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs>
>> http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs) to build the
>> node.js app consuming events.
>> When I stress tested the scenario using SIPp and tried sending a lot of
>> events at 300-350cps from Kamailio, I noticed that at times the client is
>> receiving 2-3 events in a single message together although I do
>> event_sync_relay once per SIP message received and have netstrings enabled.
>> I believe this is a typical behavior of TCP and needs to be handled by the
>> client using some kind of Netstring handler. Please correct me if I'm wrong.
>> And hence I'd like to know what particularly needs to be taken care of
>> while writing a client that is listening for events on raw tcp socket and
>> how does kamailio handle this situation while receiving messages over TCP
>> socket?? Does kamailio recognize the end of netstring properly on
>> evapi:message-received and give exactly one message to take care of on
>> every "message-received" event or should that be handled in the script
>> somewhere !!
>> I also referred cgrates client over evapi example which is written in GO,
>> but I couldnt find them handling TCP streams clearly either.
>> I'd really appreciate some expert suggestion here to make an informed
>> decision on using the evapi module for a large scale solution.
>>
>> Thanks,
>>
>> - Jayesh
>>
>>
>>
>>
>> ___
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing 
>> listsr-us...@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlahttp://twitter.com/#!/miconda - 
>> http://www.linkedin.com/in/miconda
>> Book: SIP Routing With Kamailio - http://www.asipto.com
>> Kamailio Advanced Training, Sep 28-30, 2015, in Berlin - 
>> http://asipto.com/u/kat
>>
>>
>> ___
>> 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] evapi tcp parsing??

2015-09-09 Thread Jayesh Nambiar
Hello,
I'm exploring the evapi module for my kamailio to interface with an
external node.js app for third party stuff like AAA, billing engine tasks,
notifications and so on. I followed and took some ideas from the rtjson and
evapi tutorial found here(
http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs) to build the
node.js app consuming events.
When I stress tested the scenario using SIPp and tried sending a lot of
events at 300-350cps from Kamailio, I noticed that at times the client is
receiving 2-3 events in a single message together although I do
event_sync_relay once per SIP message received and have netstrings enabled.
I believe this is a typical behavior of TCP and needs to be handled by the
client using some kind of Netstring handler. Please correct me if I'm wrong.
And hence I'd like to know what particularly needs to be taken care of
while writing a client that is listening for events on raw tcp socket and
how does kamailio handle this situation while receiving messages over TCP
socket?? Does kamailio recognize the end of netstring properly on
evapi:message-received and give exactly one message to take care of on
every "message-received" event or should that be handled in the script
somewhere !!
I also referred cgrates client over evapi example which is written in GO,
but I couldnt find them handling TCP streams clearly either.
I'd really appreciate some expert suggestion here to make an informed
decision on using the evapi module for a large scale solution.

Thanks,

- Jayesh
___
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] cnxcc module insufficient credit

2013-07-29 Thread Jayesh Nambiar
Hey Carlos,
I would test and get back.

--- Jayesh
On Jul 29, 2013 7:27 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com
wrote:

 Hi Jayesh,

 I just applied the changes and updated the documentation. Please give it a
 try.

 Regards,
 Carlos


 On Wed, Jul 17, 2013 at 11:01 PM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Thank you Carlos.

 --- Jayesh


 On Wed, Jul 17, 2013 at 11:19 PM, Carlos Ruiz Díaz 
 carlos.ruizd...@gmail.com wrote:

 Ok. Right now I'm short in time but this weekend I'm gonna schedule
 myself this.

  I'll let you know.

 Carlos.


 On Wed, Jul 17, 2013 at 11:40 AM, Jayesh Nambiar 
 jayesh1...@gmail.comwrote:

 Thanks for the reply Carlos. Checking before relaying the call is how I
 am doing it right now but it feels like it would have been more neater if
 done in the cnxcc module itself since it is anyways checking the credit
 after the call is active !!

 I would wait for that behavior though in the cnxcc module. Thanks again.

 --- Jayesh


 On Wed, Jul 17, 2013 at 8:32 PM, Carlos Ruiz Díaz 
 carlos.ruizd...@gmail.com wrote:

 Hi Jayesh,

 yes, I think this behavior can be added.

 As a workaround you can check the credit data before relaying the
 INVITE so you can reject it immediately in case of lacking enough credit.
 Have you tried that?

 Regards,
 Carlos.


 On Wed, Jul 17, 2013 at 10:57 AM, Jayesh Nambiar jayesh1...@gmail.com
  wrote:

 Hi All,
 I was testing out the cnxcc module and it works well for prepaid
 credit handling. One problem that I saw with the module is that if the
 credit is insufficient it still allows the call to pass and then 
 disconnect
 within a second.
 Is it possible that if the credit is insufficient for the call, the
 dialog can be terminated before the call is placed with a 4xx kind of
 response !! Just a thought.

 Thanks,

 --- Jayesh

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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] floating point operations in kamailio

2013-07-22 Thread Jayesh Nambiar
Hi Daniel,
Thank you for the reply. One scenario was like to check if the available
credit is greater than or equal to required credit, which requires
comparison of float values in the script. Currently the solution is to
multiply the rates by say 1000 and then compare the values in the
script. It works well but doesnt look like a right way of doing it. So I
might probably offload this task to the DB !!

I will definitely use XAVP more and try to offload arithmetic operations to
DB as much as possible.

Thanks,

--- Jayesh


On Mon, Jul 22, 2013 at 3:46 PM, Daniel-Constantin Mierla mico...@gmail.com
 wrote:

 Hello,


 On 7/17/13 3:00 PM, Jayesh Nambiar wrote:

 Is there a plan to support floating point arithmetic operations in
 kamailio in the near future.

 it might happen, although is not a high priority here (and don't know
 about other devs), because there are ways to do it right now in many cases
 - if you give details about some specific needs, we may be able to point
 the solution.

 If you need to work with such value in your module (e.g., store and
 retrieve later), XAVPs has lots of types that can store (only the
 arithmetic operations from config are limited to int and string).

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.com
 http://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/**micondahttp://www.linkedin.com/in/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-**usershttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

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


[SR-Users] get CDR fields in DB

2013-07-22 Thread Jayesh Nambiar
Hello All,
Is there no straight forward way of getting the ACC module CDR values into
the DB. I mean logging the start_time, end_time and duration in DB directly
using some pseudo variables from the config script !!

I think, if a dialog is maintained, all the values related to that dialog
is anyways available and a manual insert on dlg_end event can be called.
But I am only missing the milli-second precision that the CDR module
provides !!

Thanks for any pointers.

--- Jayesh
___
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] Get duration in cnxcc:call-shutdown event

2013-07-20 Thread Jayesh Nambiar
Hello,
Is there a straight forward way of getting the duration of the call in
cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
does not exist. I dont get the value of $DLG_lifetime even in dialog:end
event when the call ends through cnxcc module. Even the cdr flag of acc
module doesn't get the duration and it logs, invalid values !!
Currently, I am storing the timestamp in htable when the call is answered
and then subtract it from the current timestamp in the cnxcc:shutdown event
route to get the duration. Something like this:

onreply_route[MANAGE_REPLY] {
xdbg(incoming reply\n);

if(status==200) {
$sht(ts=$ci) = $Ts;
}
}

event_route[cnxcc:call-shutdown] {

$var(duration) = $TS-$sht(ts=$ci);
sht_rm_name_re(ts=$ci);

xlog(L_INFO, Duration of call was $var(duration));
}


Any more correct way of doing this would be very helpful.

Thanks,

--- Jayesh
___
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] Get duration in cnxcc:call-shutdown event

2013-07-20 Thread Jayesh Nambiar
Thanks for the quick reply Carlos. Really appreciate it.

Thanks,

--- Jayesh


On Sat, Jul 20, 2013 at 9:13 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com
 wrote:

 The lack of values in some of the standard pseudo variables is a
 limitation of the dialog module which does not provide  the necessary
 information in the event route block in cases when the call is forced to
 end.

 You can calculate the duration using:

 * $var(duration)  = $TS - $dlg(start_ts);*
 *
 *
 Regards,
 Carlos





 On Sat, Jul 20, 2013 at 2:07 AM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hello,
 Is there a straight forward way of getting the duration of the call in
 cnxcc-call-shutdown event. The $DLG_lifetime returns NULL as the dialog
 does not exist. I dont get the value of $DLG_lifetime even in dialog:end
 event when the call ends through cnxcc module. Even the cdr flag of acc
 module doesn't get the duration and it logs, invalid values !!
 Currently, I am storing the timestamp in htable when the call is answered
 and then subtract it from the current timestamp in the cnxcc:shutdown event
 route to get the duration. Something like this:

 onreply_route[MANAGE_REPLY] {
 xdbg(incoming reply\n);

 if(status==200) {
 $sht(ts=$ci) = $Ts;
 }
 }

 event_route[cnxcc:call-shutdown] {

 $var(duration) = $TS-$sht(ts=$ci);
 sht_rm_name_re(ts=$ci);

 xlog(L_INFO, Duration of call was $var(duration));
 }


 Any more correct way of doing this would be very helpful.

 Thanks,

 --- Jayesh

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

 ___
 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] floating point operations in kamailio

2013-07-17 Thread Jayesh Nambiar
Is there a plan to support floating point arithmetic operations in kamailio
in the near future. I am looking at something similar to mathops module in
opensips.

Thanks,

--- Jayesh
___
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] cnxcc module insufficient credit

2013-07-17 Thread Jayesh Nambiar
Hi All,
I was testing out the cnxcc module and it works well for prepaid credit
handling. One problem that I saw with the module is that if the credit is
insufficient it still allows the call to pass and then disconnect within a
second.
Is it possible that if the credit is insufficient for the call, the dialog
can be terminated before the call is placed with a 4xx kind of response !!
Just a thought.

Thanks,

--- Jayesh
___
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] cnxcc module insufficient credit

2013-07-17 Thread Jayesh Nambiar
Thanks for the reply Carlos. Checking before relaying the call is how I am
doing it right now but it feels like it would have been more neater if done
in the cnxcc module itself since it is anyways checking the credit after
the call is active !!

I would wait for that behavior though in the cnxcc module. Thanks again.

--- Jayesh


On Wed, Jul 17, 2013 at 8:32 PM, Carlos Ruiz Díaz carlos.ruizd...@gmail.com
 wrote:

 Hi Jayesh,

 yes, I think this behavior can be added.

 As a workaround you can check the credit data before relaying the INVITE
 so you can reject it immediately in case of lacking enough credit. Have you
 tried that?

 Regards,
 Carlos.


 On Wed, Jul 17, 2013 at 10:57 AM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hi All,
 I was testing out the cnxcc module and it works well for prepaid credit
 handling. One problem that I saw with the module is that if the credit is
 insufficient it still allows the call to pass and then disconnect within a
 second.
 Is it possible that if the credit is insufficient for the call, the
 dialog can be terminated before the call is placed with a 4xx kind of
 response !! Just a thought.

 Thanks,

 --- Jayesh

 ___
 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




 --
 Carlos
 http://caruizdiaz.com
 +595981146623

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


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


Re: [SR-Users] Error with ACK from SIPML5

2013-06-23 Thread Jayesh Nambiar
 - checking if port
8080 (advertise 0) matches port 5065
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[forward.c:462]: check_self(): check_self: host != me
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[socket_info.c:589]: grep_sock_info(): grep_sock_info - checking if
host==us: 12==12  [126.128.68.9] == [126.128.68.9]
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[socket_info.c:593]: grep_sock_info(): grep_sock_info - checking if port
5060 (advertise 0) matches port 5060
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: rr
[loose.c:778]: after_loose(): Topmost route URI:
'sip:126.128.68.9:5060;lr;sipml5-outbound;transport=udp'
is me
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: rr
[loose.c:862]: after_loose(): URI to be processed: 'sip:126.128.68.9:8080
;transport=ws;r2=on;lr=on;ftag=7EKISKAakFG2QZ2JvpDO;nat=yes'
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: rr
[loose.c:871]: after_loose(): Next URI is a loose router
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG:
siputils [checks.c:106]: has_totag(): totag found
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: rr
[loose.c:974]: check_route_param(): params are
;lr;sipml5-outbound;transport=udp
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: INFO:
script: Inside Natmanage ACK
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG:
siputils [checks.c:106]: has_totag(): totag found
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: tm
[t_lookup.c:1395]: t_newtran(): DEBUG: t_newtran: msg id=8 , global msg
id=7 , T on entrance=(nil)
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: tm
[t_lookup.c:534]: t_lookup_request(): t_lookup_request: start searching:
hash=6, isACK=1
un 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: tm
[t_lookup.c:492]: matching_3261(): *DEBUG: RFC3261 transaction matching
failed*
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: tm
[t_lookup.c:716]: t_lookup_request(): *DEBUG: t_lookup_request: no
transaction found*
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: tm
[t_funcs.c:311]: t_relay_to(): SER: forwarding ACK  statelessly
*Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: WARNING:
core [msg_translator.c:2499]: via_builder(): TCP/TLS connection (id: 0)
for WebSocket could not be found*
*Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: ERROR:
core [msg_translator.c:1725]: build_req_buf_from_sip_req(): could not
create Via header*
*Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: ERROR:
core [forward.c:607]: forward_request(): ERROR: forward_request: building
failed*
*Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: ERROR: sl
[sl_funcs.c:371]: sl_reply_error(): ERROR: sl_reply_error used: I'm
terribly sorry, server error occurred (1/SL)*
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying
list (nil)
Jun 23 18:45:46  /usr/local/ghanti-ko/sbin/kamailio[22879]: last message
repeated 5 times
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[xavp.c:447]: xavp_destroy_list(): destroying xavp list (nil)
Jun 23 18:45:46 v9 /usr/local/ghanti-ko/sbin/kamailio[22879]: DEBUG: core
[receive.c:293]: receive_msg(): receive_msg: cleaning up

Thanks for all the help.

--- Jayesh


On Sun, Jun 23, 2013 at 8:53 PM, Daniel-Constantin Mierla mico...@gmail.com
 wrote:

  Are you sure the error messages are printed for this ACK, because it has
 to be sent via UDP, not via WS, thus the messages seem to be unrelated.

 Get the log messages with debug=3 in order to see what is happening.

 Cheers,
 Daniel


 On 6/22/13 9:10 AM, Jayesh Nambiar wrote:

 Hi,
 Is it possible that this could be a problem in the script. But when I call
 using a normal SIP Client like X-Lite, it works well. This only happens
 when the request comes on websocket. Is there something to be handled
 specially when handling requests like ACK over websocket?
 The reference is more or less taken from
 https://gist.github.com/jesusprubio/4066845

  --- Jayesh


 On Wed, Jun 19, 2013 at 2:14 PM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hi Daniel,
 I checked using the kamcmd command and I see the webrtc connection
 active. The ACK comes from the webrtc client but somehow kamailio is unable
 to create a via header and forward the request. The ACK coming from webrtc
 client is as follows:

  SEND: ACK sip:1223@126.128.68.8:5065;transport=udp SIP/2.0
 Via: SIP/2.0/WS
 df7jal23ls0d.invalid;branch=z9hG4bKJ0Qsiuh94B2slPLp19qH;rport
 From: Jayeshsip:101...@ghanti.com;tag=vsTKsfB1ZR8EkHTPqzyc
 To: sip:1...@ghanti.com;tag=UQ9veX0vUg7QS
 Contact: Jayesh
 sip:101001@df7jal23ls0d.invalid;rtcweb-breaker=no;click2call

Re: [SR-Users] Error with ACK from SIPML5

2013-06-22 Thread Jayesh Nambiar
Hi,
Is it possible that this could be a problem in the script. But when I call
using a normal SIP Client like X-Lite, it works well. This only happens
when the request comes on websocket. Is there something to be handled
specially when handling requests like ACK over websocket?
The reference is more or less taken from
https://gist.github.com/jesusprubio/4066845

--- Jayesh


On Wed, Jun 19, 2013 at 2:14 PM, Jayesh Nambiar jayesh1...@gmail.comwrote:

 Hi Daniel,
 I checked using the kamcmd command and I see the webrtc connection active.
 The ACK comes from the webrtc client but somehow kamailio is unable to
 create a via header and forward the request. The ACK coming from webrtc
 client is as follows:

 SEND: ACK sip:1223@126.128.68.8:5065;transport=udp SIP/2.0
 Via: SIP/2.0/WS
 df7jal23ls0d.invalid;branch=z9hG4bKJ0Qsiuh94B2slPLp19qH;rport
 From: Jayeshsip:101...@ghanti.com;tag=vsTKsfB1ZR8EkHTPqzyc
 To: sip:1...@ghanti.com;tag=UQ9veX0vUg7QS
 Contact: Jayeshsip:101001@df7jal23ls0d.invalid
 ;rtcweb-breaker=no;click2call=no;transport=ws;+g.oma.sip-im;+sip.ice;language=en,fr
 Call-ID: 2c76d5ee-e9d0-7f22-8be2-76e80b4ab48b
 CSeq: 42684 ACK
 Content-Length: 0
 Route: sip:126.128.68.9:5060;lr;sipml5-outbound;transport=udp
 Max-Forwards: 70
 Proxy-Authorization: Digest username=101001,realm=ghanti.com
 ,nonce=UcFsQ1HBaxc84k4N1J00fpVDj9G57x5p,uri=sip:1223@126.128.68.8:5065
 ;transport=udp,response=5b18a2182c335315875224f2244fb48b,algorithm=MD5
 Route: sip:126.128.68.9:8080
 ;transport=ws;r2=on;lr=on;ftag=vsTKsfB1ZR8EkHTPqzyc;nat=yes
 Route: sip:126.128.68.9;r2=on;lr=on;ftag=vsTKsfB1ZR8EkHTPqzyc;nat=yes
 User-Agent: IM-client/OMA1.0 sipML5-v1.2013.03.27
 Organization: Doubango Telecom

 Where 126.128.68.9:5060 is the Kamailio; 126.128.68.8:5065 is a
 freeswitch playing music and the request is received on 
 126.128.68.9:8080which is kamailio acting as a websocket server.
 Also the connection between Kamailio and Freeswitch is UDP. I am not able
 to use the websocket module just because of this small problem caused in
 signaling. Any help is really appreciated. Could it be related to the
 nathelper module?

 Thanks,

 --- Jayesh


 On Tue, Jun 18, 2013 at 2:17 PM, Daniel-Constantin Mierla 
 mico...@gmail.com wrote:

  Hello,


 On 6/14/13 4:52 PM, Jayesh Nambiar wrote:

  Hello All,
 I have a setup which is SIPML5 - Kamailio(Websocket) - Freeswitch. All
 I am trying to do is initiate a call from SIPML5 and Play a Music file from
 freeswitch. This works, but the call hangs up after 30 seconds due to ACK
 timeout from from the SIPML5.

  What I can see is the SIPML5 from Chrome does send an ACK on websocket,
 but I see the following error in kamailio syslog:

  *via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be
 found*
 *ERROR: core [msg_translator.c:1725]: build_req_buf_from_sip_req():
 could not create Via header*
 *ERROR: core [forward.c:607]: forward_request(): ERROR:
 forward_request: building failed*
 *ERROR: sl [sl_funcs.c:371]: sl_reply_error(): ERROR: sl_reply_error
 used: I'm terribly sorry, server error occurred (1/SL)*

  Can someone help me understand what I am missing here and why kamailio
 is not able to create a VIA header to forward this request towards
 freeswitch. I have built a simple config file by following
 https://gist.github.com/jesusprubio/4066845 as reference.

  Any help in understanding this is really appreciated.

 looks like the web rtc connection was down (closed by one side or
 interrupted by the network). You can check with kamcmd the list of active
 connections.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - 
 http://www.asipto.comhttp://twitter.com/#!/miconda - 
 http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
   * 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



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


Re: [SR-Users] Error with ACK from SIPML5

2013-06-19 Thread Jayesh Nambiar
Hi Daniel,
I checked using the kamcmd command and I see the webrtc connection active.
The ACK comes from the webrtc client but somehow kamailio is unable to
create a via header and forward the request. The ACK coming from webrtc
client is as follows:

SEND: ACK sip:1223@126.128.68.8:5065;transport=udp SIP/2.0
Via: SIP/2.0/WS
df7jal23ls0d.invalid;branch=z9hG4bKJ0Qsiuh94B2slPLp19qH;rport
From: Jayeshsip:101...@ghanti.com;tag=vsTKsfB1ZR8EkHTPqzyc
To: sip:1...@ghanti.com;tag=UQ9veX0vUg7QS
Contact: Jayeshsip:101001@df7jal23ls0d.invalid
;rtcweb-breaker=no;click2call=no;transport=ws;+g.oma.sip-im;+sip.ice;language=en,fr
Call-ID: 2c76d5ee-e9d0-7f22-8be2-76e80b4ab48b
CSeq: 42684 ACK
Content-Length: 0
Route: sip:126.128.68.9:5060;lr;sipml5-outbound;transport=udp
Max-Forwards: 70
Proxy-Authorization: Digest username=101001,realm=ghanti.com
,nonce=UcFsQ1HBaxc84k4N1J00fpVDj9G57x5p,uri=sip:1223@126.128.68.8:5065
;transport=udp,response=5b18a2182c335315875224f2244fb48b,algorithm=MD5
Route: sip:126.128.68.9:8080
;transport=ws;r2=on;lr=on;ftag=vsTKsfB1ZR8EkHTPqzyc;nat=yes
Route: sip:126.128.68.9;r2=on;lr=on;ftag=vsTKsfB1ZR8EkHTPqzyc;nat=yes
User-Agent: IM-client/OMA1.0 sipML5-v1.2013.03.27
Organization: Doubango Telecom

Where 126.128.68.9:5060 is the Kamailio; 126.128.68.8:5065 is a freeswitch
playing music and the request is received on 126.128.68.9:8080 which is
kamailio acting as a websocket server.
Also the connection between Kamailio and Freeswitch is UDP. I am not able
to use the websocket module just because of this small problem caused in
signaling. Any help is really appreciated. Could it be related to the
nathelper module?

Thanks,

--- Jayesh


On Tue, Jun 18, 2013 at 2:17 PM, Daniel-Constantin Mierla mico...@gmail.com
 wrote:

  Hello,


 On 6/14/13 4:52 PM, Jayesh Nambiar wrote:

  Hello All,
 I have a setup which is SIPML5 - Kamailio(Websocket) - Freeswitch. All I
 am trying to do is initiate a call from SIPML5 and Play a Music file from
 freeswitch. This works, but the call hangs up after 30 seconds due to ACK
 timeout from from the SIPML5.

  What I can see is the SIPML5 from Chrome does send an ACK on websocket,
 but I see the following error in kamailio syslog:

  *via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be
 found*
 *ERROR: core [msg_translator.c:1725]: build_req_buf_from_sip_req():
 could not create Via header*
 *ERROR: core [forward.c:607]: forward_request(): ERROR:
 forward_request: building failed*
 *ERROR: sl [sl_funcs.c:371]: sl_reply_error(): ERROR: sl_reply_error
 used: I'm terribly sorry, server error occurred (1/SL)*

  Can someone help me understand what I am missing here and why kamailio
 is not able to create a VIA header to forward this request towards
 freeswitch. I have built a simple config file by following
 https://gist.github.com/jesusprubio/4066845 as reference.

  Any help in understanding this is really appreciated.

 looks like the web rtc connection was down (closed by one side or
 interrupted by the network). You can check with kamcmd the list of active
 connections.

 Cheers,
 Daniel

 --
 Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda 
 - http://www.linkedin.com/in/miconda
 Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
   * 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


___
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] Error with ACK from SIPML5

2013-06-14 Thread Jayesh Nambiar
Hello All,
I have a setup which is SIPML5 - Kamailio(Websocket) - Freeswitch. All I
am trying to do is initiate a call from SIPML5 and Play a Music file from
freeswitch. This works, but the call hangs up after 30 seconds due to ACK
timeout from from the SIPML5.

What I can see is the SIPML5 from Chrome does send an ACK on websocket, but
I see the following error in kamailio syslog:

*via_builder(): TCP/TLS connection (id: 0) for WebSocket could not be found*
*ERROR: core [msg_translator.c:1725]: build_req_buf_from_sip_req(): could
not create Via header*
*ERROR: core [forward.c:607]: forward_request(): ERROR: forward_request:
building failed*
*ERROR: sl [sl_funcs.c:371]: sl_reply_error(): ERROR: sl_reply_error used:
I'm terribly sorry, server error occurred (1/SL)*

Can someone help me understand what I am missing here and why kamailio is
not able to create a VIA header to forward this request towards freeswitch.
I have built a simple config file by following
https://gist.github.com/jesusprubio/4066845 as reference.

Any help in understanding this is really appreciated.

Thanks,

--- Jayesh
___
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 Postgres error - unknown field type: 2

2013-06-03 Thread Jayesh Nambiar
Hi,
I am using Kamailio with Postgres and I get this error while using the
load_credentials parameter in the auth_db module. Basically I am loading a
column whose datatype is BIGINT or int8 in postgres. Kamailio shows up with
this error in syslog when authorization is done:
NOTICE: core [db_ut.c:485]: unknown field type: 2, setting value to null
And it sets the value of AVP as null.

When I change the datatype to int4 and put a smaller value it works. I
googled a little and figured that kamailio supports bigint, but I still get
this error. I am using Kamailio 4.0.1 to test. Any pointers or directions
that I should look at??

Would really appreciate the response.

Thanks,

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