Skip to content

Instantly share code, notes, and snippets.

@ganapathichidambaram
Created February 13, 2021 13:25
Show Gist options
  • Save ganapathichidambaram/ac88fe871b92d385bb0fe952a7f07ea0 to your computer and use it in GitHub Desktop.
Save ganapathichidambaram/ac88fe871b92d385bb0fe952a7f07ea0 to your computer and use it in GitHub Desktop.
Freeswitch Changes for Internet Communication
=================================================
vars.xml
-----------------------------------
Gather Public IP and assign to external and bind ip using stun-set method. Where external_rtp_ip and external_sip_ip already
trying to get using freeswitch stun server where it's failing mostly, so use different stun server with high stability server or use
own stun server to get the external ip.
Also we can statically assign ip as well to skip stun server usage.
```
<X-PRE-PROCESS cmd="stun-set" data="external_rtp_ip=stun:stun.l.google.com:19302"/>
<X-PRE-PROCESS cmd="stun-set" data="external_sip_ip=stun:stun.l.google.com:19302"/>
```
And for the security reason SIP port changed to 45060 from 5060.
```
<X-PRE-PROCESS cmd="set" data="internal_sip_port=45060"/>
```
sip_profiles/internal.xml
-----------------------------------------
Add these two lines on internal profile.
```
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_rtp_ip}"/>
```
sip_profiles/external.xml
-----------------------------------------
Remove these two lines from external profile.
```
<param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
<param name="ext-sip-ip" value="$${external_rtp_ip}"/>
```
Notes:
SIP Profiles are basically used two category as Internal and external through the communication-wise. where internal profile used for internal
communication and external used for external communication(SIP gateway usually). Here if we used internal or external communicating through
internet then public ip of the ethernet device need to assign/gathered on external_sip_ip & external_rtp_ip to work through internet.
So if according to profile communicated through internet assign external ip and remove it on inter-network communication.
Also sip_ip & rtp_ip supposed to proper IP on each sip profiles which we're using, in-case if we're using different ip/ethernet device used for
communication then assign proper ip to communicated through right interface.
autoload_configs/event_socket.xml
-------------------------------------------
In-case IPV6 disabled on the server then need to change , otherwise fs_cli and other connectivity would fail. by default it's
running on ipv6 ip only.
```
<param name="listen-ip" value="0.0.0.0"/>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment