[SR-Users] Re: Kamailio, Asterisk and Parked calls

2024-04-25 Thread Jawaid Bazyar via sr-users
In addition to the other comments, you will have the same issue with
conference rooms, if you support that.


On Thu, Apr 25, 2024 at 4:45 PM Social Boh via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hello list,
>
> I'm using Kamailio to balance SIP request between two Asterisk. I have a
> problem with Parking calls using Asterisk Application. When a user
> parking a call, some times can't pick up parked call because the call to
> pick up the Call go to the other Asterisk.
>
> I'm using the 1 algorithm "hash over from URI" without success.
>
> Any hint?
>
> --
> ---
> I'm SoCIaL, MayBe
>
> __
> 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: Real life examples of cost saving from using Kamailio and other FOSS SIP software

2024-04-14 Thread Jawaid Bazyar via sr-users
Mahmood, are you paying for that resource in something like AWS? That would
be big $$$!



On Sun, Apr 14, 2024 at 11:38 AM Mahmood Alkhalil via sr-users <
sr-users@lists.kamailio.org> wrote:

> The cost saving that will be the main reason before licenses is the amount
> of hardware resources currently used, the system we are using in total is
> using around 128 GB of RAM, 64 cores of CPU, and total of 4TB of storage;
> That is for just basic telephony for around 400 phones with call recording
> for some with a mostly non working HA and not to mention the DSP devices
> for PRI lines and media resources for phones which is using almost an
> entire rack.
>
> If such can be reduced for two kamailio nodes and a couple freeswitch
> nodes for any IVR / conferencing / voicemail that would at least lower the
> resources to the half of what being used if not more, keeping in mind that
> Calls per second count and concurrent calls count is really low.
>
> To put this into perspective, to integrate the telephony system with MS
> Teams it will cost 70,000$ USD just for installation and basic
> configuration just to ring a deskphone when someone calls you on Teams..
> --
> *From:* Fred Posner 
> *Sent:* Sunday, April 14, 2024 6:54:49 PM
> *To:* Kamailio (SER) - Users Mailing List 
> *Cc:* Mahmood Alkhalil 
> *Subject:* Re: [SR-Users] Real life examples of cost saving from using
> Kamailio and other FOSS SIP software
>
> I think it’s misguided to approach FOSS as a cost savings move. Of course
> this is an obvious benefit with the main easily detected benefit being the
> lack of any cost for the software itself and no licensing / recurring
> license fees.
>
>
>
> -- Fred Posner
> Sent from mobile
> Phone: +1 (352) 664-3733
> qxork.com
>
>
>
> > On Apr 14, 2024, at 8:22 AM, Mahmood Alkhalil via sr-users <
> sr-users@lists.kamailio.org> wrote:
> >
> > 
> > Hi Everyone,
> >
> > I would like to hear some stories about moving away from proprietary
> telephony services whether on premises or on cloud to FOSS solutions and
> how much stable, secure, efficient and cost effective it was.
> >
> > I would like to present to my managers such cases to convince them to
> move away from proprietary telephony as it is just huge amount of cost and
> technical debt.
> >
> > Thanks everyone and really appreciate any insights, also I am sorry if
> this is not the place to ask for such!
> > __
> > 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:
>
__
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: Real life examples of cost saving from using Kamailio and other FOSS SIP software

2024-04-14 Thread Jawaid Bazyar via sr-users
Hi Mahmood,

I think FOSS often trades licensing/purchase costs for operational costs.

Sure, the software is "free" but because such software is rarely an exact
fit for your use case off the shelf, you have to spend time (money) to:
customize for your operation
integrate into other operational systems - billing, provisioning, support,
etc.
maintaining that expertise over time - either in-house or contracted out,
will cost you $

Fred and Alex have pointed out some additional things on this.

But I think arguments can still be made for FOSS in these areas:
You can control the software, customize it, and are not reliant on a 3rd
party software vendor to keep the software current.
With traditional softswitch vendors like MetaSwitch, Broadsoft, Squire all
putting these products on the back-burner and not
investing in any more development of them, that could be a big
organizational benefit.

