[SR-Users] Kamailio-Asterisk real-time integration with Dynamic IP

Rudy Eschauzier reschauzier at yahoo.com
Sun Aug 16 19:54:02 CEST 2015


All,
The Kamailio-Asterisk integration that is described here
asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb [Asipto - SIP and VoIP Knowledge Base Site]
is limited to Asterisk servers with a fixed IP address. The reason is that Kamailio identifies and authorizes traffic from Asterisk based on the source IP address. Attached is a patch to kamailio.cfg that adds support for dynamic Asterisk hosts. It introduces the option to define a fully-qualified domain name instead of the IP address to identify the Asterisk server. The host name can be dynamically updated to always point at the (changing) IP address of the Asterisk server. Defining WITH_ASTERISK_FQDN enables the new option.
When WITH_ASTERISK_FQDN is set, Kamailio will perform a DNS search on the host name in the asterisk.bindhost variable. It will authorize incoming traffic if it originates from one of the IP addresses the DNS lookup returns (and matches the asterisk.bindport variable as before).
Furthermore, the patch introduce the option to automatically set the IP address of the server that Kamailio is running on. This does away with the need to properly define kamailio.bindip on every server that the configuration is running on. This option is enabled by defining WITH_AUTOIP.
With the suggested changes I have been able to successfully run an Asterisk server in my home, having a dynamic public IP address and connecting to the Kamailio proxy on a VPS server with a static IP addres.
Please let me know if you have any comments or suggestions.
Kind regards,Rudy Eschauzier.


|   |
|   |  |   |   |   |   |   |
| asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb [...Table of Contents Kamailio 4.0.x and Asterisk 11.3.0 Realtime Integration using Asterisk Database Architecture Registration Call Initiation Requirements MySQL Insta... |
|  |
| View on kb.asipto.com | Preview by Yahoo |
|  |
|   |


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150816/ce5a33ce/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asterisk-ddns.patch
Type: text/x-patch
Size: 6410 bytes
Desc: not available
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150816/ce5a33ce/attachment.bin>


More information about the sr-users mailing list