[SR-Users] Install kamailio-tls-4.4.7-1.1.x86_64.rpm on centos 8
Hi; There is any package ready to install kamailio-tls-4.4.7-1.1.x86_64.rpm on centos 8? Thank you. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] RTP Querys
Ok, thank you so much. El vie, 22 ene 2021 a las 11:22, Henning Westerholt () escribió: > Hi Ahmed, > > > > These are quite detailed questions, maybe nobody knows everything right > now by heart. > > > > I would just try it out regarding the failure states, and for the other > questions have a look to the source code of rtpproxy. > > > > Cheers, > > > > Henning > > > > -- > > Henning Westerholt – https://skalatan.de/blog/ > > Kamailio services – https://gilawa.com > > > > *From:* sr-users *On Behalf Of *Ahmed > Marsou > *Sent:* Friday, January 15, 2021 12:10 PM > *To:* Kamailio (SER) - Users Mailing List > *Subject:* [SR-Users] RTP Querys > > > > Hi guys; > > I have some rtpproxy questions: > > - When a proxy is in a failed state, what happens to the active sessions / > streams? > > - How many times the module should retry to send and receive after timeout > was > > generated? > > - *How often are the control messages sent to the rtp proxy’s in the > pool?* > > *- I would like to know the exact nc message that’s used for the control > messages* > > *Thank you.* > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] RTP Querys
Hi guys; I have some rtpproxy questions: - When a proxy is in a failed state, what happens to the active sessions / streams? - How many times the module should retry to send and receive after timeout was generated? - *How often are the control messages sent to the rtp proxy’s in the pool?* *- I would like to know the exact nc message that’s used for the control messages* *Thank you.* ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Presence of plain text username and password in kamailio.cfg
Yes, in fact using API is the better way, but I need time to do it. Finaly I add on kamailio.service a post and pre execution task that give rights just on strat process. Thank you so much to evrybody. El jue, 19 nov 2020 a las 12:13, Olle E. Johansson () escribió: > It is an interesting proposal to find a way for Kamailio to fetch external > credentials in run-time, > not having them in clear text in config files. Like integration with > hashicorp vault or something. > > /O > > On 18 Nov 2020, at 15:50, Ahmed Marsou wrote: > > Thank you so much, David and Alexandru. > I'm not sure but i read something about reading the config from my.cnf > > http://www.kamailio.org/docs/modules/5.0.x/modules/db_mysql.html#idp419 > > The problem is that my.cnf, have 600 permission and I'm running kamailio > with user kamailio, so the question is, > There is a way to read this file as root on startup but run kamailio as > kamailio? > The option AWS Parameter Store, is something related to amazon, right? > > Tank you so much. > > El mié., 18 nov. 2020 a las 15:29, David Villasmil (< > david.villasmil.w...@gmail.com>) escribió: > >> I just get the params from AWS Parameter Store and pass it to Kamailio on >> startup. Downsize is you can see them in “ps”. >> >> On Wed, 18 Nov 2020 at 12:40, Alexandru Covalschi <568...@gmail.com> >> wrote: >> >>> Alternative way is to use unixodbc, but it just means you put the >>> password into another file. >>> >>> ср, 18 нояб. 2020 г. в 14:35, Alexandru Covalschi <568...@gmail.com>: >>> >>>> Don't use databases. Create an API and use it to access the data you >>>> need. Won't work for every possible usage, but in general API-driven >>>> SIP-routing is very possible with Kamailio, especially with KEMI. >>>> >>>> ср, 18 нояб. 2020 г. в 11:32, Ahmed Marsou : >>>> >>>>> Hi; >>>>> I want to remove all plain text usernames an passwords from >>>>> kamailio.cfg file. Like modparam("auth_db", "db_url", "dbdriver:// >>>>> username:password@dbhost/dbname") >>>>> or this modparam("sqlops","sqlcon","ca=>dbdriver://username:password >>>>> @dbhost/dbname") >>>>> Can you help me with some ideas of how can I handle that? >>>>> Thank you. >>>>> ___ >>>>> Kamailio (SER) - Users Mailing List >>>>> sr-users@lists.kamailio.org >>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>>> >>>> >>>> >>>> -- >>>> Alexandru Covalschi >>>> VoIP engineer and system administrator >>>> tel: +37367398493 >>>> >>>> >>> >>> -- >>> Alexandru Covalschi >>> VoIP engineer and system administrator >>> tel: +37367398493 >>> >>> ___ >>> Kamailio (SER) - Users Mailing List >>> sr-users@lists.kamailio.org >>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>> >> -- >> Regards, >> >> David Villasmil >> email: david.villasmil.w...@gmail.com >> phone: +34669448337 >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Presence of plain text username and password in kamailio.cfg
Yes, Im agree that anyhow it will be on local, but only root user have the right to read this file. So how can I change the permission of my.cnf file to be able to read it from kamailio only when I start or reboot? Thank you. El mié., 18 nov. 2020 17:18, Daniel-Constantin Mierla escribió: > > On 18.11.20 16:45, Daniel-Constantin Mierla wrote: > > One alternative is to pass user/password via environment variables and > then use #!substdef in configuration file, with the replacement using the > corresponding $env(...) variables. > > If the goal is protecting the configuration file content in long term > against being read in the future, two other options: > > - remove kamailio.cfg after starting kamailio, it is not needed at > runtime > > > Obviously, instead of removing, the permissions kamailio.cfg can be > changed after starting kamailio -- adding this after seeing in another > message being mentioned the option with mysql my.cfg, user/password is in a > local file anyhow. > > Cheers, > Daniel > > - encrypt kamailio.cfg and pipe its decrypted content to kamailio at > startup, like: > > decryptapp kamailio-encrypted.cfg | kamailio -f - ... > > Cheers, > Daniel > On 18.11.20 15:27, David Villasmil wrote: > > I just get the params from AWS Parameter Store and pass it to Kamailio on > startup. Downsize is you can see them in “ps”. > > On Wed, 18 Nov 2020 at 12:40, Alexandru Covalschi <568...@gmail.com> > wrote: > >> Alternative way is to use unixodbc, but it just means you put the >> password into another file. >> >> ср, 18 нояб. 2020 г. в 14:35, Alexandru Covalschi <568...@gmail.com>: >> >>> Don't use databases. Create an API and use it to access the data you >>> need. Won't work for every possible usage, but in general API-driven >>> SIP-routing is very possible with Kamailio, especially with KEMI. >>> >>> ср, 18 нояб. 2020 г. в 11:32, Ahmed Marsou : >>> >>>> Hi; >>>> I want to remove all plain text usernames an passwords from >>>> kamailio.cfg file. Like modparam("auth_db", "db_url", "dbdriver:// >>>> username:password@dbhost/dbname") >>>> or this modparam("sqlops","sqlcon","ca=>dbdriver://username:password >>>> @dbhost/dbname") >>>> Can you help me with some ideas of how can I handle that? >>>> Thank you. >>>> ___ >>>> Kamailio (SER) - Users Mailing List >>>> sr-users@lists.kamailio.org >>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>> >>> >>> >>> -- >>> Alexandru Covalschi >>> VoIP engineer and system administrator >>> tel: +37367398493 >>> >>> >> >> -- >> Alexandru Covalschi >> VoIP engineer and system administrator >> tel: +37367398493 >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > -- > Regards, > > David Villasmil > email: david.villasmil.w...@gmail.com > phone: +34669448337 > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Funding: https://www.paypal.me/dcmierla > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Funding: https://www.paypal.me/dcmierla > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Presence of plain text username and password in kamailio.cfg
Thank you so much, David and Alexandru. I'm not sure but i read something about reading the config from my.cnf http://www.kamailio.org/docs/modules/5.0.x/modules/db_mysql.html#idp419 The problem is that my.cnf, have 600 permission and I'm running kamailio with user kamailio, so the question is, There is a way to read this file as root on startup but run kamailio as kamailio? The option AWS Parameter Store, is something related to amazon, right? Tank you so much. El mié., 18 nov. 2020 a las 15:29, David Villasmil (< david.villasmil.w...@gmail.com>) escribió: > I just get the params from AWS Parameter Store and pass it to Kamailio on > startup. Downsize is you can see them in “ps”. > > On Wed, 18 Nov 2020 at 12:40, Alexandru Covalschi <568...@gmail.com> > wrote: > >> Alternative way is to use unixodbc, but it just means you put the >> password into another file. >> >> ср, 18 нояб. 2020 г. в 14:35, Alexandru Covalschi <568...@gmail.com>: >> >>> Don't use databases. Create an API and use it to access the data you >>> need. Won't work for every possible usage, but in general API-driven >>> SIP-routing is very possible with Kamailio, especially with KEMI. >>> >>> ср, 18 нояб. 2020 г. в 11:32, Ahmed Marsou : >>> >>>> Hi; >>>> I want to remove all plain text usernames an passwords from >>>> kamailio.cfg file. Like modparam("auth_db", "db_url", "dbdriver:// >>>> username:password@dbhost/dbname") >>>> or this modparam("sqlops","sqlcon","ca=>dbdriver://username:password >>>> @dbhost/dbname") >>>> Can you help me with some ideas of how can I handle that? >>>> Thank you. >>>> ___ >>>> Kamailio (SER) - Users Mailing List >>>> sr-users@lists.kamailio.org >>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >>>> >>> >>> >>> -- >>> Alexandru Covalschi >>> VoIP engineer and system administrator >>> tel: +37367398493 >>> >>> >> >> -- >> Alexandru Covalschi >> VoIP engineer and system administrator >> tel: +37367398493 >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > -- > Regards, > > David Villasmil > email: david.villasmil.w...@gmail.com > phone: +34669448337 > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Presence of plain text username and password in kamailio.cfg
Hi; I want to remove all plain text usernames an passwords from kamailio.cfg file. Like modparam("auth_db", "db_url", "dbdriver://username:password @dbhost/dbname") or this modparam("sqlops","sqlcon","ca=>dbdriver://username:password @dbhost/dbname") Can you help me with some ideas of how can I handle that? Thank you. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Kamailio World Updates Online - Celebration Party - Sep 2-3, 2020
Im interested. El lun., 3 ago. 2020 11:23, Daniel-Constantin Mierla escribió: > Hello, > > we are considering to organize a small online event to compensate a bit > the cancellation of Kamailio World 2020, but mainly to discuss about > what is new around Kamailio project and RTC space. > > The event was discussed among a couple developers several weeks ago, > when it was clear that the pandemic will last longer, preventing any > on-site event, and the intention to do it was also announced during the > recording of last ClueCon Weekly about Kamailio project at the beginning > of July > ( > https://www.kamailio.org/w/2020/07/cluecon-weekly-kamailio-updates-july-2020/ > ). > > The first commit of Kamailio code was done on the 3rd of September 2001, > thus this is like the project's birthday, so a good opportunity to > celebrate that as well. > > The event is planned to be 2 sessions of about 4 hours on each day, with > a few presentations per day, but try focus on open discussions about. > The goal is to keep in very informal, without any significant burden for > organizers or participants, not to add to the daily stress with work and > family in the pandemic time. It should be more like meetup style, with > no registration for participants, sessions may not be recorded and can > be done without slides. Likely we will use a (self-hosted) video > conferencing system (Jitsi) for presentations and the IRC or Matrix > channels for chatting. > > The time frames we look at are 15:00-19:00 Berlin time zone (13:00-17:00 > UTC) on the 2nd and the 3rd of September 2020. > > The purpose of this email for now is to see the interest of the > community for such event, reply if you think it is useful to organize it > and you plan to participate. > > If there is interest, then I will follow up with more details about > speakers and the structure of the event. > > Cheers, > Daniel > > -- > Daniel-Constantin Mierla -- www.asipto.com > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Funding: https://www.paypal.me/dcmierla > > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Received ipv6 problem
I tried it but it is sending the unregister message to the second register user.I want to send the message to previous. First user register: ok Second user register: register, and kamailio will send a message unregister to the first. First user: get unregister Message Sorry, maybe I'm not understanding something. Now is sending the message to contact. El mié., 3 jun. 2020 a las 13:13, Ahmed Marsou () escribió: > Ok, thank you so much. > > El mié., 3 jun. 2020 a las 12:54, Daniel-Constantin Mierla (< > mico...@gmail.com>) escribió: > >> Hello, >> >> like Joel said, the reveiced filed in location record is set only for >> NATed contacts and in ipv6 likely it is not the case. >> >> What you should do is like: >> >> $uac_req(ruri) = $(ulc (existingContact=>addr)[0]); >> >> if($(ulc(existingContact=>received)[0]) != $null) { >> >>$uac_req(duri) = $(ulc(existingContact=>received)[0]); >> >> } >> >> Cheers, >> Daniel >> On 03.06.20 12:27, Ahmed Marsou wrote: >> >> Hi, thanks for your response. I appreciate the help, I really appreciate >> it. >> My problem is that I have to send a MESSAGE to an application to show the >> user a message. >> Like that: >> >> >> >> >> >> >> >> >> >> *$ var (address) = $ (ulc (existingContact => received) [0]); $ var >> (ruri) = $ (var (address) {s.substr, 4,0}); # Submit a SIP request stating >> the problem and its reason in the body $ uac_req (method) = "MESSAGE"; $ >> uac_req (ruri) = "sip:" + $ au + "@" + $ var (ruri); $ uac_req (furi) = >> "sip: kamailio @ sip_domain"; $ uac_req (turi) = $ fu; $ uac_req (hdrs) = >> "Max-Forwards: 70 \ r \ nEvent: reg \ r \ nContent-Type: text / plain \ r \ >> nAccept-Contact: *; + g.ext.app.registration \ r \ n" ; $ uac_req (body) = >> "Already registered with another device ID"; uac_req_send ();* >> >> For the previous user, I mean. The first record, not the second. How can >> I get the first source IP address to replace $ var (address) = $ (ulc >> (existingContact => received) [0]); and send him the message? If I use save >> (); module, I will have the same problem, because I will not be able to >> find the previous IP source. >> Thank you so much. >> Kind regards. >> >> El mié., 3 jun. 2020 5:43, Joel Serrano escribió: >> >>> Not exactly an answer to your specific question, but it might help solve >>> your problem in a different way... >>> >>> If you using the registrar module with save()... you might be able to >>> take advantage in some way of the flags 0x04: >>> >>> >>> https://kamailio.org/docs/modules/5.3.x/modules/registrar.html#registrar.f.save >>> >>> >>> *"0x04 - store and maintain one contact per AoR. If there are other >>> contact addresses for AoR not matching current registration, remove them. >>> This mode ensures one contact per AoR (user)." * >>> >>> Regarding "received", I would think that you have it on IPV4 because the >>> UA is probably behind NAT, and you are adding it in config script, with >>> IPv6, there is no NAT, and --most likely-- you are not adding it, thus it's >>> not saved to the database. Check if you are using fix_nated_register() >>> somewhere in your config file.. For IPv6 it might be easier if you just >>> pull the IP from the Contact info. >>> >>> >>> Sorry if this isn't very helpful, I'm guessing a little based on the >>> info you provided :) >>> >>> Cheers, >>> Joel. >>> >>> >>> >>> On Tue, Jun 2, 2020 at 4:46 PM Ahmed Marsou >>> wrote: >>> >>>> Hi; >>>> I'm using the received parameter to send a MESSAGE to unregsiter the >>>> first user that is registered to register the second one. >>>> Using: >>>> *modparam("usrloc", "received_column"* >>>> >>>> *modparam("registrar|nathelper", "received_avp", * >>>> >>>> and when I do a: >>>> select received from location; >>>> as you can see is null. >>>> +--+ >>>> | received | >>>> +--+ >>>> | NULL | >>>> +--+ >>>> >>>> In IPV4 is working fine, but in IPV6 is not. Can you tell me how can I >>>> get this value? >>>> Im going crazy with that. &
Re: [SR-Users] Received ipv6 problem
Ok, thank you so much. El mié., 3 jun. 2020 a las 12:54, Daniel-Constantin Mierla (< mico...@gmail.com>) escribió: > Hello, > > like Joel said, the reveiced filed in location record is set only for > NATed contacts and in ipv6 likely it is not the case. > > What you should do is like: > > $uac_req(ruri) = $(ulc (existingContact=>addr)[0]); > > if($(ulc(existingContact=>received)[0]) != $null) { > >$uac_req(duri) = $(ulc(existingContact=>received)[0]); > > } > > Cheers, > Daniel > On 03.06.20 12:27, Ahmed Marsou wrote: > > Hi, thanks for your response. I appreciate the help, I really appreciate > it. > My problem is that I have to send a MESSAGE to an application to show the > user a message. > Like that: > > > > > > > > > > *$ var (address) = $ (ulc (existingContact => received) [0]); $ var (ruri) > = $ (var (address) {s.substr, 4,0}); # Submit a SIP request stating the > problem and its reason in the body $ uac_req (method) = "MESSAGE"; $ > uac_req (ruri) = "sip:" + $ au + "@" + $ var (ruri); $ uac_req (furi) = > "sip: kamailio @ sip_domain"; $ uac_req (turi) = $ fu; $ uac_req (hdrs) = > "Max-Forwards: 70 \ r \ nEvent: reg \ r \ nContent-Type: text / plain \ r \ > nAccept-Contact: *; + g.ext.app.registration \ r \ n" ; $ uac_req (body) = > "Already registered with another device ID"; uac_req_send ();* > > For the previous user, I mean. The first record, not the second. How can I > get the first source IP address to replace $ var (address) = $ (ulc > (existingContact => received) [0]); and send him the message? If I use save > (); module, I will have the same problem, because I will not be able to > find the previous IP source. > Thank you so much. > Kind regards. > > El mié., 3 jun. 2020 5:43, Joel Serrano escribió: > >> Not exactly an answer to your specific question, but it might help solve >> your problem in a different way... >> >> If you using the registrar module with save()... you might be able to >> take advantage in some way of the flags 0x04: >> >> >> https://kamailio.org/docs/modules/5.3.x/modules/registrar.html#registrar.f.save >> >> >> *"0x04 - store and maintain one contact per AoR. If there are other >> contact addresses for AoR not matching current registration, remove them. >> This mode ensures one contact per AoR (user)." * >> >> Regarding "received", I would think that you have it on IPV4 because the >> UA is probably behind NAT, and you are adding it in config script, with >> IPv6, there is no NAT, and --most likely-- you are not adding it, thus it's >> not saved to the database. Check if you are using fix_nated_register() >> somewhere in your config file.. For IPv6 it might be easier if you just >> pull the IP from the Contact info. >> >> >> Sorry if this isn't very helpful, I'm guessing a little based on the info >> you provided :) >> >> Cheers, >> Joel. >> >> >> >> On Tue, Jun 2, 2020 at 4:46 PM Ahmed Marsou >> wrote: >> >>> Hi; >>> I'm using the received parameter to send a MESSAGE to unregsiter the >>> first user that is registered to register the second one. >>> Using: >>> *modparam("usrloc", "received_column"* >>> >>> *modparam("registrar|nathelper", "received_avp", * >>> >>> and when I do a: >>> select received from location; >>> as you can see is null. >>> +--+ >>> | received | >>> +--+ >>> | NULL | >>> +--+ >>> >>> In IPV4 is working fine, but in IPV6 is not. Can you tell me how can I >>> get this value? >>> Im going crazy with that. >>> >>> reg_fetch_contacts("location", "$fu", "existingContact"); >>> if( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v"){ >>> $var(oldDeviceId) = >>> $(ulc(existingContact=>callid)[0]{s.substr,9,0}); >>> $var(newDeviceId) = >>> $(hdr(Call-ID){s.substr,9,0}); >>> if($var(oldDeviceId) != $var(newDeviceId) ){ >>> xlog("L_INFO","New device id is >>> different:warn previous user another user overide him"); >>> $var(address) = $(ulc(existingContact=> >>> *received*)[0])
Re: [SR-Users] Received ipv6 problem
Hi, thanks for your response. I appreciate the help, I really appreciate it. My problem is that I have to send a MESSAGE to an application to show the user a message. Like that: *$ var (address) = $ (ulc (existingContact => received) [0]);$ var (ruri) = $ (var (address) {s.substr, 4,0});# Submit a SIP request stating the problem and its reason in the body$ uac_req (method) = "MESSAGE";$ uac_req (ruri) = "sip:" + $ au + "@" + $ var (ruri);$ uac_req (furi) = "sip: kamailio @ sip_domain";$ uac_req (turi) = $ fu;$ uac_req (hdrs) = "Max-Forwards: 70 \ r \ nEvent: reg \ r \ nContent-Type: text / plain \ r \ nAccept-Contact: *; + g.ext.app.registration \ r \ n" ;$ uac_req (body) = "Already registered with another device ID";uac_req_send ();* For the previous user, I mean. The first record, not the second. How can I get the first source IP address to replace $ var (address) = $ (ulc (existingContact => received) [0]); and send him the message? If I use save (); module, I will have the same problem, because I will not be able to find the previous IP source. Thank you so much. Kind regards. El mié., 3 jun. 2020 5:43, Joel Serrano escribió: > Not exactly an answer to your specific question, but it might help solve > your problem in a different way... > > If you using the registrar module with save()... you might be able to take > advantage in some way of the flags 0x04: > > > https://kamailio.org/docs/modules/5.3.x/modules/registrar.html#registrar.f.save > > > *"0x04 - store and maintain one contact per AoR. If there are other > contact addresses for AoR not matching current registration, remove them. > This mode ensures one contact per AoR (user)."* > > Regarding "received", I would think that you have it on IPV4 because the > UA is probably behind NAT, and you are adding it in config script, with > IPv6, there is no NAT, and --most likely-- you are not adding it, thus it's > not saved to the database. Check if you are using fix_nated_register() > somewhere in your config file.. For IPv6 it might be easier if you just > pull the IP from the Contact info. > > > Sorry if this isn't very helpful, I'm guessing a little based on the info > you provided :) > > Cheers, > Joel. > > > > On Tue, Jun 2, 2020 at 4:46 PM Ahmed Marsou wrote: > >> Hi; >> I'm using the received parameter to send a MESSAGE to unregsiter the >> first user that is registered to register the second one. >> Using: >> *modparam("usrloc", "received_column"* >> >> *modparam("registrar|nathelper", "received_avp",* >> >> and when I do a: >> select received from location; >> as you can see is null. >> +--+ >> | received | >> +--+ >> | NULL | >> +--+ >> >> In IPV4 is working fine, but in IPV6 is not. Can you tell me how can I >> get this value? >> Im going crazy with that. >> >> reg_fetch_contacts("location", "$fu", "existingContact"); >> if( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v"){ >> $var(oldDeviceId) = >> $(ulc(existingContact=>callid)[0]{s.substr,9,0}); >> $var(newDeviceId) = $(hdr(Call-ID){s.substr,9,0}); >> if($var(oldDeviceId) != $var(newDeviceId) ){ >> xlog("L_INFO","New device id is >> different:warn previous user another user overide him"); >> $var(address) = $(ulc(existingContact=> >> *received*)[0]); >> $var(ruri) = >> $(var(address){s.substr,4,0}); >> #Send a SIP Request signalling the >> problem and its reason on the body >> $uac_req(method)="MESSAGE"; >> $uac_req(ruri) = "sip:"+ $au + "@" + >> $var(ruri); >> $uac_req(furi) = "sip:kamailio@sip_domain >> "; >> $uac_req(turi) = $fu; >> $uac_req(hdrs)="Max-Forwards: >> 70\r\nEvent: reg\r\nContent-Type: >> text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; >> $uac_req(body)="Already registered with >> another device id"; >> uac_req_send(); >> drop; >> } >> } >> >> >> Thank you. >> >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Received ipv6 problem
Hi; I'm using the received parameter to send a MESSAGE to unregsiter the first user that is registered to register the second one. Using: *modparam("usrloc", "received_column"* *modparam("registrar|nathelper", "received_avp",* and when I do a: select received from location; as you can see is null. +--+ | received | +--+ | NULL | +--+ In IPV4 is working fine, but in IPV6 is not. Can you tell me how can I get this value? Im going crazy with that. reg_fetch_contacts("location", "$fu", "existingContact"); if( $(ulc(existingContact=>user_agent)[0]) =~ "SPI/v"){ $var(oldDeviceId) = $(ulc(existingContact=>callid)[0]{s.substr,9,0}); $var(newDeviceId) = $(hdr(Call-ID){s.substr,9,0}); if($var(oldDeviceId) != $var(newDeviceId) ){ xlog("L_INFO","New device id is different:warn previous user another user overide him"); $var(address) = $(ulc(existingContact=> *received*)[0]); $var(ruri) = $(var(address){s.substr,4,0}); #Send a SIP Request signalling the problem and its reason on the body $uac_req(method)="MESSAGE"; $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri); $uac_req(furi) = "sip:kamailio@sip_domain"; $uac_req(turi) = $fu; $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; $uac_req(body)="Already registered with another device id"; uac_req_send(); drop; } } Thank you. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Login Attempts
OK, it works. I create a table 'auth_count' and I save $ ua, $ auth_count, and $ Ts, then I implement de code. Finaly I use sqlop. Thank you so much for the support. if (is_method("REGISTER")) { if(is_present_hf("Authorization")){ $var(max_attempts)= 3; if (sql_query("ca","select auth_count from auth_count where Blocked_user='$au'","auth_count")== $var(max_attempts) && $sht(a=>$au::auth_count)!= $null) { xlog("Other attempts auth failed more than 3 times - src ip: $si\n"); $var(address) = $si; $var(ruri) = "[" + $var(address)+ "]" + ":" + $sp + ";" + "transport" + "=" + $proto; #Send a SIP Request signalling the problem and its reason on the body $uac_req(method)="MESSAGE"; $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri); $uac_req(furi) = " sip:kamai...@ericsson.net"; $uac_req(turi) = $fu; $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; $uac_req(body)="Accout Blocked. Plese contact with your adminstrator"; uac_req_send(); exit; }else if($sht(a=>$au::auth_count)== $var(max_attempts)){ xlog("L_INFO","Insert the blocked user on database"); sql_query_async("ca", "insert into auth_count (Blocked_user, auth_count, Blocked_date) values ('$ua', '$sht(a=>$au::auth_count)', '$Ts')"); xlog("Other attempts auth failed more than 3 times - src ip: $si\n"); $var(address) = $si; $var(ruri) = "[" + $var(address)+ "]" + ":" + $sp + ";" + "transport" + "=" + $proto; #Send a SIP Request signalling the problem and its reason on the body $uac_req(method)="MESSAGE"; $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri); $uac_req(furi) = " sip:kamai...@ericsson.net"; $uac_req(turi) = $fu; $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; $uac_req(body)="Accout Blocked. Plese contact with your adminstrator"; uac_req_send(); exit; }else if ($sht(a=>$au::auth_count)== $null){ xlog("L_INFO","Ponemos un cero ###"); $sht(a=>$au::auth_count) = 0; } if(!www_authenticate("ericsson.net", "subscriber")) { if ($? == -1){ sl_send_reply("500", "Internal Server Error"); exit; } if ($? == -2){ $sht(a=>$au::auth_count) = $sht(a=>$au::auth_count) + 1; sl_send_reply("403", "Forbidden"); exit; } xlog("L_INFO","REPETIMOS ACCESO ###"); www_challenge("$td"/*realm*/,"0"/*qop*/); exit; } xlog("L_INFO","AQUI ###"); $sht(a=>$au::auth_count) = 0; } else { www_challenge("$td","0"); exit; } El mié., 27 may. 2020 a las 8:15, Daniel-Constantin Mierla (< mico...@gmail.com>) escribió: > Hello, > On 26.05.20 22:12, Ahmed Marsou wrote: > > Sorry, what I want is to block a user after 'n' incorrect login attempts > and leave it blocked until a user unblocks them from the website. I try > som
Re: [SR-Users] Login Attempts
Sorry, what I want is to block a user after 'n' incorrect login attempts and leave it blocked until a user unblocks them from the website. I try something with the htable module but I don't know if I can save the value in the database. Is going to check if the number of login attempts is > 'n', and if is > 'n', I gonna leave it blocked and send a MESSAGE to an app. I starting with something like this: modparam("htable", "htable", "a=>size=8;autoexpire=920;") . . . if(is_present_hf("Authorization")){ reg_fetch_contacts("location", "$fu", "existingContact"); if($sht(a=>$au::auth_count)==3){ xlog("Other attempts auth failed more than 3 times - src ip: $si\n"); $var(address) = $si; $var(ruri) = "[" + $var(address)+ "]" + ":" + $sp + ";" + "transport" + "=" + $proto; #Send a SIP Request signalling the problem and its reason on the body $uac_req(method)="MESSAGE"; $uac_req(ruri) = "sip:"+ $au + "@" + $var(ruri); $uac_req(furi) = "sip:kamai...@ericsson.net"; $uac_req(turi) = $fu; $uac_req(hdrs)="Max-Forwards: 70\r\nEvent: reg\r\nContent-Type: text/plain\r\nAccept-Contact:*;+g.ext.app.registration\r\n"; $uac_req(body)="Accout Blocked. Plese contact with your adminstrator"; uac_req_send(); exit; }else{ $sht(a=>$au::auth_count) = 0; } if(!www_authenticate("ericsson.net", "subscriber")){ switch ($retcode) { case -1: sl_send_reply("403", "Forbidden"); exit; case -2: if($sht(a=>$au::auth_count) == $null) $sht(a=>$au::auth_count) = 0; $sht(a=>$au::auth_count) = $sht(a=>$au::auth_count) + 1; break; } www_challenge("$td"/*realm*/,"0"/*qop*/); exit; } $sht(a=>$au::auth_count) = 0; } else { www_challenge("$td","0"); exit; } } But first problem: Is not counting. I dont know if I have to configure any param more to start counting attempts? Second problem: I dont know the best option to save the login attempts on databes. Theres is any module that can help? Thank you so much. El mar., 26 may. 2020 a las 21:56, Daniel-Constantin Mierla (< mico...@gmail.com>) escribió: > Hello, > > if you look for inserting into/querying from a database table from config > script, look at sqlops module. > > If you need something else, provide more details about what you want to > achieve. > > Cheers, > Daniel > On 26.05.20 20:38, Ahmed Marsou wrote: > > Hi; > I have to control the login attempts, but blocking the user until I unlock > him from web site. To do that I have to save the paramter on database. > There is any table and column where I can save that parameter? > I'm using the htable module to count the Authentification attempts. > There's is any module that do that easily? > Thank you. > > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- > www.linkedin.com/in/miconda > Funding: https://www.paypal.me/dcmierla > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Login Attempts
Hi; I have to control the login attempts, but blocking the user until I unlock him from web site. To do that I have to save the paramter on database. There is any table and column where I can save that parameter? I'm using the htable module to count the Authentification attempts. There's is any module that do that easily? Thank you. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users