The FOSS options are also, at this point in time, more likely to get future
feature development. E.g. Asterisk, FreeSwitch,
Kamailio all support WebRTC and rich media - and the legacy alternatives do
not.

They all help you build highly fault tolerant systems with any number of
architectures to suit your needs.

They can all be made to scale from thousands, to millions of subscribers,
and the legacy alternatives do not.

I would say, IF there is an off-the-shelf, commercially supported system
that suits your needs now and into the future,
and has a cost model that meets your business needs, and supports your
scale, you are almost always better off going with that.

But if the cost model is detached from your needs (nickel and dimed to
death on 'feature licenses'), or, they don't
support features you need, or, you don't think they are going to be further
developed or supported into the future,
or they won't scale the way you need, then, open source gives you the
ability to build your own without having to
reinvent all the wheels.


On Sun, Apr 14, 2024 at 8:52 AM Mahmood Alkhalil via sr-users <
sr-users@lists.kamailio.org> wrote:

> Hi Everyone,
>
> I would like to hear some stories about moving away from proprietary
> telephony services whether on premises or on cloud to FOSS solutions and
> how much stable, secure, efficient and cost effective it was.
>
> I would like to present to my managers such cases to convince them to
> move away from proprietary telephony as it is just huge amount of cost and
> technical debt.
>
> Thanks everyone and really appreciate any insights, also I am sorry if
> this is not the place to ask for such!
> __
> 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: auth_check : sip user / authentication user mismatch

2023-11-17 Thread Jawaid Bazyar via sr-users
Hi Henning,

 

I’m a numbskull – I was editing the wrong config file. 

 

Thanks for your help!

 

Jawaid

 

 

From: Henning Westerholt 
Date: Friday, November 17, 2023 at 3:01 AM
To: SRList SRList via sr-users 
Cc: Jawaid Bazyar 
Subject: RE: auth_check : sip user / authentication user mismatch

 

Hello,

 

according to the module docs it should be:

 

