[SR-Users] Kamailio server behind NAT

Tihomir Culjaga tculjaga at gmail.com
Wed Feb 9 18:07:03 CET 2022


Thank you Sergiu, I see now that 5.5.x version supports setting
contact_addr in the database. This is one less issue to think about :)

Still there are many other things to address :)

So, if we run kamailio behind NAT, is it enough to use
set_advertised_address and set_advertised_port per message ?

Appreciate,
Tihomir.



On Wed, 9 Feb 2022 at 17:25, Sergiu Pojoga <pojogas at gmail.com> wrote:

> *>  you can set only one contact address*
>
> Recent versions of Kamailio support setting Contact address per uac
> record, see *contact_addr* field.
>
> Regards,
>
> On Wed, Feb 9, 2022 at 11:15 AM Tihomir Culjaga <tculjaga at gmail.com>
> wrote:
>
>> Hi all
>>
>>
>> I'm wondering what is best practice to configure kamailio for a setup
>> shown below. Carriers only support interconnection over a private network
>> so I need to terminate every separate network on kamailio machine (and on
>> RTPEngine) . That will turn very quickly into an administration nightmare
>> as we add more and more carriers.
>> My plan is to terminate carrier private networks on a router and NAT the
>> traffic to kamailio where it leads me to a kamailio behind NAT setup. Well,
>> in theory set_advertised_address and set_advertised_port per message can do
>> the trick... at least I hope.
>> Also, some carriers require a SIP registration to activate SIP trunks. I
>> do that using UAC module (remote registration) but here again I got a
>> problem with contact address as you can set only one contact address
>> (modparam("uac", "reg_contact_addr", "10.1.1.11:5060")).
>>
>>                     /--RTP 10000-19999-- RTPEngine1 -----RTP------+--
>> IPPBX1
>> carrier1 --- NAT ---|                       |                     |
>>                     |                       |                     |
>> carrier2 --- NAT ---+-----SIP 5060------ kamailio ----SIP---- Dispatcher
>>                     |                       |                     |
>> carrier3 --- NAT ---|                       |                     |
>>                     \--RTP 20000-29999-- RTPEngine2 -----RTP------+--
>> IPPBX2
>>
>>
>> So bottom line, I'm wondering what would be the best practice for such a
>> scenario ?
>> That would spare me from hitting many pitfalls.
>>
>> Would really appreciate a hint.
>>
>> Regards,
>> Tihomir.
>>
>>
>>
>> __________________________________________________________
>> Kamailio - Users Mailing List - Non Commercial Discussions
>>   * sr-users at 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 at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220209/953d7390/attachment.htm>


More information about the sr-users mailing list