Discussion:
[SR-Users] Architecture - your opinion is welcome and your experience too
Daian Conrad
2021-05-28 14:23:48 UTC
Permalink
Hi all,

I am studying and improving my understanding of how kamailio works, I have
used asterisk for a few years(and starting learning freeswitch too), and I
use an application to manage extensions, trunks and other media services.
I'm building a new scenario where kamailio is facing the internet and the
asterisk(s) are internally on private networks, would like the opinion of
you who are more experienced with more complex environments than me.

I cannot change the application that uses asterisk for now, due to the
effort to develop event monitoring, cdr and other features that I use today.

I imagined and working on making kamailio functional by saving the
registration of extensions with location on DB, and with the UAC module
making the registration of extensions on asterisk(s), replacing the
registration address with the address of kamailio, its functional at this
point, but data replication with extensions turns things some hard to
mantain manually.

I think about using the DNS domain for each asterisk and make this
forwarded, each asterisk response for a fqdn and its extensions, like (
pbx1.example.com is forwarded to asterisk1, pbx2.example.com to asterisk2)
and so on.

Read about the dispatcher, rr, htable,carrierroute module to identify the
domain and forward based on that , none made me sure to be chosen for the
role, however, everyone has the resources to do it.

I am very wrong to follow this path, which option in your opinion is "less"
painful for a beginner apprentice like me?

I think about simple proxy based on domain requests(all messages and
dialogs) to asterisk where is responsible for the domain(realm)
but, loss the ability to use great security features of kamailio, is what I
understand now with the knowledge I have.

Sorry and forgive my english, i'm not very good at writing.
--
================
**Daian Conrad**

E-mail: ***@gmail.com
OpenS Team (DaCoD)
Linux user: #248912
Alex Balashov
2021-05-28 15:51:40 UTC
Permalink
Hi Daian,

Rather than reoriginaring registrations with Kamailio’s UAC module, I suggest you look into the Path extension and Kamailio’s PATH module as a means of relaying registrations inward to Asterisk.

You can still benefit from security features of Kamailio in that case, while removing 90% of the complexity in your proposal. :-)

— Alex

—
Sent from mobile, with due apologies for brevity and errors.
Post by Daian Conrad

Hi all,
I am studying and improving my understanding of how kamailio works, I have used asterisk for a few years(and starting learning freeswitch too), and I use an application to manage extensions, trunks and other media services.
I'm building a new scenario where kamailio is facing the internet and the asterisk(s) are internally on private networks, would like the opinion of you who are more experienced with more complex environments than me.
I cannot change the application that uses asterisk for now, due to the effort to develop event monitoring, cdr and other features that I use today.
I imagined and working on making kamailio functional by saving the registration of extensions with location on DB, and with the UAC module making the registration of extensions on asterisk(s), replacing the registration address with the address of kamailio, its functional at this point, but data replication with extensions turns things some hard to mantain manually.
I think about using the DNS domain for each asterisk and make this forwarded, each asterisk response for a fqdn and its extensions, like (pbx1.example.com is forwarded to asterisk1, pbx2.example.com to asterisk2) and so on.
Read about the dispatcher, rr, htable,carrierroute module to identify the domain and forward based on that , none made me sure to be chosen for the role, however, everyone has the resources to do it.
I am very wrong to follow this path, which option in your opinion is "less" painful for a beginner apprentice like me?
I think about simple proxy based on domain requests(all messages and dialogs) to asterisk where is responsible for the domain(realm)
but, loss the ability to use great security features of kamailio, is what I understand now with the knowledge I have.
Sorry and forgive my english, i'm not very good at writing.
--
================
**Daian Conrad**
OpenS Team (DaCoD)
Linux user: #248912
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Sergiu Pojoga
2021-05-28 16:47:58 UTC
Permalink
Heads-up though, before you get over excited about the suggested simplicity
of using PATH. Don't try it if your asterisk farm runs on PJSIP - it simply
won't work.
Post by Alex Balashov
Hi Daian,
Rather than reoriginaring registrations with Kamailio’s UAC module, I
suggest you look into the Path extension and Kamailio’s PATH module as a
means of relaying registrations inward to Asterisk.
You can still benefit from security features of Kamailio in that case,
while removing 90% of the complexity in your proposal. :-)
— Alex
—
Sent from mobile, with due apologies for brevity and errors.

