Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Denys Pozniak
Hello! Thanks! *msg_apply_changes()* works for me! PS. Maybe it is worth adding this to the documentation, as it is not entirely trivial? ср, 18 нояб. 2020 г. в 12:46, David Villasmil < david.villasmil.w...@gmail.com>: > Isn’t “message_apply_changes” applied automatically? > > But I think Alfons

[SR-Users] t_uac_send function with From tag

2020-11-18 Thread João Vitor Arruda
Hello, I'm trying to use the function t_uac_send inside a failure_route as described in https://kamailio.org/docs/modules/5.3.x/modules/tm.html#tm.f.t_uac_send to send a CANCEL out. Although the documentation says "it can include From/To tags" i was not able to get the from tag provided to be us

[SR-Users] How to route to calls to asterisk

2020-11-18 Thread Mihai Cezar
Hi all, I need some help on getting to work my scenario: I have 3 asterisk servers, and every agents (soft phones like zoiper) is connecting to which server they need by contacting the PublicIP of each server. (the problem is that I need to reuse the IP address on others servers) . I want if is

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Ahmed Marsou
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

[SR-Users] record-route and INFO

2020-11-18 Thread David Villasmil
Hello guys, I have a setup like this: FS(private)-->(private)Kamailio1(Public)-->Kamailio2(public)-->provider. I have mhomed=0, enable_double_rr=1, I'm listening on 2 different ports, 1 private, 1 public (with advertise) and on Kamailio1 the DISPATCH ROUTE I force the socket $fs = "LISTEN_PRIVA

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Daniel-Constantin Mierla
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 conten

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Daniel-Constantin Mierla
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 opti

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread David Villasmil
Sure, as root, read the file and start Kamailio with -u kamailio -g kamailio On Wed, 18 Nov 2020 at 14: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/module

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Ahmed Marsou
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,

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread David Villasmil
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. >

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
But these could be used: detailed_ip_type (ip, result) detailed_ipv4_type (ip, result) detailed_ipv6_type (ip, result) -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > this one: > https://www.kamailio.org/docs/modules/stable/modules/ipops.html#ipops.f.is_ip_rfc1918 If it is really is based on RFC1918, then I doubt that it would handle IPv6 private addresses, since when that RFC was written, IPv6 didn't exist. -- Juha __

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Alexandru Covalschi
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 AP