if (!auth_check("$fd", "subscriber", “0”)) { // default 1, 
change to 0 to skip check

 

You missed some quotes in your example below. Please give it a try.

 

Cheers,

 

Henning

 

From: Jawaid Bazyar via sr-users  
Sent: Donnerstag, 16. November 2023 22:37
To: SRList SRList via sr-users 
Cc: Jawaid Bazyar 
Subject: [SR-Users] auth_check : sip user / authentication user mismatch

 

Hi, I am trying to register an endpoint as follows:

 

REGISTER sip:siptest.booger.net SIP/2.0

Via: SIP/2.0/UDP X.X.X.X.76:31114;branch=z9hG4bK223420485;rport

From: sip:1720...@siptest.booger.net;tag=962873337

To: sip:1720...@siptest.booger.net

Call-ID: 2053687751-3276...@eh.bji.bae.hg

CSeq: 2067 REGISTER

Contact: 
sip:1720XXX@X.X.X.X:31114;reg-id=2;+sip.instance=""

Authorization: Digest username="654fe87c-67ff-42dd-8d5e-79786a99713c", 
realm="siptest.booger.net", nonce="ZVaJtmVWiIrsuWc5hkzM3MUUUs8MgRFR", 
uri=sip:siptest.booger.net, response="119a3b6426cdcfa037bf1825b69139a5", 
algorithm=MD5

X-Grandstream-PBX: true

Max-Forwards: 70

User-Agent: Grandstream GXP2170 1.0.11.64

Supported: path

Expires: 120

MAC: 00:0b:82:a1:c5:8b

Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE

Content-Length: 0

 

Note that the Authorization username differs from the To-From username. This is 
intentional, as I am testing use of randomly generated credential .

This worked with this endpoint directly against Asterisk, for instance.


However, registering against Kamailio now, I am getting:

 

Nov 16 21:24:26 vs-rs01 /usr/sbin/kamailio[584855]: DEBUG: {1 2067 REGISTER 
2053687751-3276...@eh.bji.bae.hg} auth_db [authorize.c:503]: auth_check(): 
authentication username mismatch with from/to username

 

Even though I have this set in the config:

 

if (!auth_check("$fd", "subscriber", 0)) { // default 1, change 
to 0 to skip check

 

0 is supposed to mean no user checks performed.

 

I am doing this because I want to use the complex credentials for 
authentication, but want the endpoint to tell me the phone number in an INVITE 
to/from, instead of putting in the extremely long credential.

 

Is there a way to get Kamailio to accept different SIP User ID and 
Authentication ID fields?

 

Thanks,

 

Jawaid

 

 

 

__
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] auth_check : sip user / authentication user mismatch

2023-11-16 Thread Jawaid Bazyar via sr-users
Hi, I am trying to register an endpoint as follows:

 

REGISTER sip:siptest.booger.net SIP/2.0

Via: SIP/2.0/UDP X.X.X.X.76:31114;branch=z9hG4bK223420485;rport

From: sip:1720...@siptest.booger.net;tag=962873337

To: sip:1720...@siptest.booger.net

Call-ID: 2053687751-3276...@eh.bji.bae.hg

CSeq: 2067 REGISTER

Contact: 
sip:1720XXX@X.X.X.X:31114;reg-id=2;+sip.instance=""

Authorization: Digest username="654fe87c-67ff-42dd-8d5e-79786a99713c", 
realm="siptest.booger.net", nonce="ZVaJtmVWiIrsuWc5hkzM3MUUUs8MgRFR", 
uri=sip:siptest.booger.net, response="119a3b6426cdcfa037bf1825b69139a5", 
algorithm=MD5

X-Grandstream-PBX: true

Max-Forwards: 70

User-Agent: Grandstream GXP2170 1.0.11.64

Supported: path

Expires: 120

MAC: 00:0b:82:a1:c5:8b

Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, 
UPDATE, MESSAGE

Content-Length: 0

 

Note that the Authorization username differs from the To-From username. This is 
intentional, as I am testing use of randomly generated credential .

This worked with this endpoint directly against Asterisk, for instance.


However, registering against Kamailio now, I am getting:

 

Nov 16 21:24:26 vs-rs01 /usr/sbin/kamailio[584855]: DEBUG: {1 2067 REGISTER 
2053687751-3276...@eh.bji.bae.hg} auth_db [authorize.c:503]: auth_check(): 
authentication username mismatch with from/to username

 

Even though I have this set in the config:

 

    if (!auth_check("$fd", "subscriber", 0)) { // default 1, change 
to 0 to skip check

 

0 is supposed to mean no user checks performed.

 

I am doing this because I want to use the complex credentials for 
authentication, but want the endpoint to tell me the phone number in an INVITE 
to/from, instead of putting in the extremely long credential.

 

Is there a way to get Kamailio to accept different SIP User ID and 
Authentication ID fields?

 

Thanks,

 

Jawaid

 

 

 

__
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: Registrar / Path

2023-10-31 Thread Jawaid Bazyar via sr-users
Hi,

So with use_path 1 (I already had this set) and path_mode 0, the Contact header 
is not set on a sl_send_reply(302).

Neither, with use_path 1 and path_mode 1.

Path mode 2 does not seem appropriate.

What other path related parameters did you have in mind?




On 10/27/23, 11:37 AM, "Alex Balashov via sr-users" 
mailto:sr-users@lists.kamailio.org>> wrote:


In thinking through it a bit more, I think I understand better now. You want to 
interrogate -- that is, to query -- the location service via redirect rather 
than by sending a request directly to it, and you want the returned coordinates 
for the AOR being interrogated to incorporate the path hop so that the querying 
entity can send requests to it through that adjacency (RS) rather than directly 
to it. 


It might have been easier if you explicitly stated that. :-) 


Contact addresses in 3xx replies generated by Kamailio come from the 
destination set of the branches resolved via a lookup(). By default, the 
Request URI of an incoming request is set to the resolved Contact in the 
registrar, but if you set a destination next-hop ($du) equal to the Path hop, 
which should happen automatically if this[1] and other Path-related parameters 
are set to enabled, that's what should be returned in a 3xx constructed by 
Kamailio from the preloaded branches.


At least, that is how I understand it. So, in fact, Kamailio does accommodate 
this use-case in a canned way, it's just not very obvious.


-- Alex


[1] 
https://kamailio.org/docs/modules/5.7.x/modules/registrar.html#registrar.p.use_path
 
<https://kamailio.org/docs/modules/5.7.x/modules/registrar.html#registrar.p.use_path>


> On 27 Oct 2023, at 10:59, Alex Balashov  <mailto:abalas...@evaristesys.com>> wrote:
> 
> Yes, the remove_hf() et al. functions are designed to operate on requests. 
> Only a small subset of textops-family manipulation functions operate on 
> replies, and they should be explicitly labelled or named in a way that 
> reflects that.
> 
> I can't say I understand the scenario you've outlined, either, but prima 
> facie, it seems bizarre. Why would you put the Path value into a 302 
> redirect? The Path value simply provides a next-hop in a trapezoid where the 
> registrar is reached indirectly through an intermediate proxy. 
> 
> It may be the case that you're doing something in a roundabout way that 
> routes around the simpler, "baked in" scenarios Kamailio is prepared to 
> handle... 
> 
> -- Alex
> 
>> On 27 Oct 2023, at 10:23, Jawaid Bazyar via sr-users 
>> mailto:sr-users@lists.kamailio.org>> wrote:
>> 
>> Hi Henning, thanks for your reply.
>> I have successfully used PATH before as you describe.
>> This model, however, I am having Kamailio issue a 302 Redirect, and, I need 
>> to take the recorded PATH information and put it into the 302 Redirect 
>> Contact field, to send back with sl_send_reply. Sl_send_reply does not seem 
>> to do that automatically even after a lookup() and reg_fetch.
>> I was able to figure out the textops transforms and get the data into a 
>> Contact header, though I’m not 100% confident I’m creating a correct 
>> Contact, as sometimes the PATH can be quite complex and I’m taking only the 
>> host part and reconstructing a contact from that. I guess I will have to 
>> scour the RFC and do some learning 
>> I was hoping this particular scenario had been baked into Kamailio 
>> previously and I just needed to find the right configuration options to 
>> exercise it.
>> On my second issue:
>> I am left however with an inability to remove the existing Contact from the 
>> reply. I tried remove_hf before sl_send_reply, but either it doesn’t remove 
>> the Contact field, or, sl_send_reply adds the Contact field.
>> From: Henning Westerholt mailto:h...@gilawa.com>>
>> Date: Friday, October 27, 2023 at 10:10 AM
>> To: "Kamailio (SER) - Users Mailing List" > <mailto:sr-users@lists.kamailio.org>>
>> Cc: Jawaid Bazyar mailto:baz...@gmail.com>>
>> Subject: RE: Registrar / Path
>> Hello,
>> I probably failed to understand your scenario completely.
>> But basically, if you want to just forward REGISTER message from one 
>> Kamailio to the other, you can use “forward()” or “r_relay()” for stateless 
>> respectively stateful forwarding. The path extension was designed to take 
>> the same way routing e.g. an INVITE to an user agent as it came through your 
>> infrastructure. It will work automatically by setting the destination URI if 
>> it path is set and you are using the “lookup(..)” function.
>> Cheers,
>> Henning
>> -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/>
>&

[SR-Users] Re: Registrar / Path

2023-10-31 Thread Jawaid Bazyar via sr-users
Yes, you stated it very well! 

Hm, ok I will test out those path parameters. Thanks!



On 10/27/23, 11:37 AM, "Alex Balashov via sr-users" 
mailto:sr-users@lists.kamailio.org>> wrote:


In thinking through it a bit more, I think I understand better now. You want to 
interrogate -- that is, to query -- the location service via redirect rather 
than by sending a request directly to it, and you want the returned coordinates 
for the AOR being interrogated to incorporate the path hop so that the querying 
entity can send requests to it through that adjacency (RS) rather than directly 
to it. 


It might have been easier if you explicitly stated that. :-) 


Contact addresses in 3xx replies generated by Kamailio come from the 
destination set of the branches resolved via a lookup(). By default, the 
Request URI of an incoming request is set to the resolved Contact in the 
registrar, but if you set a destination next-hop ($du) equal to the Path hop, 
which should happen automatically if this[1] and other Path-related parameters 
are set to enabled, that's what should be returned in a 3xx constructed by 
Kamailio from the preloaded branches.


At least, that is how I understand it. So, in fact, Kamailio does accommodate 
this use-case in a canned way, it's just not very obvious.


-- Alex


[1] 
https://kamailio.org/docs/modules/5.7.x/modules/registrar.html#registrar.p.use_path
 
<https://kamailio.org/docs/modules/5.7.x/modules/registrar.html#registrar.p.use_path>


> On 27 Oct 2023, at 10:59, Alex Balashov  <mailto:abalas...@evaristesys.com>> wrote:
> 
> Yes, the remove_hf() et al. functions are designed to operate on requests. 
> Only a small subset of textops-family manipulation functions operate on 
> replies, and they should be explicitly labelled or named in a way that 
> reflects that.
> 
> I can't say I understand the scenario you've outlined, either, but prima 
> facie, it seems bizarre. Why would you put the Path value into a 302 
> redirect? The Path value simply provides a next-hop in a trapezoid where the 
> registrar is reached indirectly through an intermediate proxy. 
> 
> It may be the case that you're doing something in a roundabout way that 
> routes around the simpler, "baked in" scenarios Kamailio is prepared to 
> handle... 
> 
> -- Alex
> 
>> On 27 Oct 2023, at 10:23, Jawaid Bazyar via sr-users 
>> mailto:sr-users@lists.kamailio.org>> wrote:
>> 
>> Hi Henning, thanks for your reply.
>> I have successfully used PATH before as you describe.
>> This model, however, I am having Kamailio issue a 302 Redirect, and, I need 
>> to take the recorded PATH information and put it into the 302 Redirect 
>> Contact field, to send back with sl_send_reply. Sl_send_reply does not seem 
>> to do that automatically even after a lookup() and reg_fetch.
>> I was able to figure out the textops transforms and get the data into a 
>> Contact header, though I’m not 100% confident I’m creating a correct 
>> Contact, as sometimes the PATH can be quite complex and I’m taking only the 
>> host part and reconstructing a contact from that. I guess I will have to 
>> scour the RFC and do some learning 
>> I was hoping this particular scenario had been baked into Kamailio 
>> previously and I just needed to find the right configuration options to 
>> exercise it.
>> On my second issue:
>> I am left however with an inability to remove the existing Contact from the 
>> reply. I tried remove_hf before sl_send_reply, but either it doesn’t remove 
>> the Contact field, or, sl_send_reply adds the Contact field.
>> From: Henning Westerholt mailto:h...@gilawa.com>>
>> Date: Friday, October 27, 2023 at 10:10 AM
>> To: "Kamailio (SER) - Users Mailing List" > <mailto:sr-users@lists.kamailio.org>>
>> Cc: Jawaid Bazyar mailto:baz...@gmail.com>>
>> Subject: RE: Registrar / Path
>> Hello,
>> I probably failed to understand your scenario completely.
>> But basically, if you want to just forward REGISTER message from one 
>> Kamailio to the other, you can use “forward()” or “r_relay()” for stateless 
>> respectively stateful forwarding. The path extension was designed to take 
>> the same way routing e.g. an INVITE to an user agent as it came through your 
>> infrastructure. It will work automatically by setting the destination URI if 
>> it path is set and you are using the “lookup(..)” function.
>> Cheers,
>> Henning
>> -- Henning Westerholt – https://skalatan.de/blog/ <https://skalatan.de/blog/>
>> Kamailio services – https://gilawa.com <https://gilawa.com>
>> From: Jawaid Bazyar via sr-users > <mailto:sr-users@lists.kamailio.org>> 
>> 

