This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email.
the problem is not NAT . My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) . The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:34:52 MESZ hat Lewis Hutchinson lewis.hutchinson@missionlabs.co.uk Folgendes geschrieben:
This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
the problem is not NAT . My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) . The goal is to allow remote users to register in my asterisk server . Am Montag, 24. Juli 2023 um 10:54:16 MESZ hat John shuku john.shuki@yahoo.com Folgendes geschrieben:
the problem is not NAT . My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) . The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:34:52 MESZ hat Lewis Hutchinson lewis.hutchinson@missionlabs.co.uk Folgendes geschrieben:
This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
Hello John,
If that's the goal per se, you will likely need to use the Path[1][2][3] extension, which allows a proxy to stay in the signalling path of non-adjacent registration contacts.
This is assuming the Asterisk project have fixed their long-standing Path bug in `chan_pjsip`, which they have hitherto refused to fix for several years. If not, you may have to engage in some hacky stateful Contact rewriting in lieu of Path.
You will likely need to deal with client-side NAT on the device endpoint side[3], including RTP[4], if your use of Asterisk is what we might think of as ordinary.
An honest and realistic assessment of the difficulty level here is that it's probably overwhelming for a Kamailio newbie, putting it all together. Kamailio is relatively low-level and requires considerably detailed fluency in both the underlying SIP concepts and in Kamailio config script programming. Another factor is that this is a niche application of Kamailio which cannot be achieved with slight modifications of the stock config file; they require truly intentional config programming. There's no straightforward and simple recipe, the whole config must be designed around this flow.
If this is a business requirement, and you are in fact completely new to Kamailio, it may be rational to find a commercial Kamailio consultant in the Business Directory:
https://www.kamailio.org/w/business-directory/
Many long-time veterans and senior developers on this mailing list offer expert Kamailio consulting.
Good luck!
-- Alex
[1] https://datatracker.ietf.org/doc/html/rfc3327
[2] https://kamailio.org/docs/modules/5.7.x/modules/path.html
[3] https://kamailio.org/docs/modules/5.7.x/modules/nathelper.html
[4] https://kamailio.org/docs/modules/5.7.x/modules/rtpengine.html
-- Alex
On Jul 24, 2023, at 5:21 AM, John shuku john.shuki@yahoo.com wrote:
the problem is not NAT .
My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) .
The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:54:16 MESZ hat John shuku john.shuki@yahoo.com Folgendes geschrieben:
the problem is not NAT .
My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) .
The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:34:52 MESZ hat Lewis Hutchinson lewis.hutchinson@missionlabs.co.uk Folgendes geschrieben:
This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
On Mon, 24 Jul 2023 at 18:47, Alex Balashov abalashov@evaristesys.com wrote:
Hello John,
If that's the goal per se, you will likely need to use the Path[1][2][3] extension, which allows a proxy to stay in the signalling path of non-adjacent registration contacts.
This is assuming the Asterisk project have fixed their long-standing Path bug in `chan_pjsip`, which they have hitherto refused to fix for several years. If not, you may have to engage in some hacky stateful Contact rewriting in lieu of Path.
For future googlers and future me: you will need Asterisk ≥ 18.17.0, 20.2.0 to have fixed Path support in chan_pjsip. https://issues.asterisk.org/jira/browse/ASTERISK-30100
Those are very recent versions of Asterisk.
For kamailio config you could take a look at the sample config of the outbound module: this loads the path module and adds suitable Path headers towards an internal registrar.
However, as Alex mentioned, this whole thing is quite fraught. It depends on the registrar storing the Path header, and using it on INVITE - which was the problem with earlier versions of Asterisk.
Regards Richard
As far as i understand, Kamailio is probably in a Datacenter somewhere and the Asterisk box is in an Office without any public IP address forwarding data directly to the Asterisk. The best solution I can think of (in terms of security and ease of use) is using a VPN between Kamailio and your client's Asterisk box. Kamailio would forward all SIP messages to Asterisk via the VPN connection (OpenVPN is a very good solution) and RTPEngine would also have to be set up on the Kamailio box.
Without a VPN, you could use the Contact of Path modules and have your Asterisk register on Kamailio, but you would have to do some code because of the NAT issues. I would keep things simple, set up a VPN and have Kamailio and Asterisk "think" they're on the same network.
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Mon, Jul 24, 2023 at 10:16 AM John shuku john.shuki@yahoo.com wrote:
the problem is not NAT .
My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) .
The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:34:52 MESZ hat Lewis Hutchinson < lewis.hutchinson@missionlabs.co.uk> Folgendes geschrieben:
This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
Thank you for the helpful answers and sharing your experiences and knowledge. Yes I would rather try vpn and also will engage an expert regarding this implementation . Am Montag, 24. Juli 2023 um 14:10:46 MESZ hat Sergio Charrua sergio.charrua@voip.pt Folgendes geschrieben:
As far as i understand, Kamailio is probably in a Datacenter somewhere and the Asterisk box is in an Office without any public IP address forwarding data directly to the Asterisk. The best solution I can think of (in terms of security and ease of use) is using a VPN between Kamailio and your client's Asterisk box. Kamailio would forward all SIP messages to Asterisk via the VPN connection (OpenVPN is a very good solution) and RTPEngine would also have to be set up on the Kamailio box. Without a VPN, you could use the Contact of Path modules and have your Asterisk register on Kamailio, but you would have to do some code because of the NAT issues. I would keep things simple, set up a VPN and have Kamailio and Asterisk "think" they're on the same network.
Sérgio Charrua
www.voip.pt Tel.: +351 21 130 71 77
Email : sergio.charrua@voip.pt
| This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free. |
On Mon, Jul 24, 2023 at 10:16 AM John shuku john.shuki@yahoo.com wrote:
the problem is not NAT . My Asterisk does not have any public IP Address . How can I proxy the registration requests from kamailio ( with Public IP Address ) to asterisk ( With private IP address ) . The goal is to allow remote users to register in my asterisk server .
Am Montag, 24. Juli 2023 um 10:34:52 MESZ hat Lewis Hutchinson lewis.hutchinson@missionlabs.co.uk Folgendes geschrieben:
This is always a good place to start https://www.fredposner.com/1457/kamailio-behind-nat/
Lewis
Mission Labs Limited is registered in England, company number 10040088. Trading Office: The Old Milk Depot, Bacup Rd, Rossendale, BB4 7FE. Registered office: The Scalpel, 18th Floor 52 Lime Street, London, EC3M 7AF. Email confidentiality notice: This message is private and confidential. If you have received this message in error, please notify us and remove it from your system. Please consider the environment before you print this email. __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: __________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe:
__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions 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! Edit mailing list options or unsubscribe: