mod_esf (Extra SIP Functionality)
mod_esf implements extra SIP functionality such as multicast paging support.
Some phones and many IP public address paging devices can accept IGMP multicast RTP streams. The benefit of using IP multicast is that one RTP stream can propagate to many devices, thus saving bandwidth. But routers and sometimes Ethernet switches must be provisioned to handle multicast.
<action application="esf_page_group" data="<multicast group> <multicast port> <Linksys control port> <TTL>"/>
The default values used when no arguments are given to the esf_page_group application are:
multicast ip address: 18.104.22.168 multicast port: 34567 multicast control port: 6061 time to live: 1
This example appears in the default dialplan included with FreeSWITCH.
<extension name="rtp_multicast_page"> <condition field="destination_number" expression="^pagegroup$|^7243"> <action application="answer"/> <action application="esf_page_group" data="22.214.171.124 18000 1213 5"/> </condition> </extension>
You can change the IP multicast group address and port with arguments to the esf_page_group. The first argument is for the multicast ip address, 2nd is the port to use, and the 3rd, if used, is the control packet port for Linksys devices, the 4th is the time-to-live.
For example to change the multicast ip to 126.96.36.199 and port to 34564 use:
<action application="esf_page_group" data="188.8.131.52 34564"/>
If you get really bad feedback because another phone is too close to the one you're doing the paging from, try setting the jitterbuffer_msec variable to 500 or 1000 before the channel is answered. Or set up different paging zones to avoid this problem.
If running Linux with multiple network interfaces, you need to have a multicast route added to the network interface that your phones are on. For instance, if eth0.5 is a vlan interface (vlan5) that FreeSWITCH is bound to and it has an IP address of 192.168.5.2, then the correct route to add would be the following:
ip route add 184.108.40.206/4 dev eth0.5 src 192.168.5.2
You must have the iproute2 package installed to have the 'ip' command available. The src option is very important. Without it the packets will come out eth0 and not on the desired vlan.
When running FreeBSD, and if your FreeBSD box is only using one Ethernet interface you will notice that things will work out of the box with the dialplan entry above. This is because FreeBSD supports multicast host operations by default and there would be no need to configure a route since the default multicast route is via the interface with the default route.
In the case in which you have more than one interface, you will still notice that multicast packets will go out through the interface with the default route, and if you need to force traffic to go out through a different interface then you need to setup a route.
A simple static route will suffice:
freebsd_box#route add -host 220.127.116.11 192.168.1.X
So please don't be confused with multicast routing which is not enabled by default on a GENERIC kernel since the case being described does not need to forward this traffic from one interface to another.
The TTL value of 1 will prevent multicast packets from passing over to the next router in your network. Best practice is to use the lowest TTL value that will reach all desired endpoints without propagating farther.
The packets sent are *always* converted to G.711 mu-Law / PCMU (8khz) because some phones (Snom for example) won't accept other codecs via multicast.