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] Rewrite $tU
On 03/07/2012 08:46 PM, Lucas Alvarez wrote:. Something like this: if(($rU=~^(box02)[0-9]{2,15}$)) { $rU = $(rU{s.substr,5,0}); $ru = sip: + $rU + @ + $sel(cfg_get.box02.gw_ip) + : + $sel(cfg_get.box02.gw_port); } BTW alternatively you can use dialplan the module to hold both regexp to match and target IP with added benefit of in-database provisioning. The problem I'm having is I'm not being able to do blind tranfers. I think the cause is the prefix that remains in the TO field. After rewriting the TO field nothing change. I would appreciate if someone could point me to the right path. Hmm, the blind transfers should be transparent to the proxy. So the REFER request should go all the way through box02 to box01 and to the caller, which should send a new INVITE so the box01 can apply the same logic of finding out where the subscriber is registered to RURI. What is the actual call flow that you see after REFER? ___ 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] no hangup when there is no network or when the UAC on the other side is power off
Hi everybody, We are using kamailio+callcontrol+cdrtool+freeradius+mysql to build a voip prepaid based system: . 2 SIP accounts created and one of them is prepaid . we can debit balance when we call with the SIP prepaid account, and when the balance is 0, the call hang up . if we hangup a call session from the prepaid SIP and the balance is not still 0, the call hangup and the system debit the appropriate cost . but when we call from the prepaid SIP account, and we disconnect the ethernet cable or the alimentation of the other UAC, the call don't hangup until the balance is set to 0 . if the phone is still ringing too, when we disconnect the other UAC, the caller UAC still ringing . the 2 uacs and kamailio are in the same subnet network the question is, how can we tell to kamailio to detect if the other side is down and then send bye immediately so thecalculating of the credit will be correct? Thank you. -- ___ 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 with flowroute
hello room, i was trying to add sip provider(like. flowroute,vitelity) with user-pass authentication in kamailio to accept inbound calls. any help? thanks___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Backing up htable to SQL table ...
Thanks Daniel for the help. I was looking at other module parameters. I added this like and tried it again modparam(htable, htable,xhash=size=8;dbtable=htable;dbmode=1;) However, it was still not backing up to the database. Seems like there is bug when the expiration is not set or set to 0. I modified the code and it worked. Here is the change log: --- a/modules_k/htable/ht_db.c +++ b/modules_k/htable/ht_db.c @@ -369,10 +369,12 @@ int ht_db_save_table(ht_t *ht, str *dbtable) it-name.len, it-name.s, it-value.n); } - if (it-expire = now) { + if(ht-htexpire 0 ht_db_expires_flag!=0) { + if (it-expire = now) { LM_DBG(skipping expired entry); it = it-next; continue; + } } If this is the right fix for the bug, can someone commit this to the main? Thanks Krishna Kura On Wed, Mar 7, 2012 at 9:48 PM, Krishna Kurapati kkura...@gmail.com wrote: Any help on how to backup the htable content to database table? Thanks On Tue, Mar 6, 2012 at 5:28 PM, Krishna Kurapati kkura...@gmail.comwrote: I did little more digging into htable source code. It looks like syncing to database is happening when the module is being destroyed. To see if this is working, I tried to stop Kamailio and looked into the database. The htable is still empty. Any configuration changes required to make the process happen? Thanks Krish Kura On Tue, Mar 6, 2012 at 8:38 AM, Krishna Kurapati kkura...@gmail.comwrote: Hi, This is my first time attempt using htable module. How can I back up the htable content in the database incase the server restarts. I saw a htable in the MySQL database. My observation has been that htable module is not automatically backing up to database even though I added modparams to point to the database. Do I need to explicitly backup htable content to database using sqlops or some other mechanism? Thanks Krish Kura ___ 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] kamailio with flowroute
You can use IP auth its simple and works. On Mar 8, 2012 4:19 PM, romon.zaman romon.za...@gmail.com wrote: hello room, i was trying to add sip provider(like. flowroute,vitelity) with user-pass authentication in kamailio to accept inbound calls. any help? thanks ___ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users ___ 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