[SR-Users] Re: pua_json mwi minimal json

2023-07-21 Thread E. Schmidbauer
The json you attached to the email had several mistakes, try using a json
linting tool to validate the json.
Here is valid json based on your email:

{
  "Event-Package": "message-summary",
  "Event-Name": "update",
  "Expires": "3600",
  "From": "sip:cc...@dff.com",
  "To": "sip:cc...@dff.com",
  "Message-Account": "sip:cc...@dff.com",
  "Messages-Waiting": "yes",
  "MWI-Voice-Message": "2/8 (0/0)",
  "Messages-New": "2",
  "Messages-Saved": "8",
  "Messages-Urgent": "0",
  "Messages-Urgent-Saved": "0",
  "From-Realm": "dff.com",
  "From-User": "ccoca",
  "Call-ID": "0_845806535@10.22.22.22"
}


On Fri, Jul 21, 2023 at 5:34 AM David VILLAUME 
wrote:

> Hello,
>
>
>
> On 5.6.4, i’m trying to perform mwi pua_json, but cannot get it working.
>
>
>
> I have a doubt about my json and spent some time to make variations on
> json without success.
>
>
>
> Does one of you played with it and can tell me if something is wrong about
> this json ?
>
> {
>
>
>
> "Event-Package":"message-summary",
>
> "Event-Name":"update"
>
> "expires":3600,
>
> "From":sip:cc...@dff.com,
>
> "To":sip:cc...@dff.com,
>
> "Message-Account":sip:cc...@dff.com,
>
> "Messages-Waiting":"yes",
>
> "MWI-Voice-Message":"2/8 (0/0)",
>
> "Messages-New":"2",
>
> "Messages-Saved":"8",
>
> "Messages-Urgent":"0",
>
> "Messages-Urgent-Saved":"0",
>
> "From-Realm":"dff.com",
>
> "From-User":"ccoca",
>
> "Call-ID":0_845806535@10.22.22.22,
>
>
>
> }
>
>
>
> Regards,
>
> David
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to sr-users-le...@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:


[SR-Users] Re: enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header

2023-02-17 Thread E. Schmidbauer
kamailio version: 5.6.3 (x86_64/linux)
handling SIP on several interfaces:
 udp: 1.23.23.45 [1.23.23.45]:10080
 udp: 1.23.23.45 [1.23.23.45]:5060
 udp: 1.23.23.45 [1.23.23.45]:4060
 tcp: 1.23.23.45 [1.23.23.45]:10080

The topos settings are mostly defaults with redis backend:
modparam("ndb_redis", "server", "name=srv1;addr=127.0.0.1;port=6379")
modparam("topos_redis", "serverid", "srv1")
modparam("topos", "storage", "redis")

I'll see if i can share pcaps, will need to redact values first

On Fri, Feb 17, 2023 at 7:26 AM Daniel-Constantin Mierla 
wrote:

