What RTP Media Ports are actually required?

I have the following set-up:

SPA3102 FXO ------ FreePBX --------- extension 3002

The SIP RTP Media Ports on the Linksys SPA3102 are 16384 to 16482.

rtp.conf on the FreePBX says rtpstart=10000 and rtpend=10999.

If extension 3002 is calling out via the SPA3102 to the PSTN, what are the RTP Media Ports required to be opened at extension 3002?

Are the RTP media packets routed end-to-end, ie from extension 3002 to SPA3102, or do they stop at the FreePBX and are then forwarded by the FreePBX to the FXO?


The ports required by Asterisk and those required by the device are independent of each other.

The Asterisk ports are the target ports when a media stream is direct TO Asterisk where as the Device ports are the target ports when a media stream is direct TO the device. There are always two media streams to make up a duplex conversation.

Thanks. So when a call is set up from extension 3002 through a FreePBX to an FXO, what is being targeted at whom?

Is extension 3002 targeting the FXO directly? Or is extension 3002 targeting FreePBX, and another stream is being targeted by FreePBX to the FXO?


FreePBX is just a GUI. It doesn’t do the call processing or media setup. Asterisk is in charge of all of that.

All of the things you ask are negotiated by SIP. Here is a link to some SIP call flows that may help you understand.


Pay attention to the SDP messaging slide. SDP actually assigns media capabilites and passes then sets up an RTP session for the media. SIP does not actually touch the media either.

Asterisk handles both SIP, RTP and RTCP protocols necessary for a SIP device to make a voice call.