Could you, please, help me - I have a strange behaviour here - cipango routes INVITE to itself.
Situation is:
* app receive http-request to create outgoing INVITE
* it creates INVITE like:
protected void doGet(final HttpServletRequest httpServletRequest,
final HttpServletResponse httpServletResponse) throws ServletException, IOException {
try {
ConvergedHttpSession httpSession = (ConvergedHttpSession) httpServletRequest.getSession();
// ConferenceManagerFactory.getSipFactory() returns static field filled in overrided SipServlet::init()
SipServletRequest request = ConferenceManagerFactory.getSipFactory().createRequest(httpSession.getApplicationSession(),
"INVITE", "sip:o...@192.168.2.130", "sip:rem...@192.168.65.127");
request.send();
httpServletResponse.setStatus(204);
}catch (Exception e) {
logger.error("Error" , e);
throw new RuntimeException(e);
}
}
* INVITE is routed to cipango because of header:
Route: <sip:X-Cipango-...@192.168.2.130:5060;region=A...1;route-modifier=NO_ROUTE;suburi=sip:omp%40192.168.2.130>
I want to send INVITE directly to "sip:rem...@192.168.65.127". What is wrong with my code? Why cipango route INVITE to itself?
This is because the application router routes both incoming and outgoing requests. If you have a custom application router, you can test whether the request is incoming or outgoing. If you're using the default application router, the standard configuration from jsr289 is not very flexible but we added a system property to easily deactivate application router on outgoing requests (since it not needed most of the time). You can simply use:
java -Dorg.cipango.dar.routeOutgoingRequests=false -jar start.jar [config...]
or set it directly in cipango.xml as described here:
http://confluence.cipango.org/display/DOC/Configuring+and+Running+Cipango#ConfiguringandRunningCipango-RoutingOutgoingRequests
Regards,
Thomas
> --
> You received this message because you are subscribed to the Google Groups "cipango-users" group.
> To post to this group, send email to cipang...@googlegroups.com.
> To unsubscribe from this group, send email to cipango-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cipango-users?hl=en.
>
Thanks for your answer.
I'm not sure - is it a common container behaviour? I can't imagine a situation, when outgoing request should be routed back to sip container.
15.08.2011, 22:58, "Thomas" <tho...@cipango.org>:
Anyway, how I can turn off AR for outgoint requests when I use "mvn cipango:run"? I tried to add "<Set name="routeOutgoingRequests">false</Set>" into "Configuration" tag but it doen't work.
16.08.2011, 11:35, "Ilya Korolev" <ya-b...@ya.ru>:
Anyway, how I can turn off AR for outgoint requests when I use "mvn cipango:run"? I tried to add "<Set name="routeOutgoingRequests">false</Set>" into "Configuration" tag but it doen't work.
16.08.2011, 11:35, "Ilya Korolev" <ya-b...@ya.ru>:
<plugin> |
<groupId>org.cipango</groupId> |
<artifactId>cipango-maven-plugin</artifactId> |
<configuration> |
<systemProperties> |
<systemProperty> |
<name>org.cipango.dar.routeOutgoingRequests</name> |
<value>false</value> |
</systemProperty> |
</systemProperties> ... |