> Maybe you can share a pcap for such case together with topos modparams and
> kamailio version.
>
>
> On 17.02.23 13:01, E. Schmidbauer wrote:
>
> Yes- I am adding record_route(); on each INVITE, no errors in logs.
>
>
> On Fri, Feb 17, 2023 at 2:05 AM Daniel-Constantin Mierla <
> mico...@gmail.com> wrote:
>
>> Hello,
>>
>> are you executing record_route()? Do you get any errors in the logs?
>>
>> Cheers,
>> Daniel
>> On 16.02.23 23:45, E. Schmidbauer wrote:
>>
>> Hi Patrick,
>> I'm running into a similar issue with `topos`
>> I have kamailio setup to use 2 interfaces, one for ingress, and one for
>> egress traffic. In this setup, `topos` routing does not work
>> Were you able to find a solution?
>>
>>
>> On Fri, Mar 18, 2022 at 4:34 AM Patrick Karton 
>> wrote:
>>
>>>
>>> Caller <--> (internal_IP) Kamailio (external_IP) <---> Callee
>>>
>>>
>>> I have this set up of kamailio with 2 interfaces.
>>>
>>> i use topos module for topology hiding and what i want to do is to
>>> send  external_IP in Contact Header of request relayed to Callee and
>>> internal_IP
>>> in Contact Header of response relayed to Caller.
>>>
>>> i noticed that :
>>> when i use topos module with contact_mode to 0
>>> all Record-Route and Caller Via Header are removed and thats great.
>>> but i dont find way to put 2 different  ip addresses in Request and
>>> Response Contact Header?
>>>
>>> when i use contact_mode to 2 Record-Route and Caller Via Header are not
>>> anymore removed thats bad for
>>> topology hiding. And its seems we can not $xavu(_tps_=>contact_host)
>>>  parameter of module
>>> to put 2 different  ip addresses in Request and Response Contact Header.
>>>
>>>
>>> What i want is :
>>> - remove all Record-Route and Caller Via Header for request like when
>>> contact_mode to 0
>>> - and put 2 different  ip addresses in Request and Response Contact
>>> Header
>>>
>>> is it possible to achieve it ?
>>>
>>> Thanks.
>>> --
>>> *De :* sr-users  de la part de
>>> Patrick Karton 
>>> *Envoyé :* jeudi 17 mars 2022 19:39
>>> *À :* Henning Westerholt ; Kamailio (SER) - Users
>>> Mailing List 
>>> *Objet :* Re: [SR-Users] enable topology hiding on one side or dynamic
>>> ip in topoh module Contact and Via Header
>>>
>>> Thanks For the link.
>>>
>>> but i dont know exactly how to make the topos module work!
>>>
>>> i have enabled it on my kamailio script but i have some issues.
>>>
>>>
>>>-  in the relayed request, received Via is removed and only kamailio
>>>Via is left. thats great for topology hiding.
>>>
>>>
>>>- in the relayed request there is no Contact Header. i assume the
>>>module removes the received one  and must insert a new one .
>>>
>>>
>>> loadmodule "db_text.so"
>>> loadmodule "topos.so"
>>>
>>>
>>> modparam("db_text", "db_mode", 0)
>>> modparam("db_text", "emptystring", 0)
>>> modparam("db_text", "file_buffer_size", 8192)
>>> modparam("db_text", "max_result_rows", 1000)
>>>
>>> modparam("topos", "storage", "db")
>>> modparam("topos", "db_url", "text:///home/sbc/database")
>>> modparam("topos", "mask_callid", 0)
>>> modparam("topos", "sanity_checks", 0)
>>> modparam("topos", "contact_host", "127.0.0.1")
>>> modparam("topos", "contact_mo

[SR-Users] Re: enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header

2023-02-17 Thread E. Schmidbauer
Yes- I am adding record_route(); on each INVITE, no errors in logs.


On Fri, Feb 17, 2023 at 2:05 AM Daniel-Constantin Mierla 
wrote:

> Hello,
>
> are you executing record_route()? Do you get any errors in the logs?
>
> Cheers,
> Daniel
> On 16.02.23 23:45, E. Schmidbauer wrote:
>
> Hi Patrick,
> I'm running into a similar issue with `topos`
> I have kamailio setup to use 2 interfaces, one for ingress, and one for
> egress traffic. In this setup, `topos` routing does not work
> Were you able to find a solution?
>
>
> On Fri, Mar 18, 2022 at 4:34 AM Patrick Karton 
> wrote:
>
>>
>> Caller <--> (internal_IP) Kamailio (external_IP) <---> Callee
>>
>>
>> I have this set up of kamailio with 2 interfaces.
>>
>> i use topos module for topology hiding and what i want to do is to
>> send  external_IP in Contact Header of request relayed to Callee and
>> internal_IP
>> in Contact Header of response relayed to Caller.
>>
>> i noticed that :
>> when i use topos module with contact_mode to 0
>> all Record-Route and Caller Via Header are removed and thats great.
>> but i dont find way to put 2 different  ip addresses in Request and
>> Response Contact Header?
>>
>> when i use contact_mode to 2 Record-Route and Caller Via Header are not
>> anymore removed thats bad for
>> topology hiding. And its seems we can not $xavu(_tps_=>contact_host)
>>  parameter of module
>> to put 2 different  ip addresses in Request and Response Contact Header.
>>
>>
>> What i want is :
>> - remove all Record-Route and Caller Via Header for request like when
>> contact_mode to 0
>> - and put 2 different  ip addresses in Request and Response Contact Header
>>
>> is it possible to achieve it ?
>>
>> Thanks.
>> --
>> *De :* sr-users  de la part de
>> Patrick Karton 
>> *Envoyé :* jeudi 17 mars 2022 19:39
>> *À :* Henning Westerholt ; Kamailio (SER) - Users Mailing
>> List 
>> *Objet :* Re: [SR-Users] enable topology hiding on one side or dynamic
>> ip in topoh module Contact and Via Header
>>
>> Thanks For the link.
>>
>> but i dont know exactly how to make the topos module work!
>>
>> i have enabled it on my kamailio script but i have some issues.
>>
>>
>>-  in the relayed request, received Via is removed and only kamailio
>>Via is left. thats great for topology hiding.
>>
>>
>>- in the relayed request there is no Contact Header. i assume the
>>module removes the received one  and must insert a new one .
>>
>>
>> loadmodule "db_text.so"
>> loadmodule "topos.so"
>>
>>
>> modparam("db_text", "db_mode", 0)
>> modparam("db_text", "emptystring", 0)
>> modparam("db_text", "file_buffer_size", 8192)
>> modparam("db_text", "max_result_rows", 1000)
>>
>> modparam("topos", "storage", "db")
>> modparam("topos", "db_url", "text:///home/sbc/database")
>> modparam("topos", "mask_callid", 0)
>> modparam("topos", "sanity_checks", 0)
>> modparam("topos", "contact_host", "127.0.0.1")
>> modparam("topos", "contact_mode", 0)
>>
>>
>> ### topos_t file table
>> id(int,auto) rectime(int,null) x_context(string,null)
>> s_method(string,null) s_cseq(string,null) a_callid(string,null)
>> a_uuid(string,null) b_uuid(string,null) direction(int,null)
>> x_via(string,null) x_vbranch(string,null) x_rr(string,null)
>> y_rr(string,null) s_rr(string,null) x_uri(string,null)
>> a_contact(string,null) b_contact(string,null) as_contact(string,null)
>> bs_contact(string,null) x_tag(string,null) a_tag(string,null)
>> b_tag(string,null) a_srcaddr(string,null) b_srcaddr(string,null)
>> a_socket(string,null) b_socket(string,null)
>>
>> do i need to insert some records in table or the module does it ?
>>
>>
>>
>> --
>> *De :* Henning Westerholt 
>> *Envoyé :* jeudi 17 mars 2022 17:37
>> *À :* Kamailio (SER) - Users Mailing List 
>> *Cc :* Patrick Karton 
>> *Objet :* RE: enable topology hiding on one side or dynamic ip in topoh
>> module Contact and Via Header
>>
>>
>> Hello,
>>
>>
>>
>> have a look at this event route:
>> https://kamailio.org/docs/modules/5.5.x/modules/topo

[SR-Users] Re: enable topology hiding on one side or dynamic ip in topoh module Contact and Via Header

2023-02-16 Thread E. Schmidbauer
Hi Patrick,
I'm running into a similar issue with `topos`
I have kamailio setup to use 2 interfaces, one for ingress, and one for
egress traffic. In this setup, `topos` routing does not work
Were you able to find a solution?


On Fri, Mar 18, 2022 at 4:34 AM Patrick Karton 
wrote:

>
> Caller <--> (internal_IP) Kamailio (external_IP) <---> Callee
>
>
> I have this set up of kamailio with 2 interfaces.
>
> i use topos module for topology hiding and what i want to do is to
> send  external_IP in Contact Header of request relayed to Callee and
> internal_IP
> in Contact Header of response relayed to Caller.
>
> i noticed that :
> when i use topos module with contact_mode to 0
> all Record-Route and Caller Via Header are removed and thats great.
> but i dont find way to put 2 different  ip addresses in Request and
> Response Contact Header?
>
> when i use contact_mode to 2 Record-Route and Caller Via Header are not
> anymore removed thats bad for
> topology hiding. And its seems we can not $xavu(_tps_=>contact_host)
>  parameter of module
> to put 2 different  ip addresses in Request and Response Contact Header.
>
>
> What i want is :
> - remove all Record-Route and Caller Via Header for request like when
> contact_mode to 0
> - and put 2 different  ip addresses in Request and Response Contact Header
>
> is it possible to achieve it ?
>
> Thanks.
> --
> *De :* sr-users  de la part de
> Patrick Karton 
> *Envoyé :* jeudi 17 mars 2022 19:39
> *À :* Henning Westerholt ; Kamailio (SER) - Users Mailing
> List 
> *Objet :* Re: [SR-Users] enable topology hiding on one side or dynamic ip
> in topoh module Contact and Via Header
>
> Thanks For the link.
>
> but i dont know exactly how to make the topos module work!
>
> i have enabled it on my kamailio script but i have some issues.
>
>
>-  in the relayed request, received Via is removed and only kamailio
>Via is left. thats great for topology hiding.
>
>
>- in the relayed request there is no Contact Header. i assume the
>module removes the received one  and must insert a new one .
>
>
> loadmodule "db_text.so"
> loadmodule "topos.so"
>
>
> modparam("db_text", "db_mode", 0)
> modparam("db_text", "emptystring", 0)
> modparam("db_text", "file_buffer_size", 8192)
> modparam("db_text", "max_result_rows", 1000)
>
> modparam("topos", "storage", "db")
> modparam("topos", "db_url", "text:///home/sbc/database")
> modparam("topos", "mask_callid", 0)
> modparam("topos", "sanity_checks", 0)
> modparam("topos", "contact_host", "127.0.0.1")
> modparam("topos", "contact_mode", 0)
>
>
> ### topos_t file table
> id(int,auto) rectime(int,null) x_context(string,null)
> s_method(string,null) s_cseq(string,null) a_callid(string,null)
> a_uuid(string,null) b_uuid(string,null) direction(int,null)
> x_via(string,null) x_vbranch(string,null) x_rr(string,null)
> y_rr(string,null) s_rr(string,null) x_uri(string,null)
> a_contact(string,null) b_contact(string,null) as_contact(string,null)
> bs_contact(string,null) x_tag(string,null) a_tag(string,null)
> b_tag(string,null) a_srcaddr(string,null) b_srcaddr(string,null)
> a_socket(string,null) b_socket(string,null)
>
> do i need to insert some records in table or the module does it ?
>
>
>
> --
> *De :* Henning Westerholt 
> *Envoyé :* jeudi 17 mars 2022 17:37
> *À :* Kamailio (SER) - Users Mailing List 
> *Cc :* Patrick Karton 
> *Objet :* RE: enable topology hiding on one side or dynamic ip in topoh
> module Contact and Via Header
>
>
> Hello,
>
>
>
> have a look at this event route:
> https://kamailio.org/docs/modules/5.5.x/modules/topos.html#topos.e.msg_outgoing
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Patrick
> Karton
> *Sent:* Wednesday, March 16, 2022 7:28 PM
> *To:* sr-users@lists.kamailio.org
> *Subject:* [SR-Users] enable topology hiding on one side or dynamic ip in
> topoh module Contact and Via Header
>
>
>
> Hello ,
>
>
>
> im using kamailio with two interfaces external and internal.
>
>
>
> i need a way either to :
>
>
>
> · enable topoh hiding only when outgoing interface is external (
> mask contact and Via ip only when ougoing interface is external
>
> · or if it is not possible to enable it only in one direction.i
> want to know how to configure dynamic(for example in xavp or avp) ip to put
> in Contact and Via when topoh is enabled.
>
> i see that the *'mask_ip'* parameter of topoh module is a string. so we
> can not set a dynamic value here unfortunately.
>
>
>
> Thanks
>
>
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * 

Re: [SR-Users] load to htable from flat file

2022-03-15 Thread E. Schmidbauer
I prefer sqlite for something like this

On Tue, Mar 15, 2022, 7:11 AM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> Is this possible?
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] pua_json_publish is not realtime...

2021-10-11 Thread E. Schmidbauer
Can you attach a sip subscribe message and json payload ($rb) which you
expect to send a notify to the subscribe?

On Fri, Oct 8, 2021 at 11:49 AM Jerry Kendall <
jerry.kend...@bishophosting.com> wrote:

> Hey there,
>
>
> I have this, as per documentation, that I assume is going to push out the
> publish events real-time as that is what the docs indicate...
>
> ===
>
> event_route[xhttp:request] {
>
>   $var(call-id) = $(rb{json.parse,Call-ID});
>   if ($(rb{json.parse,Event-Package}) == "dialog") {
>   xlog("L_INFO", "$var(call-id)|log|received 
> $(rb{json.parse,Event-Package}) update for $(rb{json.parse,From})");
>   pua_json_publish($rb);
>   }
> }
>
> ===
>
> Problem is, it does NOT send out a notification - the BLFs do not change 
> UNTIL the devices do a re-subscribe
>
> Does anyone know what I am missing?
>
>
> Thanks In Advance
> Jerry
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] DMQ_USRLOC module and calls

2021-07-13 Thread E. Schmidbauer
I usually put an "edge" proxy (another set of kamailio instances) in front
of sip registrars. the edge proxies add the path header, this allows your
sip registrars to remain "connectionless" to the UAC.
This allows an INVITE to be sent to the UAC from any sip registrar in your
cluster, the user location data will have a "path" value which tells which
edge proxy to use when trying to reach the UAC.

On Tue, Jul 13, 2021 at 11:32 AM Alex Balashov 
wrote:

> On 7/13/21 11:26 AM, Social Boh wrote:
>
> > Sorry,
> >
> > I explained myself wrong. I know how using PATH and what PATH do.
>
> Your question was:
>
> "Is it possible use this flow?
>
> USER A --> KamailioA --> KamailioB --> User B
>
> to resolve this kind of problem or is there other available option?"
>
>
> And Path is the answer.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Sipwise SEMS

2021-07-05 Thread E. Schmidbauer
Does SEMS support ICE for media negotiation?

On Mon, Jul 5, 2021, 8:45 AM Dmitry Sinina 
wrote:

> There is also SEMS forked by yeti-switch project
> https://github.com/yeti-switch/sems It has a lot new features but it is
> not fully compatible with old modules.
> On 05.07.21 11:42, Daniel-Constantin Mierla wrote:
>
>
> On 05.07.21 10:18, Jon Bonilla (Manwe) wrote:
>
> El Mon, 5 Jul 2021 06:26:12 +
> Henning Westerholt   escribió:
>
>
> Hello Alex,
>
> yes, sipwise maintain a fork of it.
> One related question, the last “official” release 1.6 of sems was in 2015 (at
> least in public github). Are people just using the development version in
> production then, also also just maintain their own private fork?
>
>
>
> Public sems was abandoned years ago.
>
> Maybe abandoned by initial developers, also not getting many new features.
> Otherwise, I noticed Juha Heinanen is more or less maintaining the public
> version of SEMS. Maybe he can comment on its current state.
>
> Cheers,
> Daniel
>
>  It receives some fixes but there's no
> support from Frafos. There are several commercial branches which have active
> development but as I said, its comercial.
>
> Sipwise has access to those branches because it's a huge contributor, pays a
> lot of money to Frafos for that. Mostly because their PBX modules for
> commercial versions of their products run on top of sems.
>
> Anyway, the open version is quite stable as it is now. It has bugs that won't
> ever be fixed but if you know them it's something you can deal with. Same as
> the ones of us still using chan_sip in asterisk, if you know where the bugs 
> are
> you can live ith it.
>
>
>
>
> --
> PekePBX, the multitenant PBX solutionhttps://pekepbx.com
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
>
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> __
> Kamailio - Users Mailing List - Non Commercial Discussions
>   * sr-users@lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to
> the sender!
> Edit mailing list options or unsubscribe:
>   * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
__
Kamailio - Users Mailing List - Non Commercial Discussions
  * sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] How to implement a self-sustained Presence server