[SR-Users] Re: Registrar / Path

2023-10-27 Thread Jawaid Bazyar via sr-users
Hi Henning, thanks for your reply.

 

I have successfully used PATH before as you describe.

 

This model, however, I am having Kamailio issue a 302 Redirect, and, I need to 
take the recorded PATH information and put it into the 302 Redirect Contact 
field, to send back with sl_send_reply. Sl_send_reply does not seem to do that 
automatically even after a lookup() and reg_fetch.

 

I was able to figure out the textops transforms and get the data into a Contact 
header, though I’m not 100% confident I’m creating a correct Contact, as 
sometimes the PATH can be quite complex and I’m taking only the host part and 
reconstructing a contact from that. I guess I will have to scour the RFC and do 
some learning 

 

I was hoping this particular scenario had been baked into Kamailio previously 
and I just needed to find the right configuration options to exercise it.

 

 

On my second issue:

 

I am left however with an inability to remove the existing Contact from the 
reply. I tried remove_hf before sl_send_reply, but either it doesn’t remove the 
Contact field, or, sl_send_reply adds the Contact field.

 

 

 

From: Henning Westerholt 
Date: Friday, October 27, 2023 at 10:10 AM
To: "Kamailio (SER) - Users Mailing List" 
Cc: Jawaid Bazyar 
Subject: RE: Registrar / Path

 

