Skip to main content

mod_esf

About

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.

Click here to expand Table of Contents

Error rendering macro 'toc'

null

Usage

<action application="esf_page_group" data="<multicast group address> <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: 224.168.168.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="239.1.1.1 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 224.65.66.67 and port to 34564 use:

<action application="esf_page_group" data="224.65.66.67 34564"/>

Informational Tip


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.

The module sends Polycom PTT/Group Paging Audio Packets to the multicast group 224.0.1.116 and UDP port 5001.

Variables

NameValueDescription
esf_multicast_ipIP addressIf the application argument list is empty, this variable sets the multicast group address
esf_multicast_bind_ipIP addressBy default, the multicast socket is bound to the IP address specified by local_ip_v4 variable.esf_multicast_bind_ip can overwrite this value.
esf_multicast_write_codecPCMU or G722Sets the codec for multicast RTP. Default is PCMU.
esf_multicast_channelInteger, 0 < x < 255Channel number for Polycom PTT messages. Default: 0x1a
esf_multicast_alert_soundAudio sourcePlayback sound at the start of multicast transmission

Network Setup

Linux

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 224.0.0.0/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.

FreeBSD

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 224.168.168.168 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.

TTL

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.

Codec

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.

See Also