2020-12-28 Thread E. Schmidbauer
You could try
https://www.kamailio.org/docs/modules/devel/modules/pua_dialoginfo
I did not have much luck with the module (it seemed to have intermittent
issues with BLF lighting up/down) but I also did not invest a ton of time
figuring it out.
I ultimately took a different approach, which is to *extract* the presence
out of other services (e.g. FreeSWITCH via ESL) using custom code and then
publishing the presence updates via modules such as evapi
 or nsq
 or xhttp
 combined with
pua_json  and
presence 
 modules.
This approach seemed to provide the flexibility I needed and allowed me to
expose an external API for controlling presence (e.g. fire MWI updates,
parking lot update, etc...)
I hope this helps!
Thanks,
Emmanuel



On Mon, Dec 28, 2020 at 9:20 AM Michel Pelletier <
michelpelletie...@gmail.com> wrote:

> Hi,
>
> What is the recommended practice for implementing a self-sustained
> Presence server from my current Kamailio configuration?  That is I want the
> Presence module to be fed status updates as Kamailio is routing calls and
> handling registrations.  So when a user registers, his phone is ringing, he
> is on the phone, etc.., the Presence module gets notified and can update
> its subscribers accordingly.  Must I add snippets of codes to all of these
> events and generate local Publish messages, or is there a better way?
>
> I'm using the latest version 5.4.x.
>
> Regards,
>
> Michel Pelletier
> ___
> 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] Unload UAC remote registry