Hi all,
I am studying and improving my understanding of how kamailio works, I have
used asterisk for a few years(and starting learning freeswitch too), and I
use an application to manage extensions, trunks and other media services.
I'm building a new scenario where kamailio is facing the internet and the
asterisk(s) are internally on private networks, would like the opinion of
you who are more experienced with more complex environments than me.
I cannot change the application that uses asterisk for now, due to the
effort to develop event monitoring, cdr and other features that I use today.
I imagined and working on making kamailio functional by saving the
registration of extensions with location on DB, and with the UAC module
making the registration of extensions on asterisk(s), replacing the
registration address with the address of kamailio, its functional at this
point, but data replication with extensions turns things some hard to
mantain manually.
I think about using the DNS domain for each asterisk and make this
forwarded, each asterisk response for a fqdn and its extensions, like (
pbx1.example.com is forwarded to asterisk1, pbx2.example.com to
asterisk2) and so on.
Read about the dispatcher, rr, htable,carrierroute module to identify the
domain and forward based on that , none made me sure to be chosen for the
role, however, everyone has the resources to do it.
I am very wrong to follow this path, which option in your opinion is
"less" painful for a beginner apprentice like me?
I think about simple proxy based on domain requests(all messages and
dialogs) to asterisk where is responsible for the domain(realm)
but, loss the ability to use great security features of kamailio, is what
I understand now with the knowledge I have.
Sorry and forgive my english, i'm not very good at writing.
--
================
**Daian Conrad**
OpenS Team (DaCoD)
Linux user: #248912
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Alex Balashov
2021-05-28 16:54:59 UTC
Permalink
Content preview: On 5/28/21 12:47 PM, Sergiu Pojoga wrote: > Heads-up though,
before you get over excited about the suggested > simplicity of using PATH.
Don't try it if your asterisk farm runs on > PJSIP - it simply won't work.