Re: [SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread Alexandru Covalschi
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 username

[SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
I looked in the wiki for a utility function that would check if given ip address is private, but didn't find one. Does it exist? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/list

Re: [SR-Users] Info: URL expander browser extension for Kamailio resources

2020-11-18 Thread Ilie Soltanici
Awesome! Will be very useful for me. Thanks for that. On Wed, 18 Nov 2020 at 11:33, Daniel-Constantin Mierla wrote: > Hello, > > short note to the community forum in case someone finds it useful -- I > wrote a tiny browser extension to facilitate navigation to various web > resources related to

[SR-Users] Info: URL expander browser extension for Kamailio resources

2020-11-18 Thread Daniel-Constantin Mierla
Hello, short note to the community forum in case someone finds it useful -- I wrote a tiny browser extension to facilitate navigation to various web resources related to Kamailio project, helping to jump quicker to web pages by typing some keywords on the address bar in the modern browsers. Insta

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread David Villasmil
Isn’t “message_apply_changes” applied automatically? But I think Alfonso is talking specifically about CANCELs generated by Kamailio on timeouts. On Wed, 18 Nov 2020 at 09:58, Daniel-Constantin Mierla wrote: > Hello, > On 18.11.20 10:39, Denys Pozniak wrote: > > Hello! > > Call flow: FreeSWITCH

Re: [SR-Users] UAC Module

2020-11-18 Thread Javier Valencia
thx Daniel Regards, JV El 18/11/20 a las 10:01, Daniel-Constantin Mierla escribió: Hello, the module is not writing back to database, is only using database to load (or reload) records in memory and all the states are kept in memory. All the best, Daniel On 18.11.20 09:34, Javier Valenci

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Daniel-Constantin Mierla
Hello, On 18.11.20 10:39, Denys Pozniak wrote: > Hello! > > Call flow: FreeSWITCH --> SBC --> Edge Proxy   >   > In my case, the problem is related to the fact that the SBC deletes > the Reason header from FreeSWITCH and I am trying to recover it on the > Kamailio side (Edge Proxy). > It is especi

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Denys Pozniak
Hello! Call flow: FreeSWITCH --> SBC --> Edge Proxy In my case, the problem is related to the fact that the SBC deletes the Reason header from FreeSWITCH and I am trying to recover it on the Kamailio side (Edge Proxy). It is especially important to recover the message: "Call completed elsewhere"

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Angel Elena
You can use : is_ip_rfc1918(variable) Ángel Elena Medina _o) cr...@craem.net / \\ http://diablo.craem.net _(___V @craem_ www.linkedin.com/in/angel-elena-medina Kopano Webapp. -Original message- Fr

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Daniel-Constantin Mierla
On 18.11.20 10:17, Juha Heinanen wrote: > Daniel-Constantin Mierla writes: > >> this one: >> https://www.kamailio.org/docs/modules/stable/modules/ipops.html#ipops.f.is_ip_rfc1918 > If it is really is based on RFC1918, then I doubt that it would handle > IPv6 private addresses, since when that RFC

Re: [SR-Users] how to add URI parameter

2020-11-18 Thread Daniel-Constantin Mierla
Hello, for header body changes, one option is:   * https://www.kamailio.org/docs/modules/stable/modules/textops.html#textops.f.subst_hf But you have to be careful with URI parts, because they may not have enclosing <> and if you add a URI parameter, then you have to surround with <>, otherwise a

[SR-Users] Presence of plain text username and password in kamailio.cfg

2020-11-18 Thread 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 ha

Re: [SR-Users] help: can anybody give me a configuration template of SBC?

2020-11-18 Thread Daniel-Constantin Mierla
Hello, On 17.11.20 07:40, Steve Davies wrote: > > > On Tue, 17 Nov 2020 at 08:37, 陈理军 > wrote: > > Hi > I want to configure Kamailio SIP server to act as a SBC. > I had read the article of Kamailio working as SBC to connect MS > Team project:   >

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Daniel-Constantin Mierla
Few more remarks ... On 17.11.20 19:24, Alex Balashov wrote: > It is worth noting that internally generated CANCELs are the only kind > of CANCEL; while the function `t_relay_cancel()` exists, it is a > misnomer. Yes, when using tm for sending out. The stateless forward() is the alternative, but

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Daniel-Constantin Mierla
Same question here like in my other reply:   * https://lists.kamailio.org/pipermail/sr-users/2020-November/23.html How do you expect to fill the value of the header? Cheers, Daniel On 17.11.20 19:20, David Villasmil wrote: > And on internally generated CANCELs > > On Tue, 17 Nov 2020 at 14:

Re: [SR-Users] Add Reason Header to kamailio generated CANCEL

2020-11-18 Thread Daniel-Constantin Mierla
Hello, how do you expect to fill the value of the header? Typically it is build based on the response of the INVITE, probably the reason it was implemented inside the tm module. I need some example of possible cases you want to be covered to see what's possible now or what can be added to enable

Re: [SR-Users] UAC Module

2020-11-18 Thread Daniel-Constantin Mierla
Hello, the module is not writing back to database, is only using database to load (or reload) records in memory and all the states are kept in memory. All the best, Daniel On 18.11.20 09:34, Javier Valencia wrote: > Hi there! > > Configuring the UAC module to use "remote registers" in a Kamailio

[SR-Users] UAC Module

2020-11-18 Thread Javier Valencia
Hi there! Configuring the UAC module to use "remote registers" in a Kamailio 4.4.3. Everything it's working except for the flags database field to which I always put a value of 0. But when Kamailio starts to launch the REGISTRATION that field does not persist in the DB. In the kamailio.cfg f

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Daniel-Constantin Mierla
Hello, this one:   * https://www.kamailio.org/docs/modules/stable/modules/ipops.html#ipops.f.is_ip_rfc1918 I haven't checked if tests the newer ranges (e.g., carrier grade nat). The nat_uac_test() should have the recent ranges for non-routable ip addresses, just in case one wants to double check