2020-12-23 Thread E. Schmidbauer
You could use RPC.
I built a wrapper service for RPC which exposes REST endpoints. Take a look
here:
 https://github.com/voipxswitch/kamailio-jsonrpc-client

On Tue, Dec 22, 2020, 8:34 AM Javier Valencia  wrote:

> Hello,
>
> I'm on Kamailio 4.4.7 and I'm trying to do uac.reg_refresh over a row non
> existing on DB to try to unload, but data still persist on Kamailio.
>
> How to unload only one registry from UACs remote registrations when delete
> a record from DB without do a uac.reg_reload?
>
> UAC remote registrations is above 2k rows, I don't know if it's much or
> not.
>
> Regards, JV
>
>
> --
> [image: Logo] 
> Javier Valencia | CTO
> Centro de Negocios Martín Buendía
> Camino de las Cañadas, nº 1C, Portal 1, 2ºG
> 29649 Mijas (Málaga)
> [image: #] 951562080 (T) <951562080> | 687486759 (M) <687486759>
> [image: #] www.voiper.es
> --
>
> AVISO LEGAL
> ---
>
> Este mensaje contiene información confidencial destinada para ser leída
> exclusivamente por el destinatario. Queda prohibida la reproducción,
> publicación, divulgación, total o parcial del mensaje así como el uso no
> autorizados por el emisor. En caso de recibir el mensaje por error, se ruega
> su comunicación al remitente lo antes posible. Por favor, indique
> inmediatamente si usted o su empresa no aceptan comunicaciones de este tipo
> por Internet.
>
> Las opiniones, conclusiones y demás información incluida en este mensaje que
> no esté relacionada con asuntos profesionales de SMART RECARGAS, S.L, se
> entenderá que nunca se ha dado, ni está respaldado por el mismo.
>
> Responsable del Tratamiento de Datos
> 
> SMART RECARGAS , SL
> Camino de las Cañadas, 1C PORTAL 1 2º G
> 29651 MIJAS COSTA (MALAGA)
>
> ___
> 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] MID-Registrar Example

2020-12-18 Thread E. Schmidbauer
Opensips has mid-registrar module. It's a method of forwarding registration
data to another registrar (usually with a much higher expiration). The idea
is to handle high volumes of registrations at opensips and only forward the
registration data to another registrar when the data changes.
Kamailio doesn't have a mid-registrar module, and IMO, for good reason. The
concept of a mid-registrar doesn't make a lot of sense to me as there are
much better ways to scale registration data without forwarding REGISTER
packets to other registrars.

On Thu, Dec 17, 2020, 7:41 PM Alex Balashov 
wrote:

> It would probably help if you could state exactly what it is that you
> are trying to achieve. The term "mid-registrar" encompasses a fairly
> large category of conceivable configurations, though all of them have in
> common, I suppose, the quality of not passing through registrations
> upstream in a 1:1 fashion.
>
> On 12/17/20 9:38 PM, moisesynfante wrote:
> > Hello,
> >
> > I'm a newbie when it comes to Kamailio and I would like to know if
> there's a
> > working example of a Mid-Registrar implementation. I read on other posts
> > that the UAC module can be used to achieve this but, honestly, I don't
> > understand how. If any of you could provide some path I could follow I
> would
> > be very thankful.
> >
> >
> >
> > --
> > Sent from: http://sip-router.1086192.n5.nabble.com/Users-f3.html
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> >
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> 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] Kamailio Slack Invite

