Question

I'm working in a SIP Project

I alredy set up the OUTBOUND_PROXY like

myProperties.setProperty("javax.sip.OUTBOUND_PROXY", "pcscf.infotelims.test:4060/udp");

But When I send the send a request with RouteHeader, The request ignor the OUTBOUND_PROXY and send it throught RouteHeader.

The route header is created like:

Address routeAddress = myAddressFactory.createAddress("sip:orig@scscf.infotelims.test:6060"); SipURI myrouteURI = (SipURI) routeAddress.getURI(); myrouteURI.setLrParam();
myRouteHeader = myHeaderFactory.createRouteHeader(myAddressFactory.createAddress(myrouteURI));

Was it helpful?

Solution

The behavior you describe matches the description for DefaultRouter with javax.sip.USE_ROUTER_FOR_ALL_URIS=false, as shown in this link. The Route header takes priority over the outbound proxy setting.

It looks like if you set the property above to true, all requests will go to the configured proxy address. Another approach would be to push two Route headers onto the request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top