28 views
Skip to first unread message

Ilya Korolev

unread,
Aug 15, 2011, 9:51:22 AM8/15/11
to cipang...@googlegroups.com
Hello

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?

Thomas

unread,
Aug 15, 2011, 2:58:46 PM8/15/11
to cipang...@googlegroups.com
Hi Ilya,

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.
>

Ilya Korolev

unread,
Aug 16, 2011, 3:35:27 AM8/16/11
to cipang...@googlegroups.com
Hi Thomas

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>:

Ilya Korolev

unread,
Aug 16, 2011, 3:55:30 AM8/16/11
to cipang...@googlegroups.com
I've read jsr - "15.2.2 Sending an Initial Request" and reasons are not clear to me still (

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>:

Ilya Korolev

unread,
Aug 16, 2011, 3:55:34 AM8/16/11
to cipang...@googlegroups.com
I've read jsr - "15.2.2 Sending an Initial Request" and reasons are not clear to me still (

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>:

Thomas

unread,
Aug 16, 2011, 5:08:41 AM8/16/11
to cipang...@googlegroups.com
Hi Ilya, 

You have an example of UAC application routing in 15.9.2 but I agree that this behavior is rarely used. Anyway, this is how it has been specified. We're going to provide in next cipango release a more flexible application router implementation than the default one. 

You may easily set a system property to use when using the maven-plugin, to do so add a few line to your pom.xml as follows:

<plugin>
<groupId>org.cipango</groupId>
<artifactId>cipango-maven-plugin</artifactId>
  <configuration>
<systemProperties>
<systemProperty>
      <name>org.cipango.dar.routeOutgoingRequests</name>
        <value>false</value>
    </systemProperty>
    </systemProperties> ...

Regards, 

Thomas

Ilya Korolev

unread,
Aug 16, 2011, 5:20:57 AM8/16/11
to cipang...@googlegroups.com
Thanks a lot!
16.08.2011, 13:08, "Thomas" <tho...@cipango.org>:
Reply all
Reply to author
Forward
0 new messages