Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible?
Thank you,
Enzo Damato
There are several ways to integrate Kamailio with Asterisk.
The easiest by far is to leverage SIP PATH mechanism as defined by rfc3327 https://datatracker.ietf.org/doc/html/rfc3327
On the Kamailio side: https://www.kamailio.org/docs/modules/devel/modules/path.html
Heads-up: some Asterisk versions, also channel drivers, have broken SIP PATH implementations, so you'd have to do your diligence and research to figure out which one works best for you.
On Mon, Feb 17, 2025 at 10:17 AM Enzo Damato via sr-users < sr-users@lists.kamailio.org> wrote:
Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible?
Thank you,
Enzo Damato
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
On 17 Feb 2025, at 16:35, Sergiu Pojoga via sr-users sr-users@lists.kamailio.org wrote:
There are several ways to integrate Kamailio with Asterisk.
Try to figure out if you really need registrations in Asterisk now that you have Kamailio. It makes things so much more complex and less scalable to have registrations in Asterisk.
/O
The easiest by far is to leverage SIP PATH mechanism as defined by rfc3327 https://datatracker.ietf.org/doc/html/rfc3327
On the Kamailio side: https://www.kamailio.org/docs/modules/devel/modules/path.html
Heads-up: some Asterisk versions, also channel drivers, have broken SIP PATH implementations, so you'd have to do your diligence and research to figure out which one works best for you.
On Mon, Feb 17, 2025 at 10:17 AM Enzo Damato via sr-users <sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org> wrote:
Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible?
Thank you,
Enzo Damato
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org mailto:sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org mailto:sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
On Feb 17, 2025, at 10:04 AM, Olle E. Johansson via sr-users sr-users@lists.kamailio.org wrote:
Try to figure out if you really need registrations in Asterisk now that you have Kamailio. It makes things so much more complex and less scalable to have registrations in Asterisk.
Agree strongly with this, +1.
-- Alex
I am planning on moving my registrations fully over to kamailio eventually. The big obstacle to this is that I have a custom routing API integrated with asterisk, and much more experience with it overall. I wanted to take the migration slower, getting a basic proxy working first.
Thank you,
Enzo Damato
On 2/17/25 10:04 AM, Olle E. Johansson via sr-users wrote:
On 17 Feb 2025, at 16:35, Sergiu Pojoga via sr-users sr-users@lists.kamailio.org wrote:
There are several ways to integrate Kamailio with Asterisk.
Try to figure out if you really need registrations in Asterisk now that you have Kamailio. It makes things so much more complex and less scalable to have registrations in Asterisk.
/O
The easiest by far is to leverage SIP PATH mechanism as defined by rfc3327 https://datatracker.ietf.org/doc/html/rfc3327
On the Kamailio side: https://www.kamailio.org/docs/modules/devel/modules/path.html
Heads-up: some Asterisk versions, also channel drivers, have broken SIP PATH implementations, so you'd have to do your diligence and research to figure out which one works best for you.
On Mon, Feb 17, 2025 at 10:17 AM Enzo Damato via sr-users sr-users@lists.kamailio.org wrote:
Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible? Thank you, Enzo Damato __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Kamailio - Users Mailing List - Non Commercial Discussions --sr-users@lists.kamailio.org To unsubscribe send an email tosr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
Hi,
It sounds like Asterisk is giving registrations relayed through your Kamailio the NAT traversal treatment, which you should turn off.
Second, you're going to need the SIP Path mechanism to make this work:
https://datatracker.ietf.org/doc/html/rfc3327
https://kamailio.org/docs/modules/5.8.x/modules/path.html
Cheers,
-- Alex
On Feb 17, 2025, at 8:51 AM, Enzo Damato via sr-users sr-users@lists.kamailio.org wrote:
Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible?
Thank you,
Enzo Damato
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!
This ended up being it. I had accidentally left the rewrite_contact flag on. Disabling this and setting the use_path=true flag on the AOR in asterisk fixed the issue. I had already enabled the path module in my kamailio.
Thanks very much for your help!
On 2/17/25 9:48 AM, Alex Balashov via sr-users wrote:
Hi,
It sounds like Asterisk is giving registrations relayed through your Kamailio the NAT traversal treatment, which you should turn off.
Second, you're going to need the SIP Path mechanism to make this work:
https://datatracker.ietf.org/doc/html/rfc3327
https://kamailio.org/docs/modules/5.8.x/modules/path.html
Cheers,
-- Alex
On Feb 17, 2025, at 8:51 AM, Enzo Damato via sr-users sr-users@lists.kamailio.org wrote:
Hi. I'm working on setting up kamailio as a load balancer for some asterisk instances. I've build a configuration that is working for the most part, but I am encountering issues with calls from the asterisk instances to users who's registrations were processed through the kamailio instance. When these users register, asterisk saves thier AOR as the address of the kamailio instance, and then subsequently tires to send invites to kamailio, instead of to the UAC. Since kamailio just proxied the registration, without actually registering the user, it doesn't know what to do with the invite, and the call fails. I would like to configure kamailio to rewrite the sip requests so that all traffic appears to be coming from the end user, rather than from the kamailio instance, essentially making the proxy transparent. Is this possible?
Thank you,
Enzo Damato
Kamailio - Users Mailing List - Non Commercial Discussions -- sr-users@lists.kamailio.org To unsubscribe send an email to sr-users-leave@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender!