Directmedia and/or Directrtpsetup do not work

I am running Asterisk 1.8.7.1 on a FreePBX distro system with version 1.87.29.55-2.

My trunks are configured with directmedia=yes (I also tried directrtpsetup=yes) but I can’t get it to work with any of my providers. When I test with “rtp set debug on” I can always see the audio going through my machine.

Has anyone been able to actually enable directmedia in Asterisk (FreePBX)? If yes what are the exact parameters/conditions to use to get this to work? I spent at least a day on this trying to figure it out and can’t find anything in the forums or on the web that would help.

I changed my dial parameters to remove T,t.
I know that all endpoints must not use NAT and supposedly Asterisk uses directmedia by default if possible, however I have yet to see this happening. Help please!

bump

Your post doesn’t make any sense.

Why are you setting direct media options on the trunks? Unless you have public IP’s on your phones you can’t bypass Asterisk and have your endpoints establish RTP streams back to your provider.

If your endpoints are setup properly when calling within the same subnet they should be able to bypass Asterisk.

The benefit of this is for hosted systems calls from extensions to extensions would not take up bandwidth back to the hosted system.

I am not sure what your intentions are, please clarify your post.

I want to provide DID service to someone in Europe but my server is in Canada so latency is a problem. If Asterisk was only doing the signaling and the media is going direct then latency would not be an issue. My DID provider has a European POP so both endpoints would be in Europe.

My server has a public IP, the DID provider has a public IP and my customer’s Lync server also has a public IP. I thought at least the trunks could go directmedia but I guess I am wrong.

Still trying to use Asterisk as a carrier switch. You know I am going to be waiting at the pearly gates to keep bustin’ your balls?

Anyway, Asterisk can’t do this. SIP-Router (the new name for Open-SER and Kamailio now that they have kissed and made up) does exactly what you want.

I KNEW you were going to say this :slight_smile:

Actually, it can.

I managed to configure both directmedia and diretcrtpsetup and in both scenarios media didn’t go through Asterisk.

I disabled the NAT, set canreinvite and directtrpsetup to “yes” and my Asterisk (EC2 instance) is behaving like a signaling proxy. Media only goes from phoneA to phoneB locally.

If directmedia is used, DTMF mode must be set to info.

Yes, but it still blows compared to a real a switch. It’s getting better in 12. Not sure why you would shove a square peg into a round hole.