2020-09-22 Thread E. Schmidbauer
slack invite link:

https://join.slack.com/t/kamailio/shared_invite/zt-5xu6di0n-n1CZpwvUVbgDqNzAsIm01g



On Mon, Sep 21, 2020 at 6:52 AM Mack Hendricks  wrote:

> Hey E,
>
>
> Hope all is well!
>
> Can you create a new invite to the slack channel and post it here.   There
> are probably a much of people (including myself) that would like to join.
>
> On Sep 21, 2020, at 6:20 AM, E. Schmidbauer 
> wrote:
>
> invite sent
>
> On Sat, Sep 19, 2020 at 9:34 AM Peter Baines  wrote:
>
>> Hi,
>>
>> Can someone send me an invite to the Kamailio Slack channel please.
>>
>> I am sure I used to be a member but I may have used a different email
>> address.
>>
>> --
>>
>> *Web:* http://pbaines.com
>> *Email:* pe...@pbaines.com
>>
>>
>>
>> ___
>> 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] Kamailio Slack Invite

2020-09-21 Thread E. Schmidbauer
invite sent

On Sat, Sep 19, 2020 at 9:34 AM Peter Baines  wrote:

> Hi,
>
> Can someone send me an invite to the Kamailio Slack channel please.
>
> I am sure I used to be a member but I may have used a different email
> address.
>
> --
>
> *Web:* http://pbaines.com
> *Email:* pe...@pbaines.com
>
>
>
> ___
> 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] Huge DB load while using location and registrar module (save()).

2020-01-09 Thread E. Schmidbauer
 is there a particular reason you need the db updated in real-time and
"know the count of registered users and the source IP / user-agent /
username data." ?
if it's for something outside of kamailio, id recommend using a module like
evapi to push the data in real-time to an application that can consume it.
you can us routes like:

route[SAVE_LOCATION] {
if (!save("location", "0x04")) {
sl_reply_error();
exit;
}
route(REGISTER_UPDATE_EVENT)
}

event_route[usrloc:contact-expired] {
route(REGISTER_EXPIRE_EVENT);
}

route[REGISTER_UPDATE_EVENT] {
if (reg_fetch_contacts("location", "$fu", "caller")) {
$var(i) = 0;
while ($var(i) < $(ulc(caller=>count))) {

evapi_relay("{\"event\":\"register-update\",\n\"data\":{\"aor\":\"$(ulc(caller=>aor))\",\"addr\":\"$(ulc(caller=>addr)[$var(i)])\"\n}");
$var(i) = $var(i) + 1;
}
}
}

route[REGISTER_EXPIRE_EVENT] {
xlog("L_INFO", "registration [$ulc(exp=>aor)] expired");

evapi_relay("{\"event\":\"register-expire\",\n\"data\":{\"aor\":\"$ulc(exp=>aor)}\n}");
}

On Thu, Jan 9, 2020 at 3:14 AM Voip support  wrote:

