Вопрос

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));

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top