Is it possible to set specific media ip for some specific channel?

I want to set specific media ip for some specific calls. I have tried the following methods, but none of them work.

I try it with sip.conf, not work

[mediauser1]
type=friend
username=xxx
secret=xxx
host=xxx.xxx.xxx.xxx
media_address=xxx.xxx.xxx.yyy

I try it with dialplan, not work too

[MediaUserPlan]
exten => _.,1,NoCDR
exten => n,Set(media_address=xxx.xxx.xxx.yyy)

Is there a way to achieve this special requirement?

No, it is not currently possible.

I assume you mean the remote media address. Why do you need to do it? If a service provider is documenting this, it is to allow you to configure firewalls properly; they will send the correct media address in the SDP.

Oh you meant i didn’t work in chan_sip either. It should work there, but that’s the extent of what I’ll state as I don’t support chan_sip. It changes the IP address we put in our SDP, it’s not for setting any remote information.

Can pjsip achieve this requirement? We are also considering upgrading our Asterisk (currently v13.38.3), will Asterisk support changing sip and sdp header information in dialplan in future versions? It would be even better if dialplan supports redis directly.

What is your use case?

Asterisk is an open source project, it ultimately does what people contribute and make it do. I don’t know if anyone will contribute such a thing in the future.

Media address can’t be set in the dialplan with PJSIP.

ok, thank you very much for your reply.

It is not very easy to explain, it is caused by our somewhat complex (chaotic) network environment, there should be other solutions to bypass this problem, I will think about it again, thank you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.