> Dear Community,
>
> I am facing an issue with using the usrloc and registrar module to save
> registration informations in database.
> It works for me but when tested yesterday with around 1500-1600 users i
> got a lot of queries on database mostly SELECT. I figured out that
> changing db_mode to 0 resolves the issue because it works totally in memory
> (almost no select query on DB).
> So i think its location module.
>
> I tried db_mode=3 and db_mode=2 but both create a lot of load on database.
>
> The only function i need is to store some information of REGISTER in DB to
> know the count of registered users and the source IP / user-agent /
> username data.
> It needs to be saved in table on successfull REGISTRATION and removed when
> registration is expired or somebody UN-REGISTER.
>
> When used location module for that there was lots of queries like this
> (2-5 per second):
>
> select
> `contact`,`expires`,`q`,`callid`,`cseq`,`flags`,`cflags`,`user_agent`,`received`,`path`,`socket`,`methods`,`last_modified`,`ruid`,`instance`,`reg_id`,`server_id`,`connection_id`,`keepalive`
> from `location` where `username`='' order by q
>
> update `location` set `expires`='2020-01-08 18:51:39',`q`=-1.00
> ,`cseq`=2042,`flags`=0,`cflags`=64,`user_agent`='n/a',`received`='sip::5060',`path`=NULL,`socket`='udp::20051',`methods`=NULL,`last_modified`='2020-01-08
> 18:50:39',`callid`='1205705227@
> ',`instance`=NULL,`reg_id`=0,`server_id`=0,`connection_id`=-1,`keepalive`=1,`contact`='sip:1019@xxx:5060'
> where `ruid`='uloc-5e1642a3-2b90-0161'
>
> Looking up for ideas how to resolve this issue.
> I was thinking of implementing INSERT UPDATE and DELETE based on SQLops.
> But how to recognize that REGISTER was expiered?
>
> I would like location module to work mostly like in-memory.
> For each new registration INSERT entry to DB, each REGISTER re-new an
> UPDATE or DELETE should be triggered.
>  So i would expect for 1000 users around 2000 operations per minute.
>
> Best regards,
> Tom
>
> ___
> 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] Can I load balance Kamailio with Kamailio?

2019-09-24 Thread E. Schmidbauer
short answer- yes
*but* it also depends on what you are load balancing.
simply routing INVITEs, you should only need to add record-route headers to
keep each kamailio in the dialog path (that is- if you want to keep them in
the route path)
if you are load balancing REGISTERs, it's a little different (you usually
need to use the Path header)

On Tue, Sep 24, 2019 at 8:18 AM Ne Mo  wrote:

>
> ___
> 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] controlling presence with new module `pua_json`

2019-08-30 Thread E. Schmidbauer
hi Bill,
The json body you send has to correspond with your SIP SUBSCRIBE data
(active_watchers table)
I'd be happy help out if you want to send me some data from your
active_watchers table.
Thanks,
E

On Thu, Aug 29, 2019 at 12:50 PM Henning Westerholt  wrote:

> Hello Bill,
>
> (please keep the list in CC)
>
> yes, this seems to be the case. Just looked briefly to the code, it does
> an assignment in some cases. E.g. if no Presentity* data is given it
> will just use the From* information. And then it should later output an
> error from pua_json_update_presentity(..) if there is not the necessary
> data. Do you see any error message like this?
>
> Another idea - does it works if you add more "missing" data in the curl
> requests?
>
> Cheers,
>
> Henning
>
>
> Am 28.08.19 um 21:16 schrieb b...@novatrope.us:
> > Henning: Good point.
> >
> > I do see a number of errors in the log. It looks like the json routine
> > is looking for data that is not in the http query as specified by the
> > author.
> >
> >
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Event-Name: [update]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Event-Package: [dialog]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [Presentity]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Presentity: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [Presentity-User]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Presentity-User: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [Presentity-Realm]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Presentity-Realm: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): From:
> > [sip:1020101@]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > From-User: [1020101]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > From-Realm: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [From-URI]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > From-URI: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To:
> > [sip:1020108@:50060]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > To-User: [1020108]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [To-URI]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To-URI: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Call-ID: [1020101@]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [From-Tag]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > From-Tag: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [To-Tag]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): To-Tag: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): Json-c
> > error - failed to extract field [Direction]
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field():
> > Direction: []
> > 17(125579) DEBUG: json [json_mod.c:70]: _json_extract_field(): State:
> > [Confirmed]
> > 17(125579) DEBUG: presence [event_list.c:348]: search_event(): start
> > event= [dialog/5]
> >
> > On 8/28/19 12:00 PM, Henning Westerholt wrote:
> >> Hello Bill,
> >>
> >> just giving some generic debug pointers here:
> >>
> >> - do you see any errors in the kamailio log file?
> >>
> >> - do you see any SIP traffic (e.g. by observing with ngrep, wireshark
> >> etc..) to the phone after your curl command?
> >>
> >> Cheers,
> >>
> >> Henning
> >>
> >> Am 28.08.19 um 19:04 schrieb b...@novatrope.us:
> >>> Hi all:
> >>>
> >>> I am trying to use the procedure for setting BLF lights described in
> >>>
> https://blog.voipxswitch.com/2018/02/22/kamailio-controlling-presence-with-new-module-pua_json/#comment-587
> >>>
> >>>
> >>> WIthout success.
> >>>
> >>> My configuration is 1 Grandstream GXP2130 phone behind a NAT on a
> >>> public IP. (IPP in example below)
> >>>
> >>> Kamailio is running on public IP (IPK in example) listening on port
> >>> 50060
> >>>
> >>> The command I am sending:
> >>>
> >>> curl -d
> >>> '{"Call-ID":"1020101@
> ","Event-Category":"presence","Event-Name":"update","Event-Package":"dialog","Expires":"3600","To":"sip:1020108@
> :50060","To-User":"1020108","To-Realm":":50060","From":"sip:1020101@","From-User":"1020101","From-Realm":"","State":"Confirmed"}'
>
> >>>
> >>> http://localhost:8080/presence/
> >>> {"Call-ID":"1020101@
> ","Event-Category":"presence","Event-Name":"update","Event-Package":"dialog","Expires":"3600","To":"sip:1020108@
> 

Re: [SR-Users] How to hook to Register And Unregister event in Kamailio

2019-07-22 Thread E. Schmidbauer
here is a good example of how you can use evapi in kamailio:
http://kb.asipto.com/kamailio:k43-async-sip-routing-nodejs#evapi_processing

here is a good example of how you can implement it with a go app:
https://github.com/cgrates/kamevapi




On Mon, Jul 22, 2019 at 7:18 AM Anuran Barman 
wrote:

> It seems like this module is useful for making the connection/message
> flow. But that I need when I have the events of Register and unregister.
> How to get the events from this module?
>
> On Mon, Jul 22, 2019 at 3:51 PM Anuran Barman 
> wrote:
>
>> Though I have already a NodeJS server running, I will try the evapi
>> module. If there are some tutorial/Wiki on how to do this please share that
>> with me. That will be great help.
>>
>> On Mon, Jul 22, 2019 at 3:39 PM E. Schmidbauer 
>> wrote:
>>
>>> I would recommend using `evapi` for something like this
>>> You could build a small go app that connects via evapi and send/receive
>>> events to/from kamailio.
>>>
>>>
>>> On Mon, Jul 22, 2019 at 3:07 AM Anuran Barman 
>>> wrote:
>>>
>>>> Hi,
>>>> I  am integrating Kamailio into my application. I want to hook to the
>>>> successful REGISTER and unregister event into Kamailio into my application.
>>>> For now, I am able to hook into INVITE event and can hit my server to send
>>>> a email to the callee user that user X is calling you. The way I am doing
>>>> is by this
>>>> if (is_method("INVITE")) {
>>>> xlog("LOG_LOCAL3","L_INFO","invite came ($fU) ($tU)");
>>>> $var(res) = http_connect("sipnodejsserver",
>>>> "/","text/plain","src_user:$fU,dst_user:$tU" ,"$avp(route)");
>>>> xlog("LOG_LOCAL3","L_INFO","request sent $avp(route)
>>>>  $var(res)");
>>>> setflag(FLT_ACC); # do accounting
>>>> }
>>>>
>>>> I need to show into my application that their SIP phone is online or
>>>> not. How can I hook into this?
>>>> ___
>>>> 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] How to hook to Register And Unregister event in Kamailio

2019-07-22 Thread E. Schmidbauer
I would recommend using `evapi` for something like this
You could build a small go app that connects via evapi and send/receive
events to/from kamailio.


On Mon, Jul 22, 2019 at 3:07 AM Anuran Barman 
wrote:

> Hi,
> I  am integrating Kamailio into my application. I want to hook to the
> successful REGISTER and unregister event into Kamailio into my application.
> For now, I am able to hook into INVITE event and can hit my server to send
> a email to the callee user that user X is calling you. The way I am doing
> is by this
> if (is_method("INVITE")) {
> xlog("LOG_LOCAL3","L_INFO","invite came ($fU) ($tU)");
> $var(res) = http_connect("sipnodejsserver",
> "/","text/plain","src_user:$fU,dst_user:$tU" ,"$avp(route)");
> xlog("LOG_LOCAL3","L_INFO","request sent $avp(route)
>  $var(res)");
> setflag(FLT_ACC); # do accounting
> }
>
> I need to show into my application that their SIP phone is online or not.
> How can I hook into this?
> ___
> 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] dialog module with dmq

2018-07-20 Thread E. Schmidbauer
Is anyone using dialog module with DMQ to share dialogs across multiple
kamailio instances?
i've been testing it and it seems unreliable. sometimes the dialog data is
sent from nodeA to nodeB, sometimes it is not.
im wondering if im missing some settings or it's a bug. I tested latest
master branch and version 5.1.4
Thanks!
Emmanuel
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] hot switch debug mode

