Re: [SR-Users] Limit cps per destination gw

2022-08-01 Thread Ihor Olkhovskyi

Jon,

You can check one of my old blog posts related to this

https://blog.provoip.org/2017/02/kamailio-limit-cpscpmconcurrent-calls.html

It's based on htable and quite easy to implement

Le 28/07/2022 à 20:19, Jon Bonilla (Manwe) a écrit :

El Thu, 28 Jul 2022 18:08:33 +
Henning Westerholt  escribió:


Hi,

pipelimit allows dynamic queues from a DB. But if you want to limit
concurrent calls, the best option is probably using dialog profiles with the
dialog modules. For a cps limit you could also just use htable.

Cheers,


Hi Henning

No, concurrent calls is not the issue. CAPS is.

pipelimit seems promising. Don't like the db backend requirement. I guess I can
use dbtext, leave it blank and create pipes on demand with pl_check and read
the limit from a custom header. This system doesn't have db backend as it's a
loadbalancer for multiple kamailio servers and needs to be fast as hell.


thank you

Jon



__
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


[SR-Users] Contact header modification - Kamailio

2022-08-01 Thread Ankit Jayswal
Hello Team,

I am in need to modify the contact header in Kamailio before sending an
INVITE request to the SIP trunk provider. Basically the IP address I need
to modify in the contact header. Please suggest a better way to do this.
Below is an example.

*OLD (Existing):*
Contact: 

*NEW (Needed):*
Contact: http://10.52.26.98:5060>*>

I tried various functions from the textops module but no hope.
I am looking for a function that can replace the contact header's value.
Please help me with this.

-- 
Thanks & Regards,
*Ankit Jayswal* | Specialist - Software Development
__
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] Contact header modification - Kamailio

2022-08-01 Thread Henning Westerholt
Hello,

the topos module can do that, among other things. Alternatively there is also 
the topoh module, which do not need any backend storage.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: sr-users  On Behalf Of Ankit Jayswal
Sent: Monday, August 1, 2022 2:37 PM
To: sr-users@lists.kamailio.org
Cc: Amey Naik ; Devanand Jalla 

Subject: [SR-Users] Contact header modification - Kamailio

Hello Team,

I am in need to modify the contact header in Kamailio before sending an INVITE 
request to the SIP trunk provider. Basically the IP address I need to modify in 
the contact header. Please suggest a better way to do this. Below is an example.
OLD (Existing):
Contact: 

NEW (Needed):
Contact: http://10.52.26.98:5060>>

I tried various functions from the textops module but no hope.
I am looking for a function that can replace the contact header's value. Please 
help me with this.

--
Thanks & Regards,
Ankit Jayswal | Specialist - Software Development
__
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] Newbie - Installation Issue - ERROR: could not load the script in /usr/lib/kamailio//kamctl/kamdbctl.mysql for database engine MYSQL

2022-08-01 Thread Henning Westerholt
Hello,

indeed the package seems not to contain anything related to db_mysql or other 
SQL databases. Maybe somebody that knows more details can comment, it could be 
just not included there.

https://pkgs.alpinelinux.org/contents?repo=main&page=1&arch=x86_64&branch=edge&name=kamailio

Maybe you can just try the official Debian or Ubuntu packages from 
deb.kamailio.org, they should work.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com

From: sr-users  On Behalf Of 
p.t.cross...@gmail.com
Sent: Thursday, July 28, 2022 1:31 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] Newbie - Installation Issue - ERROR: could not load the 
script in /usr/lib/kamailio//kamctl/kamdbctl.mysql for database engine MYSQL

I suspect this must have been addressed before but I couldn't find a way of 
searching Archives.

I'm using Alpine Linux.
Used "apk add kamailio"   to install  Kamailio 5.5.4-r1

Following the Instructions on 
https://kamailio.org/docs/tutorials/5.5.x/kamailio-install-guide-git/

At the section for "Creating MySQL database"  I modify the file and then run

kamdbctl create

ERROR: could not load the script in /usr/lib/kamailio//kamctl/kamdbctl.mysql 
for database engine MYSQL
ERROR: database engine not loaded - tried 'MYSQL'

I checked the /usr/lib/kamailio//kamctl/ directory and the file wasn't there

I suspect I'm missing a module but there aren't any other packages  listed for 
Kamailio   at pkgs.alpinelinux.org

Thanks for your help
P Crossley

__
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] Sharing Database between three kamailios

2022-08-01 Thread Henning Westerholt
Hello,

you can share a database between different Kamailio server. Especially if they 
access only read-only, this is pretty much a standard scenario.

Regarding keeping a table for the active calls, the dialog module allows you to 
easily track current calls. It can also save the information in a database.

Otherwise you can of course also do your own solution, e.g. with the sqlops 
module.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: sr-users  On Behalf Of Waqar 40
Sent: Friday, July 29, 2022 7:30 AM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Sharing Database between three kamailios

