Request-URI manipulation

Anyway to manipulate Request-URI in Asterisk? Or does that have to be done at OpenSIP?

Thx!

Specify it in the Dial address. Note that only SIP URIs are supported.

To be honest I don’t really understand the question. Asterisk is a back to back user agent, so the outgoing request URI is unrelated to the incoming request URI, except in as much as what you explicitly do in the dialplan makes them similar.

Hello Dave,

Thx again. Ya probably question too vague. So this is what happen and what I am trying to do.

We were using Asterisk server for both registration and handling the media. Now we put a OpenSIPS in front (as a load balancer to load balance multiple asterisk servers). And OpenSIPs is also handling the registration.

Thus, before, I was able to do:

DIAL(SIP/CHRIS101/2135551212,60)

Thus the peer equipment “CHRIS101” can see the inbound call carry a 2135551212 DNIS and route accordingly.

Obviously, now I have OpenSIPS in front, thus I have to do

DIAL(SIP/opensips/CHRIS101,60)

Because OpenSIP will only recognize CHRIS101 the registered user and not “2135551212”. thus I can to put 2135551212@ip_address in the Request_URI so that when the INVITE gets to the end device (CHRIS101) it can see the 2135551212 and route accordingly.

So what I mean is that I need to have the TO-URI different from Request-URI.

TO-URI needs to be CHRIS101@ip so that OpenSIP can route. And then Request-URI needs to be 2135551212@ip so that the far end device can route.

Thank you!

I haven’t used it, but there is an option to define an outbound proxy.

The proxy should be routing on the request URI, not the To URI.

There is some independent control of To using ! in the dialstring. I think that may not allow control of the domain.