2018-06-06 Thread E. Schmidbauer
this seems to work for me:

*# info level*

kamcmd cfg.seti core debug 2


# logging off

kamcmd cfg.seti core debug 0


On Mon, Jun 4, 2018 at 4:49 PM, Sergey Safarov  wrote:

> Thank you Henning
> That's i looking for!
>
> Sergey
>
> пн, 4 июн. 2018 г. в 22:04, Henning Westerholt :
>
>> Am Montag, 4. Juni 2018, 15:26:39 CEST schrieb Sergey Safarov:
>>
>> > I experienced issue with kamailio after some time of uptime.
>>
>> > Could you suggest way to enable debug output (equivalent of -ddd options
>>
>> > for kamailio executable) for running daemon?
>>
>> >
>>
>> > May be using kamcmd?
>>
>>
>>
>> Hello Sergey,
>>
>>
>>
>> try this (should be the same values as in cfg):
>>
>>
>>
>> kamcmd> corex.debug 3
>>
>> {
>>
>> old: -1
>>
>> new: 3
>>
>> }
>>
>> kamcmd>
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Henning
>>
>
> ___
> 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] Database connection handles vs. processes

2017-07-10 Thread E. Schmidbauer
some modules can have child processes that each maintain a database
connection. the number of child processes for a module can sometimes be set
using a modparam() for that module

On Mon, Jul 10, 2017 at 4:23 PM, Alex Balashov 
wrote:

