Direct Media and Direct RTP Setup

Hi all,

I have try to make asterisk call direct client-to-client, but when I capture packets, rtp packet still go through Asterisk Server.

in sip.conf I have “directmedia=yes” and “directrtpsetup=yes”. any suggestion, how to make rtp packet direct client-to-client?
I read sip.conf from asterisk Developer Documentation, on that document wrote, “Asterisk by default tries to redirect the RTP media stream to go directly from the caller to the callee”. so, from this side, RTP packet will send direct caller-to-callee by default, is it right? but in my test, it is not.

should I modify other configuration?
Thank you,

BR,
Maimun

Direct media requires that you not use any feature that requires transcoding or monitoring of the RTP stream. Monitoring includes things like the T and t options on dial as well as Monitor itself. It also requires some cooperation from the end points.

Do you have example of sip.conf and extensions.conf for direct media (client-to-client)?
I need it, because I want to decrease delay VoIP over OpenVPN.
Thank before

A minimal sip.conf will allow direct media as directmedia=yes is the default setting. A Dial application with no options in a simple dialplan will be compatible. directrtpsetup is not default.

[sectionX]
allow=all
host=xxx.xxx.xxx.xxx

[sectionY]
allow=all
host=yyy.yyy.yyy.yyy

exten 1,1,Dial(SIP/SectionX)

[quote=“david55”]
[sectionX]
allow=all
host=xxx.xxx.xxx.xxx

[sectionY]
allow=all
host=yyy.yyy.yyy.yyy

exten 1,1,Dial(SIP/SectionX)[/quote]

how if I use VPN on both client?
let say, in SectionX. VPN IP Address is 10.99.88.6
in SectionY is 10.99.88.10

Should I put it in host?
so, configuration will be

[sectionX]
allow=all
host=10.99.88.6

[sectionY]
allow=all
host=10.99.88.10

is it right?

The fact that it is a properly configured VPN should be invisible to the clients, so you should be able to use VPN addresses as though they were local intranet ones.

Hi David,
Yesterday, I have update my asterisk server. and I have problem, in /etc/asterisk/sip.conf - all old configuration are disappear. and I cannot register new client from web based (Elastix). Simple way what I can do is restore from back up.

for VPN, I can connect client-to-client, I test it with ping.

for

[quote=“david55”]
[sectionX]
allow=all
host=xxx.xxx.xxx.xxx

[sectionY]
allow=all
host=yyy.yyy.yyy.yyy

exten 1,1,Dial(SIP/SectionX)[/quote]

should I put command above in my sip.conf? or to extensions.conf?

thanks

Hello,
This is very simple, in sip.conf you must define directmedia=yes on both clients that you want. then register them and test. If all things was good, you could see this log: “Remoutly…” or not you could see this log "locally…"
but in elastix, i test it but no answer. then you must add your extention directly in sip.conf not by web interface.
With regards