[SR-Users] Route calls from Kamailio to Asterisk behind NAT

Benjamin Fitzgerald ben at letscorp.us
Fri Aug 11 18:35:45 CEST 2017


Yes, it requires a very particular configuration. With asterisk you in
sip.conf you need

externaddr=you.public.ip

This is used in SIP registrations by Asterisk. You should also be
comfortable with debugging the SIP traffic to make sure all IP's are set
properly. For asterisk:

>sip set debug on

Look for REGISTER messages.

Another amazing tool for this is sipgrep (
https://github.com/sipcapture/sipgrep). It's like ngrep but for SIP.



Benjamin Fitzgerald
LETS Corporation
(925) 566-5600 ext. 25
ben at letscorp.us




*******Confidential Notice:
This message is intended only for the use of the individual or entity to
which it is addressed and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If the reader
of this message is not the intended recipient, you are hereby notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this message in error, please
delete this message from all computers and contact Orion Systems/LETS Corp
immediately by return e-mail and/or telephone at (925) 566-5600

On Fri, Aug 11, 2017 at 3:29 AM, <vs at cell.tel> wrote:

> Hi!
>
> Could anyone advice me or provide an example of Kamailio config to solve
> this case:
>
> Current Kamailio+Asterisk schema:
> (7XXX Users) <-> Asterisk <-> NAT <-> Internet <-> Kamailio <-> (4XXX
> Users)
>
>
> 7XXX Users registers on Asterisk server, and 4XXX Users registers on
> Kamailio.
> In Addition, Asterisk registers on Kamailio with user 4444, and it is
> possible to make calls from 7XXX Users (Asterisk) to 4XXX Users (Kamailio)
> through 4444 "trunk".
> Also, while Kamailio users (4XXX) call to 4444 number, call successfully
> goes to Asterisk.
>
>
> How its possible to route all 7XXX destined calls from Kamailio users to
> Asterisk, while Asterisk is behind NAT???
>
> Config examples, i found, were writen only for situation with fixed
> asterisk IP and PORT, without nat ( asterisk.bindip = "" ; asterisk.bindport
> = "")
>
>
>
> Thanks in advance
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> 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/20170811/10c30822/attachment.html>


More information about the sr-users mailing list