> Hi,
>
> By way of illustration, I have one server with children=8, a single UDP
> listener, and 23 processes total:
>
> --
> 21117   attendant
> 21118   udp receiver child=0 sock=xxx.xxx.xxx.xxx:5060
> 21119   udp receiver child=1 sock=xxx.xxx.xxx.xxx:5060
> 21120   udp receiver child=2 sock=xxx.xxx.xxx.xxx:5060
> 21121   udp receiver child=3 sock=xxx.xxx.xxx.xxx:5060
> 21122   udp receiver child=4 sock=xxx.xxx.xxx.xxx:5060
> 21123   udp receiver child=5 sock=xxx.xxx.xxx.xxx:5060
> 21124   udp receiver child=6 sock=xxx.xxx.xxx.xxx:5060
> 21125   udp receiver child=7 sock=xxx.xxx.xxx.xxx:5060
> 21126   slow timer
> 21127   timer
> 21128   MI FIFO
> 21129   ctl handler
> 21130   RTIMER USEC EXEC
> 21131   RTIMER USEC EXEC
> 21132   RTIMER USEC EXEC
> 21133   RTIMER USEC EXEC
> 21134   RTIMER USEC EXEC
> 21135   RTIMER USEC EXEC
> 21136   RTIMER USEC EXEC
> 21137   Dialog KA Timer
> 21138   Dialog Clean Timer
> 21139   tcp main process
>
> # kamcmd -s /tmp/kamailio_ctl ps | wc -l
> 23
> --
>
> This appears to result in 23 total database connections to the Postgres
> server:
>
> --
> # lsof -n | grep -i '^kam' | grep IPv4 | grep TCP | grep -i :postgres | wc
> -l
> 23
> --
>
> But I have another Kamailio server that has three listeners, two UDP and
> one TCP, and children=24, i.e.
>
> --
> children=24
> listen=udp:xxx.xxx.xxx.xxx:5060
> listen=udp:yyy.yyy.yyy.yyy:5060
> listen=tcp:zzz.zzz.zzz.zzz:5060
> --
>
> I am given to understand that the total number of worker processes there
> will be (children_setting * listeners), i.e. 72 in this case, plus some
> number of rtimer and supervisory processes, as in my case. And true
> enough:
>
> --
> # kamcmd -s /tmp/kamailio_ctl ps | wc -l
> 86
> # kamcmd -s /tmp/kamailio_ctl ps | sed 's/65.254.44.195/yyy.yyy.yyy.yyy/g'
> | sed 's/65.254.44.194/zzz.zzz.zzz.zzz/g'
> 22065   main process - attendant
> 22069   udp receiver child=0 sock=zzz.zzz.zzz.zzz:5060
> 22070   udp receiver child=1 sock=zzz.zzz.zzz.zzz:5060
> 22071   udp receiver child=2 sock=zzz.zzz.zzz.zzz:5060
> 22073   udp receiver child=3 sock=zzz.zzz.zzz.zzz:5060
> 22074   udp receiver child=4 sock=zzz.zzz.zzz.zzz:5060
> 22076   udp receiver child=5 sock=zzz.zzz.zzz.zzz:5060
> 22079   udp receiver child=6 sock=zzz.zzz.zzz.zzz:5060
> 22080   udp receiver child=7 sock=zzz.zzz.zzz.zzz:5060
> 22082   udp receiver child=8 sock=zzz.zzz.zzz.zzz:5060
> 22085   udp receiver child=9 sock=zzz.zzz.zzz.zzz:5060
> 22086   udp receiver child=10 sock=zzz.zzz.zzz.zzz:5060
> 22089   udp receiver child=11 sock=zzz.zzz.zzz.zzz:5060
> 22091   udp receiver child=12 sock=zzz.zzz.zzz.zzz:5060
> 22093   udp receiver child=13 sock=zzz.zzz.zzz.zzz:5060
> 22095   udp receiver child=14 sock=zzz.zzz.zzz.zzz:5060
> 22097   udp receiver child=15 sock=zzz.zzz.zzz.zzz:5060
> 22099   udp receiver child=16 sock=zzz.zzz.zzz.zzz:5060
> 22100   udp receiver child=17 sock=zzz.zzz.zzz.zzz:5060
> 22103   udp receiver child=18 sock=zzz.zzz.zzz.zzz:5060
> 22105   udp receiver child=19 sock=zzz.zzz.zzz.zzz:5060
> 22107   udp receiver child=20 sock=zzz.zzz.zzz.zzz:5060
> 22109   udp receiver child=21 sock=zzz.zzz.zzz.zzz:5060
> 22111   udp receiver child=22 sock=zzz.zzz.zzz.zzz:5060
> 22113   udp receiver child=23 sock=zzz.zzz.zzz.zzz:5060
> 22115   udp receiver child=0 sock=yyy.yyy.yyy.yyy:5060
> 22117   udp receiver child=1 sock=yyy.yyy.yyy.yyy:5060
> 22119   udp receiver child=2 sock=yyy.yyy.yyy.yyy:5060
> 22121   udp receiver child=3 sock=yyy.yyy.yyy.yyy:5060
> 22123   udp receiver child=4 sock=yyy.yyy.yyy.yyy:5060
> 22125   udp receiver child=5 sock=yyy.yyy.yyy.yyy:5060
> 22127   udp receiver child=6 sock=yyy.yyy.yyy.yyy:5060
> 22129   udp receiver child=7 sock=yyy.yyy.yyy.yyy:5060
> 22131   udp receiver child=8 sock=yyy.yyy.yyy.yyy:5060
> 22132   udp receiver child=9 sock=yyy.yyy.yyy.yyy:5060
> 22135   udp receiver child=10 sock=yyy.yyy.yyy.yyy:5060
> 22137   udp receiver child=11 sock=yyy.yyy.yyy.yyy:5060
> 22139   udp receiver child=12 sock=yyy.yyy.yyy.yyy:5060
> 22141   udp receiver child=13 sock=yyy.yyy.yyy.yyy:5060
> 22143   udp receiver child=14 sock=yyy.yyy.yyy.yyy:5060
> 22145   udp receiver child=15 sock=yyy.yyy.yyy.yyy:5060
> 22147   udp receiver child=16 sock=yyy.yyy.yyy.yyy:5060
> 22149   udp receiver child=17 sock=yyy.yyy.yyy.yyy:5060
> 22151   udp receiver child=18 sock=yyy.yyy.yyy.yyy:5060
> 22153   udp receiver child=19 sock=yyy.yyy.yyy.yyy:5060
> 22155   udp receiver child=20 sock=yyy.yyy.yyy.yyy:5060
> 22156   udp receiver child=21 sock=yyy.yyy.yyy.yyy:5060
> 22159   udp receiver child=22 sock=yyy.yyy.yyy.yyy:5060
> 22161   udp receiver child=23 sock=yyy.yyy.yyy.yyy:5060
> 22163   slow timer
> 22165   timer
> 22167   secondary timer
> 22168   ctl handler
> 22169   RTIMER