Enabling direct RTP streams between SIP phones in Asterisk

By default, asterisk installations will instruct SIP phones to pass their media streams (RTP streams) through the asterisk server itself. That is to say, the RTP stream would look something like this:

(phone 1) <—–> (asterisk) <——> (phone 2)

However, for performance reasons, especially in non-NAT environments, it is preferable to have the RTP streams pass directly between phones. That is to say, SIP control messages will still pass to/from the Asterisk server, but RTP streams will pass directly between phones like so:

(phone 1) <——–> (phone 2)

This is certainly possible on both freepbx and the older trixbox.

Trixbox

Freepbx:

  • Settings > Advanced Settings:
    • canreinvite: yes
    • sip nat: no
    • asterisk dial options: clear the options here
  • Settings > Asterisk sip settings:
    • nat : no
  • Applications > Extensions:
    • canreinvite: yes
    • nat: no

Ensure that no phones have an “outbound proxy” enabled in their SIP settings.

 

References:

http://www.voip-info.org/wiki/view/Asterisk+sip+canreinvite

http://www.dslreports.com/forum/r27852319-Can-I-get-Asterisk-to-not-proxy-media-

 

Advertisement
Privacy Settings

One thought on “Enabling direct RTP streams between SIP phones in Asterisk

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.