rport parameter to Via header filed

321 views
Skip to first unread message

Hubi

unread,
Jul 30, 2010, 6:17:58 AM7/30/10
to mobicents-public
Hi,

In order to register multiple clients to IMS from the same host I need
to add rport parameter (RFC3581) to Via header field.

Is it possibe to do this with Mobicents Sip Servlet? I've tried
setParameterableHeader() method but I cannot modify Via header because
it is a system header.

thanks

Hubi

Jean Deruelle

unread,
Jul 30, 2010, 6:45:16 AM7/30/10
to mobicent...@googlegroups.com
The problem is that the container add its own Via header field to the request when it’s actually sent outside the application server. 
Not sure how you can set parameters on the Via Header or give hints to the container to add this or other params to the Via header before it sends the request out...
Can you create an Issue regarding this ? I guess we could add a vendor specific extension or method for it. like SipServletRequest.setRPort(boolean)

Jean

Thilo Bangert

unread,
Jul 30, 2010, 8:59:55 AM7/30/10
to mobicent...@googlegroups.com
Jean Deruelle <jean.d...@gmail.com> said:
> The problem is that the container add its own Via header field to the
> request when it’s actually sent outside the application server.
> Not sure how you can set parameters on the Via Header or give hints to
> the container to add this or other params to the Via header before it
> sends the request out...
> Can you create an Issue regarding this ? I guess we could add a vendor
> specific extension or method for it. like
> SipServletRequest.setRPort(boolean)

if i understand rfc3581 correctly the rport should be added to all
requests, so perhaps a global configuration variable is perhaps a better
option.

aayush

unread,
Jul 30, 2010, 9:06:55 AM7/30/10
to mobicent...@googlegroups.com
rport needs to be added whenever the SIP client is behind a NAT so that the response is sent back on the source IP address. This happens on the User to Network interface (UNI).

I am not sure in which scenario the NAT is between the IMS core and MSS acting as a IMS-AS. Can you elaborate more on the network topology you are working in ? 

Jean Deruelle

unread,
Jul 30, 2010, 9:09:30 AM7/30/10
to mobicent...@googlegroups.com

3.  Client Behavior

   The client behavior specified here affects the transport processing
   defined in Section 18.1 of SIP (RFC 3261) [1].

   A client, compliant to this specification (clients include UACs and
   proxies), MAY include an "rport" parameter in the top Via header
   field value of requests it generates.  This parameter MUST have no
   value; it serves as a flag to indicate to the server that this
   extension is supported and requested for the transaction.
Since it is a "MAY include", I would rather have it fine grained so each application can decide to add it or not.
So at least per application, then need to check what makes more sense, app, app session, sip session or request granularity.

Jean

Jean Deruelle

unread,
Jul 30, 2010, 9:10:39 AM7/30/10
to mobicent...@googlegroups.com
 in this case, My understanding is that MSS is acting as UAC to IMS core.

Ferenc Hubicsák

unread,
Jul 30, 2010, 9:14:06 AM7/30/10
to mobicent...@googlegroups.com
Thansk for the answer!

Yes, MSS acts as UAC to IMS core, but I need more than one UAC from
the same IP address.

Hubi

Jean Deruelle

unread,
Jul 30, 2010, 9:15:48 AM7/30/10
to mobicent...@googlegroups.com
Is the same application acting as multiple UAC ?

Ferenc Hubicsák

unread,
Jul 30, 2010, 9:21:39 AM7/30/10
to mobicent...@googlegroups.com
Yes, the same application.
When JBOSS gets WS requests from clients, I have to impersonate each
of them as User Agent Clients and register them to the IMS.

Jean Deruelle

unread,
Jul 30, 2010, 9:26:11 AM7/30/10
to mobicent...@googlegroups.com
Can you file an issue http://code.google.com/p/mobicents/issues/entry?template=Mobicents%20Sip%20Servlets%20Template  and refer to this thread and specify which kind of granularity makes sense for your use case ?

Thanks
Jean

Ferenc Hubicsák

unread,
Jul 30, 2010, 9:30:20 AM7/30/10
to mobicent...@googlegroups.com
Ok, I will file an issue.

Thanks for the answers.
Hubi

Thilo Bangert

unread,
Jul 30, 2010, 10:16:13 AM7/30/10
to mobicent...@googlegroups.com
Jean Deruelle <jean.d...@gmail.com> said:
> 3. Client Behavior
>
> The client behavior specified here affects the transport processing
> defined in Section 18.1 of SIP (RFC 3261) [1].
>
> A client, compliant to this specification (clients include UACs and
> proxies), MAY include an "rport" parameter in the top Via header
> field value of requests it generates. This parameter MUST have no
> value; it serves as a flag to indicate to the server that this
> extension is supported and requested for the transaction.
>
> Since it is a "MAY include", I would rather have it fine grained so
> each application can decide to add it or not.
> So at least per application, then need to check what makes more sense,
> app, app session, sip session or request granularity.

ok. my (albeit unexpressed) point was, that whether or not to add rport
depends on the environment in which you deploy an app. i'd like to be able
to deploy the same application whether i'm behind NAT or not and leave the
impact that the NAT has to the configuration of the container. app
granularity may work fine as well.
just a thought though ;-)

thanks
kind regards

Thilo

Jean Deruelle

unread,
Jul 30, 2010, 10:25:46 AM7/30/10
to mobicent...@googlegroups.com
With app granularity, you could configure your app to use an init param from sip.xml that you would set to true or false depending on the target environment.
Would that cover your use case ? I'm not too fond of global container wide configurations when it can be avoided so trying to check if that would work as well.

Jean

Thilo Bangert

unread,
Jul 30, 2010, 11:50:20 AM7/30/10
to mobicent...@googlegroups.com
Jean Deruelle <jean.d...@gmail.com> said:
> With app granularity, you could configure your app to use an init param
> from sip.xml that you would set to true or false depending on the
> target environment.
> Would that cover your use case ?

yes. i believe so.

> I'm not too fond of global container
> wide configurations when it can be avoided so trying to check if that
> would work as well.

sure - no problem.

thanks
Thilo

Hatke Özlem

unread,
Oct 17, 2012, 2:51:29 AM10/17/12
to mobicent...@googlegroups.com, thilo....@gmail.com
Hi,

We try to add rport to Via header for registeration scenarios. I see that a new issue was raised to be set rport via SipServletRequest. But i could not find any setRPort method in it? Is it fix or not? Is there a way to do that? Could you please help us?

Thank you,
Hatke

30 Temmuz 2010 Cuma 15:59:55 UTC+3 tarihinde Thilo Bangert yazdı:

Frank

unread,
Oct 24, 2012, 5:11:32 AM10/24/12
to mobicent...@googlegroups.com, ferenc....@gmail.com
What is the status for this issue? Is there any way to add rport to Via header? Either with container config, application config or programatically?

Thanks!

Jean Deruelle

unread,
Oct 24, 2012, 6:05:38 AM10/24/12
to mobicent...@googlegroups.com, thilo....@gmail.com
The issue is here http://code.google.com/p/sipservlets/issues/detail?id=31, we didn't have the time to fix it yet though. 
It's scheduled for next release. Any contributions are welcomed

Jean

Jean Deruelle

unread,
Dec 20, 2012, 3:56:27 PM12/20/12
to mobicents-public, Thilo Bangert
This is now fix in git head and latest snapshot https://mobicents.ci.cloudbees.com/job/Mobicents-SipServlets-Release/
Please report back if that works OK.

Jean
Reply all
Reply to author
Forward
0 new messages