Content analysis details: (-2.7 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
-0.0 SPF_PASS SPF: sender matches SPF record
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
-0.0 NICE_REPLY_A Looks like a legit reply (A)
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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-***@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
Sergiu Pojoga
2021-05-28 17:00:12 UTC
Permalink
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with Digium
pending for the last 2+ years, low importance, according to them...
Post by Alex Balashov
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Alex Balashov
2021-05-28 17:06:31 UTC
Permalink
Content preview: On 5/28/21 1:00 PM, Sergiu Pojoga wrote: > Yeah, PATH implimentation
is broken in PJSIP. There's a ticket with > Digium pending for the last 2+
years, low importance, according to > them... How sad. Thanks for the heads
up.

Content analysis details: (-2.7 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
-0.0 NICE_REPLY_A Looks like a legit reply (A)
Post by Sergiu Pojoga
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with
Digium pending for the last 2+ years, low importance, according to
them...
How sad. Thanks for the heads up.
--
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-***@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
Henning Westerholt
2021-05-28 17:26:24 UTC
Permalink
Just to add a bit more context, its probably this particular issue:
https://issues.asterisk.org/jira/browse/ASTERISK-28211

Cheers,

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

From: sr-users <sr-users-***@lists.kamailio.org> On Behalf Of Sergiu Pojoga
Sent: Friday, May 28, 2021 7:00 PM
To: Kamailio (SER) - Users Mailing List <sr-***@lists.kamailio.org>
Subject: Re: [SR-Users] Architecture - your opinion is welcome and your experience too

Yeah, PATH implimentation is broken in PJSIP. There's a ticket with Digium pending for the last 2+ years, low importance, according to them...
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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-***@lists.kamailio.org<mailto:sr-***@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
David Villasmil
2021-05-28 18:01:43 UTC
Permalink
Maybe you need to rethink wether you want the users registered on the
asterisks, instead registering on kamailio? Is that an option?
Post by Henning Westerholt
https://issues.asterisk.org/jira/browse/ASTERISK-28211
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
Pojoga
*Sent:* Friday, May 28, 2021 7:00 PM
*Subject:* Re: [SR-Users] Architecture - your opinion is welcome and your
experience too
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with Digium
pending for the last 2+ years, low importance, according to them...
On Fri., May 28, 2021, 12:52 p.m. Alex Balashov, <
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Regards,

David Villasmil
email: ***@gmail.com
phone: +34669448337
Alex Balashov
2021-05-28 18:09:21 UTC
Permalink
Content preview: On 5/28/21 2:01 PM, David Villasmil wrote: > Maybe you need
to rethink wether you want the users registered on the > asterisks, instead
registering on kamailio? Is that an option? I would agree with that. Besides,
I've heard that chan_pjsip has made it a lot easier to have an outboard registrar.


Content analysis details: (-2.7 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
-0.0 SPF_PASS SPF: sender matches SPF record
-0.0 SPF_HELO_PASS SPF: HELO matches SPF record
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
-0.0 NICE_REPLY_A Looks like a legit reply (A)
Post by David Villasmil
Maybe you need to rethink wether you want the users registered on the
asterisks, instead registering on kamailio? Is that an option?
I would agree with that. Besides, I've heard that chan_pjsip has made it
a lot easier to have an outboard registrar.
--
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-***@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
Fred Posner
2021-05-28 18:09:36 UTC
Permalink
Content preview: On 5/28/21 2:01 PM, David Villasmil wrote: > Maybe you need
to rethink wether you want the users registered on the > asterisks, instead
registering on kamailio? Is that an option? He had stated it was too difficult
to redo the asterisk side I believe...

Content analysis details: (-2.7 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 SPF_NONE SPF: sender does not publish an SPF Record
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily
valid
0.1 DKIM_INVALID DKIM or DK signature exists, but is not valid
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
-0.0 NICE_REPLY_A Looks like a legit reply (A)
Post by David Villasmil
Maybe you need to rethink wether you want the users registered on the
asterisks, instead registering on kamailio? Is that an option?
He had stated it was too difficult to redo the asterisk side I believe...

Generally, you can put Kamailio as a mid-registrar and you could either
move Asterisk to private IP and proxy the RTP or have a domain lookup
(htable or module) to forward the domain to the proper PBX.

Many different ways to approach it of course.
--
Fred Posner -- www.palner.com
Matrix: @fred:matrix.lod.com

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
* sr-***@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
Daian Conrad
2021-05-28 18:36:58 UTC
Permalink
I'm trying to take this decision David, is hard to change application on
asterisk side by now.

Yes Fred, I think is the way, use htable to choose asterisk's.

thanks guys, your answers motivate me to keep looking for the best solution
;-)

Em sex., 28 de mai. de 2021 às 15:03, David Villasmil <
Post by David Villasmil
Maybe you need to rethink wether you want the users registered on the
asterisks, instead registering on kamailio? Is that an option?
Post by Henning Westerholt
https://issues.asterisk.org/jira/browse/ASTERISK-28211
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
Pojoga
*Sent:* Friday, May 28, 2021 7:00 PM
*Subject:* Re: [SR-Users] Architecture - your opinion is welcome and
your experience too
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with
Digium pending for the last 2+ years, low importance, according to them...
On Fri., May 28, 2021, 12:52 p.m. Alex Balashov, <
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Regards,
David Villasmil
phone: +34669448337
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
================
**Daian Conrad**

E-mail: ***@gmail.com
OpenS Team (DaCoD)
Linux user: #248912
Daian Conrad
2021-05-28 18:26:29 UTC
Permalink
Thanks for the answers and the discussion guys,

yes, i'm trying module PATH, but just work for me if I use kamailio like
proxy(by-passing) to asterisk(pjsip)









* # Add path for REGISTER if ((is_method("REGISTER"))) {
add_path(); } $du = "sip:172.29.1.24:5060
<http://172.29.1.24:5060>"; route(RELAY); exit;*

In this case I lost statefull and security features in my config,
registrations works.

Question: Can I use route[REQINIT] (default) before forward request to
asterisk or need adjusts, try to soften SIP brute-forces?
Post by Henning Westerholt
https://issues.asterisk.org/jira/browse/ASTERISK-28211
Cheers,
Henning
--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com
Pojoga
*Sent:* Friday, May 28, 2021 7:00 PM
*Subject:* Re: [SR-Users] Architecture - your opinion is welcome and your
experience too
Yeah, PATH implimentation is broken in PJSIP. There's a ticket with Digium
pending for the last 2+ years, low importance, according to them...
On Fri., May 28, 2021, 12:52 p.m. Alex Balashov, <
Post by Sergiu Pojoga
Heads-up though, before you get over excited about the suggested
simplicity of using PATH. Don't try it if your asterisk farm runs on
PJSIP - it simply won't work.
Why, did they break Path?
--
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
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
Important: keep the mailing list in the recipients, do not reply only to the sender!
* https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
================
**Daian Conrad**

E-mail: ***@gmail.com
OpenS Team (DaCoD)
Linux user: #248912
Loading...