Hello,

 

I probably failed to understand your scenario completely.

 

But basically, if you want to just forward REGISTER message from one Kamailio 
to the other, you can use “forward()” or “r_relay()” for stateless respectively 
stateful forwarding. 

 

The path extension was designed to take the same way routing e.g. an INVITE to 
an user agent as it came through your infrastructure. It will work 
automatically by setting the destination URI if it path is set and you are 
using the “lookup(..)” function.

 

Cheers,

 

Henning

 

 

-- 

Henning Westerholt – https://skalatan.de/blog/

Kamailio services – https://gilawa.com

 

 

 

From: Jawaid Bazyar via sr-users  
Sent: Mittwoch, 25. Oktober 2023 21:54
To: sr-users@lists.kamailio.org
Cc: Jawaid Bazyar 
Subject: [SR-Users] Registrar / Path

 

Hi,

 

I have a scenario where I have an edge proxy (named RS), which locally stores 
registrations from Endpoints in its USRLOC, but which then also forward's 
REGISTER requests on to another proxy (named CN), which stores registrations in 
its USRLOC. (which then does DMQ with another CN like it).

 

Both RS and CN are storing Path information, for example:

 

kamctl ul show displays on both RS and CN:

  "Path": "sip:vs-rs01.blah.foo.bar;lr;received=sip:3.4.5.6:33577",

 

So I know the path info is in there.

 

I want CN , when presented with an INVITE, to reply with a 302 Redirect.

 

Right now I have this:

 

if (!lookup("location",sip:$tU@nodomain)) {

}

reg_fetch_contacts("location", "$tu", "called");

xlog("location info $ulc(called=>path)");

sl_send_reply("302","Redirect");

 

and the xlog does display the path. Good, so I have it being sent all the way 
through RS and CN and into CN’s USRLOC.

 

but this isn’t complete.

 

I am now faced with two issues.

 

One, I need to mangle the Path into a Contact header for the Redirect.

Two, I need to delete the Contact header that sl_send_reply is putting on 
there, which is the Contact as RS sees it from the endpoint. This needs to be 
removed and replaced with a Contact of only the RS server.

 