I have three Kamailios in three different servers which are dispatching calls 
to 9 asterisks in three different servers using load balancing. All these 
Kamailios are using databases installed on that servers. As the entries of the 
dispatcher table are the same for all the Kamailio, so I want that these 
Kamailio use a single database installed on one of the servers. All these 
Kamailios instances should use the same database which is common between them. 
And also I want these Kamailios to write into the database by creating a table 
that stores all the active calls in three Kamailios. Is it possible? How can I 
do it? Please guide me with somewhat explanation as I am not this much expert 
in Kamailio.

Waiting for a quick response.
Regards
VoIP Engineer Vicky

__
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] Contact header modification - Kamailio

2022-08-01 Thread Ankit Jayswal
Hello,
Thanks for your reply, but I am looking to replace the value in the Contact
header. Which function can help me to do this ?
I tried,
*assign_hf_value("Contact", "http://sip:00912269240xxx@10.52.26.98:5060>>");*

But that is not working properly, it assigns value but previous value also
remains in it.

On Mon, Aug 1, 2022 at 6:11 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> the topos module can do that, among other things. Alternatively there is
> also the topoh module, which do not need any backend storage.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Ankit
> Jayswal
> *Sent:* Monday, August 1, 2022 2:37 PM
> *To:* sr-users@lists.kamailio.org
> *Cc:* Amey Naik ; Devanand Jalla <
> devanand.ja...@engagely.ai>
> *Subject:* [SR-Users] Contact header modification - Kamailio
>
>
>
> Hello Team,
>
> I am in need to modify the contact header in Kamailio before sending an
> INVITE request to the SIP trunk provider. Basically the IP address I need
> to modify in the contact header. Please suggest a better way to do this.
> Below is an example.
>
> *OLD (Existing):*
>
> Contact: 
>
>
>
> *NEW (Needed):*
>
> Contact: http://10.52.26.98:5060>*>
>
> I tried various functions from the textops module but no hope.
> I am looking for a function that can replace the contact header's value.
> Please help me with this.
>
>
>
> --
>
> Thanks & Regards,
> *Ankit Jayswal* | Specialist - Software Development
>
__
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] Contact header modification - Kamailio

2022-08-01 Thread Henning Westerholt
Hello,

you need to do a “remove_hf(“Contact”)” before.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: Ankit Jayswal 
Sent: Monday, August 1, 2022 4:26 PM
To: Henning Westerholt 
Cc: Kamailio (SER) - Users Mailing List ; Amey 
Naik ; Devanand Jalla 
Subject: Re: [SR-Users] Contact header modification - Kamailio

Hello,
Thanks for your reply, but I am looking to replace the value in the Contact 
header. Which function can help me to do this ?
I tried,
assign_hf_value("Contact", 
"http://sip:00912269240xxx@10.52.26.98:5060>>");

But that is not working properly, it assigns value but previous value also 
remains in it.

On Mon, Aug 1, 2022 at 6:11 PM Henning Westerholt 
mailto:h...@gilawa.com>> wrote:
Hello,

the topos module can do that, among other things. Alternatively there is also 
the topoh module, which do not need any backend storage.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Ankit Jayswal
Sent: Monday, August 1, 2022 2:37 PM
To: sr-users@lists.kamailio.org
Cc: Amey Naik mailto:amey.n...@engagely.ai>>; Devanand 
Jalla mailto:devanand.ja...@engagely.ai>>
Subject: [SR-Users] Contact header modification - Kamailio

Hello Team,

I am in need to modify the contact header in Kamailio before sending an INVITE 
request to the SIP trunk provider. Basically the IP address I need to modify in 
the contact header. Please suggest a better way to do this. Below is an example.
OLD (Existing):
Contact: 

NEW (Needed):
Contact: http://10.52.26.98:5060>>

I tried various functions from the textops module but no hope.
I am looking for a function that can replace the contact header's value. Please 
help me with this.

--
Thanks & Regards,
Ankit Jayswal | Specialist - Software Development
__
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] Contact header modification - Kamailio

2022-08-01 Thread Alex Balashov
Before you do this, I would ask yourself why you’re doing this, and whether 
it’s a good idea from a technical point of view.

> On Aug 1, 2022, at 8:36 AM, Ankit Jayswal  wrote:
> 
> Hello Team,
> 
> I am in need to modify the contact header in Kamailio before sending an 
> INVITE request to the SIP trunk provider. Basically the IP address I need to 
> modify in the contact header. Please suggest a better way to do this. Below 
> is an example.
> 
> OLD (Existing):
> Contact: 
> 
> NEW (Needed):
> Contact: 
> 
> I tried various functions from the textops module but no hope.
> I am looking for a function that can replace the contact header's value. 
> Please help me with this.
> 
> -- 
> Thanks & Regards,
> Ankit Jayswal | Specialist - Software Development
> __
> 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

-- 
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


Re: [SR-Users] Contact header modification - Kamailio

2022-08-01 Thread Ankit Jayswal
Hello,
Yes, actually my call flow for outbound calls is, Kamailio => Asterisk =>
Kamailio (route(PSTN)). SIP trunk is available at Kamailio server.
So, when final outbound INVITE goes to the SIP trunk provider it expects a
particular Contact header IP, instead of Asterisk server IP.

