[SR-Users] Kamctl stats

2016-11-17 Thread Alexandru Covalschi
Hello list,

Where can I found any information to completely understand what do values 
returned by 'kamctl stats' represent?

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


[SR-Users] tcp_set_connection_lifetime - does not close the connection immediately

2016-11-17 Thread Andy
I am calling tcp_set_connection_lifetime(conid, 1),
which I understand is one sec after now,

but I see it taking upto 60 secs to kill the connection,
is there any other timer which has a larger interval which might affect
this.



--
View this message in context: 
http://sip-router.1086192.n5.nabble.com/tcp-set-connection-lifetime-does-not-close-the-connection-immediately-tp153434.html
Sent from the Users mailing list archive at Nabble.com.

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


[SR-Users] Is there a way to detect inactive MSRP chat sessions without using SIP session timers

2016-11-17 Thread Pranathi Venkatayogi
Hi,

  I am using MSRP feature of Blink client. I want to track when the chat starts 
and ends so I can free up server resources.

  Apparently Blink client does not send BYE when MSRP chat window closes. It 
does not support SIP session timers even.



  So potential use of SIP session timers (sst and dialog modules) is ruled out.



  Only possible way is to track every message that goes through the server and 
keep the session alive.

  If no message comes within “expiry time period”, server can send “bye” to all 
parties and tear up the session.



  Can you please comment if there are other approaches to solve this problem?

  If not, are they any modules that will help me implement the above approach 
easily?



Thanks

Pranathi
___
SIP Express Router (SER) 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] msilo

2016-11-17 Thread Daniel-Constantin Mierla
Hello,

if you want to fetch them for config usage is ok, otherwise m_dump() is
still better, because it takes care of removing delivered messages, etc...

Cheers,
Daniel