It feels like there ought to be a simpler way to do this than parsing the Path 
string and reassembling a Contact from it, but if there is it's not readily 
apparent. Both Google and chatgpt have failed me :)

 

Thanks in advance,

 

Jawaid

 

 

 

 

 

__
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] Registrar / Path

2023-10-25 Thread Jawaid Bazyar via sr-users
Hi,

 

I have a scenario where I have an edge proxy (named RS), which locally stores 
registrations from Endpoints in its USRLOC, but which then also forward's 
REGISTER requests on to another proxy (named CN), which stores registrations in 
its USRLOC. (which then does DMQ with another CN like it).

 

Both RS and CN are storing Path information, for example:

 

kamctl ul show displays on both RS and CN:

  "Path": "sip:vs-rs01.blah.foo.bar;lr;received=sip:3.4.5.6:33577",

 

So I know the path info is in there.

 

I want CN , when presented with an INVITE, to reply with a 302 Redirect.

 

Right now I have this:

 

if (!lookup("location",sip:$tU@nodomain)) {

}

reg_fetch_contacts("location", "$tu", "called");

xlog("location info $ulc(called=>path)");

sl_send_reply("302","Redirect");

 

and the xlog does display the path. Good, so I have it being sent all the way 
through RS and CN and into CN’s USRLOC.

 

but this isn’t complete.

 

I am now faced with two issues.

 

One, I need to mangle the Path into a Contact header for the Redirect.

Two, I need to delete the Contact header that sl_send_reply is putting on 
there, which is the Contact as RS sees it from the endpoint. This needs to be 
removed and replaced with a Contact of only the RS server.

 

It feels like there ought to be a simpler way to do this than parsing the Path 
string and reassembling a Contact from it, but if there is it's not readily 
apparent. Both Google and chatgpt have failed me :)

 

Thanks in advance,

 

Jawaid

 

 

 

 

 

__
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: lookup() and database

2023-10-20 Thread Jawaid Bazyar via sr-users
Would a DMQ cluster with RAM-based store and a relatively small number of nodes 
(say, 5 for example) be able to handle a location table measured in the scale 
of 1 million nodes?

Has anyone done this before?

I assume DMQ has some provision to prevent loops / etc ?

Wondering about scaling a location service vertically and separating into a 
different layer from the stuff that needs to scale horizontally.


On 10/20/23, 11:16 AM, "Alex Balashov" mailto:abalas...@evaristesys.com>> wrote:






> On 20 Oct 2023, at 09:17, Jawaid Bazyar  > wrote:
> 
> Hi Alex,
> 
> Well I guess the other effects if any are unclear. 
> 
> As to what I want..
> 
> The goal is to ensure that all the nodes in a large-scale 
> geographically-distributed system have routing information to locate the 
> dynamic contacts of registered endpoints.
> 
> This requires that information to be shared with all other nodes somehow. 
> Either you can store it in some kind of database and look it up, or, you have 
> to proactively notify the other nodes of the information. (e.g. with DMQ or 
> something similar).
> 
> DMQ replication is probably only scalable to a very small number of nodes 
> (2-3), and also does not implement message reliability. This will force some 
> other area of the application to shard across many small kamailio clusters. 
> 
> Is there a different way to achieve a similar result? (Perhaps I have an 
> incorrect assumption somewhere along the line)..


Not really, you've pretty much covered it. 


I might disagree with the idea that DMQ doesn't scale to a larger number of 
nodes, but no, its scaling is not infinite.


Still sounds like db_mode 3 is the way to go for what you want, which is to use 
the database as the distribution and synchronisation mechanism. There are of 
course drawbacks to that, but you seem to be okay with those, and that's not 
where the pressure of the overall question appears to lie.


Not sure about your concerns about NAT pinging from another message, but they 
are orthogonal to the storage backend question per se. 


db_mode 3 is the simple answer to your question. You might be splitting hairs 
on some of the other stuff.


-- Alex


-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com 
Tel: +1-706-510-6800






__
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: lookup() and database