On Mon, Aug 1, 2022 at 10:20 PM Alex Balashov 
wrote:

> Before you do this, I would ask yourself why you’re doing this, and
> whether it’s a good idea from a technical point of view.
>
> > On Aug 1, 2022, at 8:36 AM, Ankit Jayswal 
> wrote:
> >
> > Hello Team,
> >
> > I am in need to modify the contact header in Kamailio before sending an
> INVITE request to the SIP trunk provider. Basically the IP address I need
> to modify in the contact header. Please suggest a better way to do this.
> Below is an example.
> >
> > OLD (Existing):
> > Contact: 
> >
> > NEW (Needed):
> > Contact: 
> >
> > I tried various functions from the textops module but no hope.
> > I am looking for a function that can replace the contact header's value.
> Please help me with this.
> >
> > --
> > Thanks & Regards,
> > Ankit Jayswal | Specialist - Software Development
> > __
> > 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
>
> --
> 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] Contact header modification - Kamailio

2022-08-01 Thread Ankit Jayswal
Hello,
Whenever I try the *remove_hf("Contact")* function the call leg is divided
into the two parts and the call is not getting set up properly and not
progressing.
I am just looking for a function that can modify the Contact header value
of an existing Contact header.

On Mon, Aug 1, 2022 at 8:31 PM Henning Westerholt  wrote:

> Hello,
>
>
>
> you need to do a “remove_hf(“Contact”)” before.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* Ankit Jayswal 
> *Sent:* Monday, August 1, 2022 4:26 PM
> *To:* Henning Westerholt 
> *Cc:* Kamailio (SER) - Users Mailing List ;
> Amey Naik ; Devanand Jalla <
> devanand.ja...@engagely.ai>
> *Subject:* Re: [SR-Users] Contact header modification - Kamailio
>
>
>
> Hello,
> Thanks for your reply, but I am looking to replace the value in the
> Contact header. Which function can help me to do this ?
> I tried,
> *assign_hf_value("Contact", " >");*
>
>
> But that is not working properly, it assigns value but previous value also
> remains in it.
>
>
>
> On Mon, Aug 1, 2022 at 6:11 PM Henning Westerholt  wrote:
>
> Hello,
>
>
>
> the topos module can do that, among other things. Alternatively there is
> also the topoh module, which do not need any backend storage.
>
>
>
> Cheers,
>
>
>
> Henning
>
>
>
> --
>
> Henning Westerholt – https://skalatan.de/blog/
>
> Kamailio services – https://gilawa.com
>
>
>
> *From:* sr-users  *On Behalf Of *Ankit
> Jayswal
> *Sent:* Monday, August 1, 2022 2:37 PM
> *To:* sr-users@lists.kamailio.org
> *Cc:* Amey Naik ; Devanand Jalla <
> devanand.ja...@engagely.ai>
> *Subject:* [SR-Users] Contact header modification - Kamailio
>
>
>
> Hello Team,
>
> I am in need to modify the contact header in Kamailio before sending an
> INVITE request to the SIP trunk provider. Basically the IP address I need
> to modify in the contact header. Please suggest a better way to do this.
> Below is an example.
>
> *OLD (Existing):*
>
> Contact: 
>
>
>
> *NEW (Needed):*
>
> Contact: http://10.52.26.98:5060>*>
>
> I tried various functions from the textops module but no hope.
> I am looking for a function that can replace the contact header's value.
> Please help me with this.
>
>
>
> --
>
> Thanks & Regards,
> *Ankit Jayswal* | Specialist - Software Development
>
>
__
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] Limit cps per destination gw

2022-08-01 Thread Jon Bonilla (Manwe)
El Mon, 1 Aug 2022 10:38:52 +0200
Ihor Olkhovskyi  escribió:

> Jon,
> 
> You can check one of my old blog posts related to this
> 
> https://blog.provoip.org/2017/02/kamailio-limit-cpscpmconcurrent-calls.html
> 
> It's based on htable and quite easy to implement
> 
> 

Hi

Ihor

Yes, sounds interesting to use htable for this. Thank you.




pgpRa5xf3YvyS.pgp
Description: Firma digital OpenPGP
__
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] Limit cps per destination gw

2022-08-01 Thread Jon Bonilla (Manwe)
El Thu, 28 Jul 2022 22:30:40 +0300
Ovidiu Sas  escribió:

> I had a similar setup, with an empty dbtext table. Works like a charm!
> 
> -ovidiu
> 
> 


Hi Ovidiu

I have a couple of performance questions.

First, seems like the module doesn't use it's own timer processes. You can set
it to the secondary timer but I don't think it would be a good idea. 

Did you test high load on short intervals? I'm expecting about 1000cps and
about 100 pipes and I'm wondering what interval I could use not to flood the
timer.

The other solution suggested is htable. I wonder which one could be chapest for
load.


thanks,

Jon



-- 
PekePBX, the multitenant PBX solution
https://pekepbx.com


pgpbVw_3SBwwO.pgp
Description: Firma digital OpenPGP
__
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