Make Asterisk Behave as a SIP proxy

Hi Guys,

As we already know, the traffic between 2 Sip Phones, goes through Asterisk server, since asterisk is B2BEU.
I am wondering if there is a way to make the 2 sip phones communicate directly after that the call has been established.

I have read a lot about re-invites and directrtpsetup and tried them all but nothing seems to work.

Some people suggested to use OpenSER as SIP registrar and Asterisk as a back end for it.

My question is:

Is it possible to make Asterisk behave as a SIP proxy and make the traffic between 2 sip phones be direct, or because of it’s architecture the traffic must pass through Asterisk server all the time?

If it is possible, HOW??

Best Regards,
Wassim Zaarour

[quote=“navlink”]As we already know, the traffic between 2 Sip Phones, goes through Asterisk server, since asterisk is B2BEU.[/quite]
AFAIK, this is not entirely true.

Enable canreinvite.

You can try using FreeSWITCH and it can be easily done using the bypass media option as shown below in an outbound dialplan. One word of caution, this option may cripple the MOH feature and among other services controlled by the PBX System.

You don’t need Freeswitch to transmit audio traffic (RTP traffic) directly between endpoints. As long as your network is configured properly, you can set the following in your sip.conf:

This will allow allow your endpoints (phones) to send audio packets back and fourth directly between themselves without taxing the Asterisk server. If either of the phones needs a service from Asterisk (like music on hold), then they will send a SIP re-invite to Asterisk, so that it can temporarily rejoin the audio path and play music or whatever, then once done they’ll go back to communicating directly between themselves again.

[quote=“rdegges”]You don’t need Freeswitch to transmit audio traffic (RTP traffic) directly between endpoints. As long as your network is configured properly, you can set the following in your sip.conf:

The above will ONLY work if the Asterisk PBX System is assigned with a public IP Address, AFAIK. Unfortunately, those who have their Asterisk PBX System behind a NAT/Firewall router with a private IP Address are out of luck. :frowning: On my FreeSWITCH PBX System where it resides behind a NAT/Firewall router along with my Asterisk PBX System, this is not the case.

[quote=“mazilo”][quote=“rdegges”]You don’t need Freeswitch to transmit audio traffic (RTP traffic) directly between endpoints. As long as your network is configured properly, you can set the following in your sip.conf:

The above will ONLY work if the Asterisk PBX System is assigned with a public IP Address, AFAIK. Unfortunately, those who have their Asterisk PBX System behind a NAT/Firewall router with a private IP Address are out of luck. :frowning: On my FreeSWITCH PBX System where it resides behind a NAT/Firewall router along with my Asterisk PBX System, this is not the case.[/quote]

That’s completely false. It can work on a local network just fine. You need to configure your router rules is all.

[quote=“rdegges”][quote=“mazilo”][quote=“rdegges”]You don’t need Freeswitch to transmit audio traffic (RTP traffic) directly between endpoints. As long as your network is configured properly, you can set the following in your sip.conf:

The above will ONLY work if the Asterisk PBX System is assigned with a public IP Address, AFAIK. Unfortunately, those who have their Asterisk PBX System behind a NAT/Firewall router with a private IP Address are out of luck. :frowning: On my FreeSWITCH PBX System where it resides behind a NAT/Firewall router along with my Asterisk PBX System, this is not the case.[/quote]

That’s completely false. It can work on a local network just fine. You need to configure your router rules is all.[/quote]First of all, you don’t need to do such a thing and leave your router untouched if you were to use FreeSWITCH. Secondly, if you know how to do this, then post here how to do this so that it will at least help the OP.