On 16/11/16 16:08, Slava Bendersky wrote:
> Hello Daniel,
> Yes that good alternative.  I will use sql to fetch or insert staff.
>
>
> Slava
>
> 
> *From: *"Daniel-Constantin Mierla" 
> *To: *"sr-users" 
> *Sent: *Wednesday, 16 November, 2016 04:37:24
> *Subject: *Re: [SR-Users] msilo
>
> Hello,
>
> as an alternative, I think it should work by using sql_query(...) to
> insert whatever values one would like to have in msilo table. This
> might be a quick workaround until someone will code the extension to
> get the body via a function parameter.
>
> Cheers,
> Daniel
>
>
> On 15/11/16 16:07, Federico Cabiddu wrote:
>
> Hi Slava,
> if I understand correctly your scenario,
> you could call t_on_failure before relaying the MESSAGE. In this
> way you should have access to the original message in the failure
> route triggered after receiving a final reply and you should be
> able to store it with the regular msilo functions.
> Hope this helps.
>
> Cheers,
>
> Federico
>
>
> On 15 Nov 2016 3:47 pm, "Slava Bendersky"  > wrote:
>
> Hello Daniel,
> I am not programmer, but I want place request if kaamilio devs
> can complete it .
> Thanks
>
>
> Slava.
>
> 
> 
> *From: *"Daniel-Constantin Mierla"  >
> *To: *"sr-users"  >
> *Sent: *Tuesday, 15 November, 2016 03:00:19
> *Subject: *Re: [SR-Users] msilo
>
> Hello,
>
> for me it is fine to add a new parameter to m_store() that
> takes the body content.
>
> Are you asking for more details of how can be done?
>
> Cheers,
> Daniel
>
> On 13/11/16 07:08, Slava Bendersky wrote:
>
> Hello Everyone,
> I asking question/request to add improvement for msilo
> module where will have ability set $avp(i:body) in mod
> params.  That will allow use it in m_store() by specifying
>  body message $avp.  In my case registration is on B2BUA
> so kamailio pass through/proxy  to destination. In order
> to check user status online/offline kamailio wait for
> reply from B2BUA on MESSAGE status if it return error 503
> that mean user offline and m_store(0 should store message
> in db, but the issue that error 503 is in final stage and
> MESSAGE body is not available any more.  The improvement
>  will allow specify  body $var in m_store() so new way
> will be m_store($tu, $avp(body)). 
>
> Any help thank you.
>
> Slava.
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users 
> mailing list
> sr-users@lists.sip-router.org
> 
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> -- 
> Daniel-Constantin Mierla
> http://twitter.com/#!/miconda  - 
> http://www.linkedin.com/in/miconda
> Kamailio 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 
>
> -- 
> Daniel-Constantin Mierla
> http://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

-- 
Daniel-Constantin Mierla
http://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.or

Re: [SR-Users] Send SIP Info within a dialog using $uac_req(method)="INFO"

2016-11-17 Thread Daniel-Constantin Mierla
Hello,


just to point out a trick that sometime can save backslash escaping of
quotes. One can start the function parameters with single quote, then
double quotes don't need to be escaped. Other blackslashes need to be
escaped and it this case you need more because you want to propagate
then to the command line.


Cheers,
Daniel


On 16/11/16 19:39, Jonathan Hunter wrote:
>
> Hi Daniel,
>
>
> Figured out the syntax and its working great in terms of generating
> the SIP INFO message, just need to get it to send within dialog and I
> have a solution.
>
>
> For reference the following works;
>
>
> exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112 . .
> \\\"From:$fu\"\\r\\nTo:$tu\\r\\nContact:$ct\\r\\n\\\"\"", "$avp(test)");
>
>
> Many thanks again.
>
>
> Jon
>
>
>
> 
> *From:* sr-users  on behalf of
> Jonathan Hunter 
> *Sent:* 16 November 2016 12:06
> *To:* Kamailio SER - Users Mailing List; mico...@gmail.com
> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
> $uac_req(method)="INFO"
>  
> Hello Daniel,
>
> Sorry to bother you again, last time!
>
> So the mi command line is;
>
> kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . .
> \"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""
>
> Which works fine, however I add to exec module and it doesnt like the
> syntax;
>
> exec_avp("kamctl mi t_uac_dlg INFO sip:3003@193.144.1.112  . .
> \"From:sip:1234@8.8.8.8"\r\nTo:sip:3003@193.144.1.112\r\nContact:sip:daemon@8.8.8.8\r\n\""",
> "$avp(test)");
>
> I presume its due to the \" and \r\n characters.
>
> What should I modify them or surround them with to please the exec
> command, as I can see in documentation for variables its '' quotes,
> but not sure around characters.
>
> Thanks
>
> Jon
>
>
>
> 
> *From:* Daniel-Constantin Mierla 
> *Sent:* 16 November 2016 09:45
> *To:* Jonathan Hunter; Kamailio SER - Users Mailing List
> *Subject:* Re: [SR-Users] Send SIP Info within a dialog using
> $uac_req(method)="INFO"
>  
>
> Hello,
>
>
> as I can see in the logs, the rpc command fails to execute because it
> requires async processing which is not implemented by jsonrpc-s
> module. Then it is an INVITE received:
>
>
> ct  7 13:45:36 POC_ProxyA /usr/sbin/kamailio[6572]: INFO: 

Re: [SR-Users] Possible memory leak in mysql driver

2016-11-17 Thread Daniel-Constantin Mierla
Working dir can be provided with -w command line parameter. If not set,
the corefile should be generated in / or a folder specific for the OS
settings (e.g., macos has /corefiles).

Root is needed because some OSes have restrictions on which app can dump
core files. You can try with a normal user and if not working, then
using root might be the solution.

Cheers,
Daniel

On 16/11/16 15:06, Alexandru Covalschi wrote:
> Thanks for response Daniel,
>
> Can you point me to the location where the core dump should be generated? 
> Afaik kamailio was compiled in /usr/local, what is the workdir for that 
> setup? 
> I can't figure it out from systemd config file. Also, is it really necessary 
> to run as root? What if I set enough permissions on workdir?
>> 16 нояб. 2016 г., в 11:32, Daniel-Constantin Mierla  
>> написал(а):
>>
>> Hello,
>>
>> the plan is to freeze development of v5.0 before the Chirstmas of the
>> first week of January, then it will be a 1-1.5 months of testing,
>> followed by the release. So expect like 2-3 months till the stable
>> release of 5.0.
>>
>> As for the issue, it can be a buffer overflow somewhere, not related to
>> mysql module code, but triggered by use of it.
>>
>> It is important to get the core file for such case, before starting
>> kamailio do 'ulimit -c unlimited'. You may need to run kamailio as root
>> to be able to write the core file. Enable also the option for one core
>> file per process, typically is:
>>
>> echo "1" > /proc/sys/kernel/core_uses_pid
>>
>> Once you get core files, extract the output of 'bt full' with gdb and
>> send it over here.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 15/11/16 22:35, Alexandru Covalschi wrote:
>>> Hello list,
>>>
>>> We’re using dev version of Kamailio:
>>> version: kamailio 5.0.0-dev4 (x86_64/linux) ff63e5
>>> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
>>> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, 
>>> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, 
>>> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, 
>>> USE_DST_BLACKLIST, HAVE_RESOLV_RES
>>> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
>>> MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
>>> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
>>> id: ff63e5
>>> compiled on 15:46:49 May 31 2016 with gcc 4.9.2
>>>
>>> Sometimes we encounter such issue:
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
>>> [db_row.c:114]: db_allocate_row(): no private memory left
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_row.c:57]: db_mysql_convert_row(): could not allocate row
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_res.c:188]: db_mysql_convert_rows(): error while converting row #16
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_res.c:217]: db_mysql_convert_result(): error while converting rows
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_dbase.c:261]: db_mysql_store_result(): error while converting result
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
>>> [db_query.c:139]: db_do_query_internal(): error while storing result
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: permissions 
>>> [trusted.c:91]: reload_trusted_table(): failed to query database
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR:  
>>> [db_row.c:114]: db_allocate_row(): no private memory left
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_row.c:57]: db_mysql_convert_row(): could not allocate row
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: db_mysql 
>>> [km_dbase.c:444]: db_mysql_fetch_result(): error while converting row #15
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: ERROR: htable 
>>> [ht_db.c:234]: ht_db_load_table(): Error while fetching result
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12276]: :  
>>> [mem/q_malloc.c:468]: qm_free(): BUG: qm_free: freeing already freed 
>>> pointer (0x7f5ebda8ae18), called from db_mysql: km_dbase.c: 
>>> db_mysql_free_result(305), first free db_mysql: km_dbase.c: 
>>> db_mysql_free_result(305) - aborting
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12281]: CRITICAL:  
>>> [pass_fd.c:275]: receive_fd(): EOF on 16
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: ALERT:  
>>> [main.c:739]: handle_sigs(): child process 12276 exited by a signal 6
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: ALERT:  
>>> [main.c:742]: handle_sigs(): core was not generated
>>> Nov  9 23:30:01 sbc01 /usr/local/sbin/kamailio[12268]: INFO:  
>>> [main.c:754]: handle_sigs(): terminating due to SIGCHLD
>>>
>>> The thing is we heavily use mysql module, but only to update the in-memory 
>>> tables by kamcmd. Each N minutes a special script updates the 

Re: [SR-Users] Error message not seen before

2016-11-17 Thread Daniel-Constantin Mierla
Hello,

maybe the table was not available when you installed first time siremis,
being added in later versions of kamailio.

You can create the table in kamailio database using the script locate in
source tree at:

  - utils/kamctl/mysql/uac-create.sql

Or if you don't use uac module for remote registrations, then you can
disable that option from menu, so nobody else ends up in such error.

Cheers,
Daniel


On 16/11/16 23:51, Kevin Greene wrote:
> Hi fellow Kamailio people:
>
> I was using the Siremis (v2.0) to manage my Kamailio application. I received a
> message labeled "System Internal Error"
> It seems, assuming I understand it correctly, that a table called
> "kamailio.uacreg" does not exist in the database.
>
> I receive this error when I click on the following:
>
> Main System > SIP Admin Menu > Server Services > UACReg List function.
>
> Any help in pointing me in the right direction would be great.
>
> Thanks.
>
> Kevin
>
>
>
> 2016-11-16 22:29:23 (GMT)] An exception occurred while executing this script:
> Error message: #0, Error in query:: SELECT T0.id, T0.l_uuid, T0.l_username,
> T0.l_domain, T0.r_username, T0.r_domain, T0.realm, T0.auth_username,
> T0.auth_password, T0.auth_proxy, T0.expires FROM uacreg T0 LIMIT 10.
> SQLSTATE[42S02]: Base table or view not found: 1146 Table 'kamailio.uacreg'
> doesn't exist
> Script name and line number of error:
> /var/www/siremis/openbiz/bin/data/BizDataObj_Lite.php:447
>
> *function:* _run_search ( Array(2) ) @
> /var/www/siremis/openbiz/bin/data/BizDataObj_Lite.php 243
> *function:* fetch ( ) @ /var/www/siremis/openbiz/bin/easy/EasyForm.php 690
> *function:* fetchDataSet ( ) @
> /var/www/siremis/openbiz/bin/easy/FormRenderer.php 69
> *function:* renderSmarty ( Object(EasyForm),
> "/var/www/siremis/siremis/modules/ser/template/grid.tpl" ) @
> /var/www/siremis/openbiz/bin/easy/FormRenderer.php 45
> *function:* render ( Object(EasyForm) ) @
> /var/www/siremis/openbiz/bin/easy/EasyForm.php 1648
> *function:* renderHTML ( ) @ /var/www/siremis/openbiz/bin/easy/EasyForm.php 
> 1538
> *function:* render ( ) @ /var/www/siremis/openbiz/bin/easy/ViewRenderer.php 83
> *function:* renderSmarty ( Object(EasyView),
> "/var/www/siremis/siremis/modules/ser/template/view.tpl" ) @
> /var/www/siremis/openbiz/bin/easy/ViewRenderer.php 40
> *function:* render ( Object(EasyView) ) @
> /var/www/siremis/openbiz/bin/easy/EasyView.php 274
> *function:* _render ( ) @ /var/www/siremis/openbiz/bin/easy/EasyView.php 237
> *function:* render ( ) @ /var/www/siremis/openbiz/bin/BizController.php 221
> *function:* renderView ( "ser.view.UacregListView", "", "", Null, "" ) @
> /var/www/siremis/openbiz/bin/BizController.php 107
> *function:* dispatchRequest ( ) @ 
> /var/www/siremis/openbiz/bin/BizController.php 32
> *function:* include_once ( "/var/www/siremis/openbiz/bin/BizController.php" ) 
> @
>
>
> ___
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users@lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio 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