Re: [SR-Users] db_sqlite bugs
Hello Timo. We've done more tests with both of your patches and it seems to work fine. You can upload it to GIT. Thanks a lot !!! Regards De: Timo Teras timo.te...@iki.fi Para: Timo Teras timo.te...@iki.fi cc: SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing List sr-users@lists.sip-router.org Fecha: 29/10/2012 20:09 Asunto: Re: [SR-Users] db_sqlite bugs Enviado por: sr-users-boun...@lists.sip-router.org On Mon, 29 Oct 2012 16:07:56 +0200 Timo Teras timo.te...@iki.fi wrote: I guess we should first try decltype if available and fall back to first row column type. However, this will fail too if the first row has NULL value for the column. The fundamental problem is that Kamailio DB API expects the driver to return stored type - which on sqlite is not fixed. Will try to get something sketched up soonish. Can you try the attached patch if it fixes it? I compile tested it only, but I believe this is the proper thing to do. Thanks, Timo [anexo sqlite-computed-col-fix.patch eliminado por Pedro Antonio Vico Solano/AmperProgramas] ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] db_sqlite bugs
Hello Timo, We've done a basic test and it seems to solve the memory leak problem. We'll do exhaustive tests in a few days. We'll keep you informed. Thanks a lot, Pedro De: Timo Teras timo.te...@iki.fi Para: SIP Router - Kamailio \(OpenSER\) and SIP Express Router \(SER\) - Users Mailing List sr-users@lists.sip-router.org cc: pvsol...@amper.es Fecha: 15/10/2012 16:13 Asunto: Re: [SR-Users] db_sqlite bugs Enviado por: Timo Teräs timo.te...@gmail.com On Thu, 11 Oct 2012 12:37:23 +0200 Pedro Antonio Vico Solano pvsol...@amper.es wrote: Hello everyone, We are developing a solution based on the SQLite module for Kamailio and we've found some bugs/errors regarding it. We use kamailio 3.2.4 and SQLite 3.7.14.1. The errors are about this: - Memory leaks on querys via sqlops. Kamailio main process leaks 4kB each 3 queries (aprox.) and that memory is never freed. [Attached basic example] - Segmentation fault when doing a SELECT COUNT(*) via sqlops. [Attached basic example 2] Can you help us? Does this help for the memory leak? diff --git a/modules_k/db_sqlite/dbase.c b/modules_k/db_sqlite/dbase.c index 0b32e07..c1d3b71 100644 --- a/modules_k/db_sqlite/dbase.c +++ b/modules_k/db_sqlite/dbase.c @@ -543,7 +543,12 @@ int db_sqlite_update(const db1_con_t* _h, const db_key_t* _k, const db_op_t* _o, int db_sqlite_raw_query(const db1_con_t* _h, const str* _s, db1_res_t** _r) { -return db_do_raw_query(_h, _s, _r, +int rc; + +rc = db_do_raw_query(_h, _s, _r, db_sqlite_submit_query, db_sqlite_store_result); +db_sqlite_cleanup_query(_h); + +return rc; } Seems that all other database driver postpone the resource release to free_results - but there's no reason why we couldn't do this right away in sqlite. Since in sqlite free_results we just free cached result set. Will take a look at the other bug later when I get the time to reproduce it. -Timo ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] db_sqlite bugs
Hello everyone, We are developing a solution based on the SQLite module for Kamailio and we've found some bugs/errors regarding it. We use kamailio 3.2.4 and SQLite 3.7.14.1. The errors are about this: - Memory leaks on querys via sqlops. Kamailio main process leaks 4kB each 3 queries (aprox.) and that memory is never freed. [Attached basic example] - Segmentation fault when doing a SELECT COUNT(*) via sqlops. [Attached basic example 2] Can you help us? Thanks and regards, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. kam-simple-test2.cfg Description: Binary data kam-simple-test.cfg Description: Binary data ___ SIP Express Router (SER) 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] sqlite - usrloc tables deleted after 1 minute
Thanks Carsten, That's what we are looking for. In this configuration the value 2440587.4421 doesn't work as permanent. You have to put something like 2999-12-31 00:00:00 Regards, Pedro De: Carsten Bock cars...@ng-voice.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Fecha: 18/04/2012 19:04 Asunto: Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por: sr-users-boun...@lists.sip-router.org Hi, If you want to change aliases location during runtime by updating or inserting values to SQLlite, you need to change the db_mode of usrloc. Your current setting is 1, which will only read data at startup and save all changes made by Kamailio directly into the database (but it will never read from the database again). If you change your db_mode to 3, you will directly read and write to the database. http://kamailio.org/docs/modules/devel/modules_k/usrloc.html#id2495853 Kind regards, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: I've found it!. If you want a permanent alias/location you have to put the following value on 'expire': 2440587.4421 is it possible to modify aliases/location via updating or inserting values on tables via SQLite? BR, Pedro De:Carsten Bock cars...@ng-voice.com Para:SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org Fecha:18/04/2012 17:07 Asunto:Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por:sr-users-boun...@lists.sip-router.org Hi, SQLLite has no datatype for dates, so 0 is probably not correct... https://www.sqlite.org/datatype3.html The Kamailio-SQLLite Module stores datetime-values as a REAL: case DB1_DATETIME: rc = sqlite3_bind_double(stmt, i, timet_to_sqlite(VAL_TIME(val))); With the following conversion method: static double timet_to_sqlite(time_t t) { return double) t) - 0.5) / 86400.0) + 2440587.5; } So, 0 is definitely incorrect and somewhen back in time. So long, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: Hello Carsten, Expire column is 0, what I thought it was permanent, am I right? I've tried with the default value: '2020-05-28 21:32:15' and happens the same. Maybe is it a problem with the data type of 'expire' column? And I've done another test: if I load tables after Kamailio starts they are not deleted after 1 minute! Strange. BR De:Carsten Bock cars...@ng-voice.com Para:SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org Fecha:18/04/2012 15:57 Asunto:Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por:sr-users-boun...@lists.sip-router.org Hi Pedro, did you check your expires date in your preloaded data? Kamailio will delete it, if expires is in the past This is most likely your problem. So long, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: Hello, I'm having a strange behaviour with sqlite and usrloc tables (location, aliases). I've created the database with kamdbctl and preloaded many tables with my own data. After starting kamailio 3.2.2 (with sqlite engine) location and aliases tables get empty after 1 minute. It does not happen with other tables (e.g. dialplan subscriber). ul.dump command also shows empty tables. Some configuration: # -- usrloc params -- # use sqlite database for persistent storage, write-thru modparam(usrloc, db_mode, 1) modparam(usrloc|dialplan, db_url, sqlite:etc/kamailio/db.sqlite) [Attached SQLite schema.] Can anyone help me? Thanks in advance. BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied
Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute
Hello Carsten, Expire column is 0, what I thought it was permanent, am I right? I've tried with the default value: '2020-05-28 21:32:15' and happens the same. Maybe is it a problem with the data type of 'expire' column? And I've done another test: if I load tables after Kamailio starts they are not deleted after 1 minute! Strange. BR De: Carsten Bock cars...@ng-voice.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Fecha: 18/04/2012 15:57 Asunto: Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por: sr-users-boun...@lists.sip-router.org Hi Pedro, did you check your expires date in your preloaded data? Kamailio will delete it, if expires is in the past This is most likely your problem. So long, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: Hello, I'm having a strange behaviour with sqlite and usrloc tables (location, aliases). I've created the database with kamdbctl and preloaded many tables with my own data. After starting kamailio 3.2.2 (with sqlite engine) location and aliases tables get empty after 1 minute. It does not happen with other tables (e.g. dialplan subscriber). ul.dump command also shows empty tables. Some configuration: # -- usrloc params -- # use sqlite database for persistent storage, write-thru modparam(usrloc, db_mode, 1) modparam(usrloc|dialplan, db_url, sqlite:etc/kamailio/db.sqlite) [Attached SQLite schema.] Can anyone help me? Thanks in advance. BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Mobile +49 179 2021244 Office +49 40 34927219 Fax +49 40 34927220 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/ -- Meet ng-voice at LinuxTag 2012 in Berlin - May 23rd - 26th, 2012. Save the date! ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única
Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute
I've found it!. If you want a permanent alias/location you have to put the following value on 'expire': 2440587.4421 is it possible to modify aliases/location via updating or inserting values on tables via SQLite? BR, Pedro De: Carsten Bock cars...@ng-voice.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Fecha: 18/04/2012 17:07 Asunto: Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por: sr-users-boun...@lists.sip-router.org Hi, SQLLite has no datatype for dates, so 0 is probably not correct... https://www.sqlite.org/datatype3.html The Kamailio-SQLLite Module stores datetime-values as a REAL: case DB1_DATETIME: rc = sqlite3_bind_double(stmt, i, timet_to_sqlite(VAL_TIME(val))); With the following conversion method: static double timet_to_sqlite(time_t t) { return double) t) - 0.5) / 86400.0) + 2440587.5; } So, 0 is definitely incorrect and somewhen back in time. So long, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: Hello Carsten, Expire column is 0, what I thought it was permanent, am I right? I've tried with the default value: '2020-05-28 21:32:15' and happens the same. Maybe is it a problem with the data type of 'expire' column? And I've done another test: if I load tables after Kamailio starts they are not deleted after 1 minute! Strange. BR De:Carsten Bock cars...@ng-voice.com Para:SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - UsersMailing List sr-users@lists.sip-router.org Fecha:18/04/2012 15:57 Asunto:Re: [SR-Users] sqlite - usrloc tables deleted after 1 minute Enviado por:sr-users-boun...@lists.sip-router.org Hi Pedro, did you check your expires date in your preloaded data? Kamailio will delete it, if expires is in the past This is most likely your problem. So long, Carsten 2012/4/18 Pedro Antonio Vico Solano pvsol...@amper.es: Hello, I'm having a strange behaviour with sqlite and usrloc tables (location, aliases). I've created the database with kamdbctl and preloaded many tables with my own data. After starting kamailio 3.2.2 (with sqlite engine) location and aliases tables get empty after 1 minute. It does not happen with other tables (e.g. dialplan subscriber). ul.dump command also shows empty tables. Some configuration: # -- usrloc params -- # use sqlite database for persistent storage, write-thru modparam(usrloc, db_mode, 1) modparam(usrloc|dialplan, db_url, sqlite:etc/kamailio/db.sqlite) [Attached SQLite schema.] Can anyone help me? Thanks in advance. BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Mobile +49 179 2021244
Re: [SR-Users] Limiting registrations to known users without auth
Thanks Ovidiu, I've opened a bug about it. BR, Pedro De: Ovidiu Sas o...@voipembedded.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Fecha: 07/03/2012 17:25 Asunto: Re: [SR-Users] Limiting registrations to known users without auth Enviado por: sr-users-boun...@lists.sip-router.org db_text doesn't have sql capabilites (I think it should be mentioned in the documentation). Also, it should not crash too (this is a bug that needs to be addressed - please open a bug and provide a backtrace). If you don't want to use a truedb, you can try to use sqlite: http://kamailio.org/docs/modules/stable/modules_k/db_sqlite.html This should be compatible with sqlops. Regards, Ovidiu Sas -- VoIP Embedded, Inc. http://www.voipembedded.com On Wed, Mar 7, 2012 at 11:18 AM, Pedro Antonio Vico Solano pvsol...@amper.es wrote: Thanks for the clarification, Daniel. I've tried the 'sqlops' solution but there is something wrong. Is sqlops compatible with the db_text DB? I've tried: modparam(sqlops,sqlcon,ca=text:///etc/kamailio/dbtext) ... sql_query(ca, select * from uri, ra); xlog(rows: $dbr(ra=rows) cols: $dbr(ra=cols)\n); sql_result_free(ra); ... It gives a segmentation fault. Thanks BR, Pedro De:Daniel-Constantin Mierla mico...@gmail.com Para:SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org cc:Pedro Antonio Vico Solano pvsol...@amper.es Fecha:02/03/2012 10:04 Asunto:Re: [SR-Users] Limiting registrations to known users without auth Hello, check_to() matches to see if the authenticated user is allowed to use the address in the To header, so it has to be called for authenticated requests. does_uri_exist() is checking to see if r-uri address is a valid local subscriber, but it does not have an option take it from To header. What you can do is to use sqlops module to do a query and check if the address (or user part of it) in To header is matching a record (username and eventually the domain) in subscriber table. Cheers, Daniel On 3/1/12 6:10 PM, Pedro Antonio Vico Solano wrote: Hello, I'm trying to restrict registrations based on the username/number but without authentication. I'm using uri_db module, the URI table and the check_to() function. But when a user tries to register Kamailio 3.1.5 says the following error: 0(11832) ERROR: uri_db [checks.c:71]: No authorized credentials found (error in scripts) 0(11832) ERROR: uri_db [checks.c:72]: Call {www,proxy}_authorize before calling check_* functions! I've read README from uri_db and seems to be possible doing it the way I do. I have the following configuration: modparam(usrloc|uri_db, db_url, text:///etc/kamailio/dbtext) modparam(uri_db, db_table, uri) modparam(uri_db, use_uri_table, 1) route{ ... check_to() ... } am I doing right? Thanks BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
Re: [SR-Users] Limiting registrations to known users without auth
Thanks for the clarification, Daniel. I've tried the 'sqlops' solution but there is something wrong. Is sqlops compatible with the db_text DB? I've tried: modparam(sqlops,sqlcon,ca=text:///etc/kamailio/dbtext) ... sql_query(ca, select * from uri, ra); xlog(rows: $dbr(ra=rows) cols: $dbr(ra=cols)\n); sql_result_free(ra); ... It gives a segmentation fault. Thanks BR, Pedro De: Daniel-Constantin Mierla mico...@gmail.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org cc: Pedro Antonio Vico Solano pvsol...@amper.es Fecha: 02/03/2012 10:04 Asunto: Re: [SR-Users] Limiting registrations to known users without auth Hello, check_to() matches to see if the authenticated user is allowed to use the address in the To header, so it has to be called for authenticated requests. does_uri_exist() is checking to see if r-uri address is a valid local subscriber, but it does not have an option take it from To header. What you can do is to use sqlops module to do a query and check if the address (or user part of it) in To header is matching a record (username and eventually the domain) in subscriber table. Cheers, Daniel On 3/1/12 6:10 PM, Pedro Antonio Vico Solano wrote: Hello, I'm trying to restrict registrations based on the username/number but without authentication. I'm using uri_db module, the URI table and the check_to() function. But when a user tries to register Kamailio 3.1.5 says the following error: 0(11832) ERROR: uri_db [checks.c:71]: No authorized credentials found (error in scripts) 0(11832) ERROR: uri_db [checks.c:72]: Call {www,proxy}_authorize before calling check_* functions! I've read README from uri_db and seems to be possible doing it the way I do. I have the following configuration: modparam(usrloc|uri_db, db_url, text:///etc/kamailio/dbtext) modparam(uri_db, db_table, uri) modparam(uri_db, use_uri_table, 1) route{ ... check_to() ... } am I doing right? Thanks BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- http://www.asipto.com http://linkedin.com/in/miconda -- http://twitter.com/miconda ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna
Re: [SR-Users] syncing db_text acc table
Thanks a lot Carsten and Daniel. db_flatstore works perfect for us. BR, Pedro De: Daniel-Constantin Mierla mico...@gmail.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org cc: Pedro Antonio Vico Solano pvsol...@amper.es Fecha: 13/12/2011 20:41 Asunto: Re: [SR-Users] syncing db_text acc table Hello, db_text keeps data in memory, the main reason being updates of the records, which will be hard to sync to disk in a text file every time, considering multi-process architecture of kamailio. Perhaps you should look at db_flatstore for a need of storing acc record to text files. Other alternative of not using a sql server, is db_sqlite. Cheers, Daniel On 12/13/11 6:56 PM, Pedro Antonio Vico Solano wrote: Hello Carsten, How are you? I've tried to disable caching (modparam(db_text, db_mode, 1) but it remains the same. I've read the module README file and it seems that it is not implemented: [..] NOTE: even when is in non-caching mode, the module does not write back to hard drive after changes. In this mode, the module checks if the corresponding file on disk has changed, and reloads it. The write on disk happens at openser shut down. [..] Do you know any alternative? BR, Pedro De:Carsten Bock cars...@ng-voice.com Para:SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org Fecha:13/12/2011 18:08 Asunto:Re: [SR-Users] syncing db_text acc table Enviado por:sr-users-boun...@lists.sip-router.org Hi Pedro, You need to disable the caching mode in db_text, see here: http://kamailio.org/docs/modules/devel/modules_k/db_text.html#id2530805 Kind regards from Hamburg, Carsten 2011/12/13 Pedro Antonio Vico Solano pvsol...@amper.es: Hello, I'm using Kamailio 3.1.5 with db_text module. I'm trying to save accounting information on the acc file. Everything seems to work fine but accounting records are only written on the file when Kamailio program shutdowns. usrloc tables have a configuration parameter for persistent storage mode (modparam(usrloc, db_mode, 1)) How can I get the same behaviour on acc table? Thanks. BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Carsten Bock CEO (Geschäftsführer) ng-voice GmbH Schomburgstr. 80 D-22767 Hamburg / Germany http://www.ng-voice.com mailto:cars...@ng-voice.com Mobile +49 179 2021244 Office +49 40 34927219 Fax +49 40 34927220 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 ADVERTENCIA
[SR-Users] syncing db_text acc table
Hello, I'm using Kamailio 3.1.5 with db_text module. I'm trying to save accounting information on the acc file. Everything seems to work fine but accounting records are only written on the file when Kamailio program shutdowns. usrloc tables have a configuration parameter for persistent storage mode (modparam(usrloc, db_mode, 1)) How can I get the same behaviour on acc table? Thanks. BR, Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Compiling on a 2.4 kernel
Hello Daniel, I've managed to compile it!. You are right, we are doing a cross-compilation. The problem was that make took the OS version of the host (=2.6.18) and then it used Futex library. I've forced the detection of the target kernel this way: make cfg CPU=ppc ARCH=ppc OSREL_N=2004025 CC=path_to_cross_compiler Thanks a lot. BR Pedro De: Daniel-Constantin Mierla mico...@gmail.com Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List sr-users@lists.sip-router.org cc: Pedro Antonio Vico Solano pvsol...@amper.es Fecha: 04/10/2011 19:55 Asunto: Re: [SR-Users] Compiling on a 2.4 kernel Hello, it should compile on 2.4. But from what you wrote, I understand that you try to do cross compile in a host with 2.6 kernel for a 2.4 kernel? Can you send the output of: make Q=0 all Can you try compiling on a system with kernel 2.4 directly? Cheers, Daniel On 10/4/11 4:31 PM, Pedro Antonio Vico Solano wrote: Hello everyone, We are trying to compile sip-router 3.1.2 for a ppc target architecture. Its kernel is a 2.4.25 one. Some kernel libraries are missing when compiling (for example futex.h), but they are on the host 2.6 kernel. Is this kernel version supported? Which is the latest version of SIP-Router/SER/Kamailio that suports a 2.4 kernel? Thanks. BR Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users -- Daniel-Constantin Mierla -- http://www.asipto.com Kamailio Advanced Training, Dec 5-8, Berlin: http://asipto.com/u/kat http://linkedin.com/in/miconda -- http://twitter.com/miconda ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well
[SR-Users] Compiling on a 2.4 kernel
Hello everyone, We are trying to compile sip-router 3.1.2 for a ppc target architecture. Its kernel is a 2.4.25 one. Some kernel libraries are missing when compiling (for example futex.h), but they are on the host 2.6 kernel. Is this kernel version supported? Which is the latest version of SIP-Router/SER/Kamailio that suports a 2.4 kernel? Thanks. BR Pedro ADVERTENCIA Este mensaje y/o sus anexos, pueden contener información personal y confidencial cuyo uso, reproducción o distribución no autorizados están legalmente prohibidos. Por lo tanto, si Vd. no fuera su destinatario y, erróneamente, lo hubiera recibido, le rogamos que informe al remitente y lo borre de inmediato. En cumplimiento de la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal le informamos de que su dirección de correo electrónico, así como sus datos personales y de empresa pasarán a formar parte de nuestro fichero de Gestión, y serán tratados con la única finalidad de mantenimiento de la relación adquirida con usted. Los datos personales que existen en nuestro poder están protegidos por nuestra Política de Seguridad, y no serán compartidos con ninguna otra empresa. Usted puede ejercitar los derechos de acceso, rectificación, cancelación y oposición dirigiéndose por escrito a la dirección arriba indicada. This e-mail and its attachments may include confidential personal information which may be protected by any legal rules and cannot be used, copied, distributed or disclosed to any person without authorisation. If you are not the intended recipient and have received this e-mail by mistake, please advise the sender and erase it. In compliance with the Spanish Organic Act 15/1999 on Personal Data Protection, we hereby inform you that your email address, as well as your personal and business information, will be included in our Management files and used solely for purposes corresponding to our commercial relationship. All personal data in our possession is protected by our Data Safety Policy and thus shall not be released to any other third party whatsoever. You may exercise your right to access, rectify, cancel and contest by writing to the address provided above. ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users