2023-10-20 Thread Jawaid Bazyar via sr-users
Hi,

This is one of the effects I was remembering:

" For example NAT pinging is a killer since during each ping cycle all nated 
contact are loaded from the DB;"




On 10/20/23, 9:17 AM, "Jawaid Bazyar" mailto:baz...@gmail.com>> wrote:


Hi Alex,


Well I guess the other effects if any are unclear. 


As to what I want..


The goal is to ensure that all the nodes in a large-scale 
geographically-distributed system have routing information to locate the 
dynamic contacts of registered endpoints.


This requires that information to be shared with all other nodes somehow. 
Either you can store it in some kind of database and look it up, or, you have 
to proactively notify the other nodes of the information. (e.g. with DMQ or 
something similar).


DMQ replication is probably only scalable to a very small number of nodes 
(2-3), and also does not implement message reliability. This will force some 
other area of the application to shard across many small kamailio clusters. 


Is there a different way to achieve a similar result? (Perhaps I have an 
incorrect assumption somewhere along the line)..


Thanks,


Jawaid








On 10/19/23, 8:57 PM, "Alex Balashov via sr-users" 
mailto:sr-users@lists.kamailio.org> 
>> 
wrote:




If what you want is what you really want, db_mode 3 is the only way to achieve 
it. What other effects of mode 3 are you concerned about?




-- Alex




-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com  
 
Tel: +1-706-510-6800




__
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: lookup() and database

2023-10-20 Thread Jawaid Bazyar via sr-users
Hi Alex,

Well I guess the other effects if any are unclear. 

As to what I want..

The goal is to ensure that all the nodes in a large-scale 
geographically-distributed system have routing information to locate the 
dynamic contacts of registered endpoints.

This requires that information to be shared with all other nodes somehow. 
Either you can store it in some kind of database and look it up, or, you have 
to proactively notify the other nodes of the information. (e.g. with DMQ or 
something similar).

DMQ replication is probably only scalable to a very small number of nodes 
(2-3), and also does not implement message reliability. This will force some 
other area of the application to shard across many small kamailio clusters. 

Is there a different way to achieve a similar result? (Perhaps I have an 
incorrect assumption somewhere along the line)..

Thanks,

Jawaid




On 10/19/23, 8:57 PM, "Alex Balashov via sr-users" 
mailto:sr-users@lists.kamailio.org>> wrote:


If what you want is what you really want, db_mode 3 is the only way to achieve 
it. What other effects of mode 3 are you concerned about?


-- Alex


-- 
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web: https://evaristesys.com 
Tel: +1-706-510-6800


__
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] lookup() and database

2023-10-19 Thread Jawaid Bazyar via sr-users
Hi,

 

I have an application as follows:

 

Multiple Kamailio Nodes

Shared Postgres database

 

Auth information will be stored in DB and accessed with Authdb.

 

Here is the behavior I seek:

 

I would like all the Kamailo nodes to cooperate in updating the database, each 
updating data as appropriate:

 
When a registration comes in to any Node, and it authenticated, create or 
update a database record in location table.
When a registration expires on that Node, delete database record in location 
table.
When INVITE comes in on any Node, ignore local cache and always lookup() record 
from database.
 

#1 and #2 are used so that a third SIP system can query the database and look 
up the Node a NAT’d subscriber is ‘connected’ to.

#3 is to let NON-NAT’d subscribers be contacted from any Node.

 

Now I have something close to this now – using following settings:

 

modparam("usrloc", "db_mode", 1)    # immediately write registrations to 
the database.

modparam("usrloc", "db_timer_clean", 0) # do not expire DB records separately

modparam("usrloc", "db_check_update", 1)

 

This takes care of #1 and #2 above. However, #3 seems to still be relying 
purely on local cache and does not hit the database.

 

Is there a way to do #3? I can set db_mode to 3 but that would seem to have 
other effects besides merely making lookup() read from database.

 

Thanks in advance,

 

Jawaid

 

 

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