[sip-comm-dev] Problem when SC sends a BYE - Record-Route header missing


#1

One system in my test setup is a Windows XP with very strict
firewall setting, thus I have to use a SIP proxy that
sets Record-Route. The INVITE, RINGING, ACK, etc all contain
the Recor-Route headers (refer to attachement).

When I close a session (hangup) SC sends a BYE but this BYE
does not contain a Record-Route header field as required
by RFC 3261 and the proxy rejects the BYE with 404 - not found.

The dump (text file) of the relevant packets from wireshark is
attached to this mail.

The SC is a fairly current SVN version (updated during last week),
and I know for sure that it once worked (at leat before FOSDEM).

Regards,
Werner

SC-404.txt (5.76 KB)


#2

Hey Werner,

Werner Dittmann wrote:

One system in my test setup is a Windows XP with very strict
firewall setting, thus I have to use a SIP proxy that
sets Record-Route. The INVITE, RINGING, ACK, etc all contain
the Recor-Route headers (refer to attachement).

When I close a session (hangup) SC sends a BYE but this BYE
does not contain a Record-Route header field as required
by RFC 3261 and the proxy rejects the BYE with 404 - not found.

The dump (text file) of the relevant packets from wireshark is
attached to this mail.

Hmm. Here's what RFC3261 says about this:

   If the route set is not empty, and the first URI in the route set
   contains the lr parameter (see Section 19.1.1), the UAC MUST place
   the remote target URI into the Request-URI and MUST include a Route
   header field containing the route set values in order, including all
   parameters.

The BYE request in the dump that you attached seems to contain the route
header as expected. As for a Record-Route header with an equivalent
value, I am under the impression that these are only added by proxies.
Am I missing sth?

The SC is a fairly current SVN version (updated during last week),

It might be worth noting the release number (i.e. rWXYZ) so that we have
it for the record in case we later turn this into an issue (besides it
would be shorter to use that :wink: )

and I know for sure that it once worked (at leat before FOSDEM).

Last time we upgraded jain-sip was in r5150 (March 18) so that might
have introduced some changes in the sip behavior as your "before
FOSDEM" experiments must have taken place with a release earlier than
5150 and your last week update was definitely from after that. That
might indeed be the key to your issues but I wonder whether it is really
the record-route header since I don't remember seeing changes on this
part.

Cheers
Emil

···

Regards,
Werner

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#3

Emil,

Emil Ivov schrieb:

Hey Werner,

Hmm. Here's what RFC3261 says about this:

   If the route set is not empty, and the first URI in the route set
   contains the lr parameter (see Section 19.1.1), the UAC MUST place
   the remote target URI into the Request-URI and MUST include a Route
   header field containing the route set values in order, including all
   parameters.

The BYE request in the dump that you attached seems to contain the route
header as expected. As for a Record-Route header with an equivalent
value, I am under the impression that these are only added by proxies.
Am I missing sth?

Record-Route header is also send back by the clients during session setup,
in 200 OK for example.

When I perform a hangup from the calling party it looks ok (need to do
some more detailled checks to verify this), SC shows "disconnected" but does
not remove its call participant window after some seconds. Need to close it
manually. But this is an unrelated problem, maybe I need to install the very
latest JDK.

If I do a hangup at the called party then it does not work somehow. The
BYE contains a Route header. Only in this case Kamailio does not find
the calling party to forward the BYE and returns a 404. Seems that I
need to digg into the Kamailio config file again *sigh* to figure out what's
wrong there.

The SC is a fairly current SVN version (updated during last week),

It might be worth noting the release number (i.e. rWXYZ) so that we have
it for the record in case we later turn this into an issue (besides it
would be shorter to use that :wink: )

Noted :slight_smile:

and I know for sure that it once worked (at leat before FOSDEM).

Last time we upgraded jain-sip was in r5150 (March 18) so that might
have introduced some changes in the sip behavior as your "before
FOSDEM" experiments must have taken place with a release earlier than
5150 and your last week update was definitely from after that. That
might indeed be the key to your issues but I wonder whether it is really
the record-route header since I don't remember seeing changes on this
part.

Maybe I just tested the hangup from the calling party and that seems to
work somehow.

Regards,
Werner

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#4

Emil,

If I do a hangup at the called party then it does not work somehow. The
BYE contains a Route header. Only in this case Kamailio does not find
the calling party to forward the BYE and returns a 404. Seems that I
need to digg into the Kamailio config file again *sigh* to figure out what's
wrong there.

To implement the registrar and proxy I use Kamailio that
uses port 5070 to be able to run with SC on the same system.

Because I use a non-DNS environment and using local addresses only I
need to introduce the domain (IP address in this case) to Kamailio.
This is done using "alias". In the config file I used the following
statement:

alias=172.16.97.1

With this definition registration works, but some other stuff didn't work
it seems.

Digging into Kamailio's doc (wiki) gave me a hint:

<quote>
alias

Parameter to set alias hostnames for the server. It can be set many times,
each value being added in a list to match the hostname when 'myself' is checked.

It is necessary to include the port (the port value used in the “port=” or
“listen=” defintions) in the alias definition otherwise the loose_route()
function will not work as expected for local forwards

Example of usage:

    alias:5060=other.domain.com
    alias:5060=another.domain.com

</quote>

Following this advise I modified the alias to read:

alias=172.16.97.1:5070

Now SC can't register anymore. Wirshark tells me that request URI of the
REGISTER request looks like this: sip:100@172.16.97.1 and is missing
the :5070 and thus Kamailio refuses to register because the URI
match fails (uri == myself) .

Trying to add a new account an manually add the :5070 after the IP address
faild. Appending the port number (:5070) was possible, the advanced tab
showed 172.16.97.1:5070 in the Registrar and Proxy address field, the
portnumbers of both were 5060.

After I was done with this and hit "register" at the last account page
SC reported:

     [java] 18:37:44.053 SCHWERWIEGEND: impl.protocol.sip.ProtocolProviderServiceSipImpl.initOutboundProxy().1632 172.16.97.1:5070 appears to be an either
invalid or inaccessible address.
     [java] java.net.UnknownHostException: 172.16.97.1:5070

Thus I couldn't modifiy the request URI in SC to include to port number.

Solution proposal:
Allow to set up a domian name (or IP address) to include a port number.
The this can be done on a case by case basis depending o the requirements
of the registrar. I had a short look into the code and as far as I can
see this modification is not straightforward.

I had the same issue with Twinkle, but twinkle allows me to edit the
domain and I appended :5070 and thus twinkle's request URI for the
REGISTER request looks like this: sip:100@172.16.97.1:5070 and Kamailio
happily registers.

BTW, where in SC can I modify/set SC's standard SIP port numbers? Then I
could try to setup some other tests.

Regards,
Werner

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#5

Hey Werner,

Sorry for not answering earlier. Could you please open an issue for
this? We'll try to handle it in the following week or two.

Thanks
Emil

Werner Dittmann wrote:

···

Emil,

If I do a hangup at the called party then it does not work somehow. The
BYE contains a Route header. Only in this case Kamailio does not find
the calling party to forward the BYE and returns a 404. Seems that I
need to digg into the Kamailio config file again *sigh* to figure out what's
wrong there.

To implement the registrar and proxy I use Kamailio that
uses port 5070 to be able to run with SC on the same system.

Because I use a non-DNS environment and using local addresses only I
need to introduce the domain (IP address in this case) to Kamailio.
This is done using "alias". In the config file I used the following
statement:

alias=172.16.97.1

With this definition registration works, but some other stuff didn't work
it seems.

Digging into Kamailio's doc (wiki) gave me a hint:

<quote>
alias

Parameter to set alias hostnames for the server. It can be set many times,
each value being added in a list to match the hostname when 'myself' is checked.

It is necessary to include the port (the port value used in the “port=” or
“listen=” defintions) in the alias definition otherwise the loose_route()
function will not work as expected for local forwards

Example of usage:

    alias:5060=other.domain.com
    alias:5060=another.domain.com

</quote>

Following this advise I modified the alias to read:

alias=172.16.97.1:5070

Now SC can't register anymore. Wirshark tells me that request URI of the
REGISTER request looks like this: sip:100@172.16.97.1 and is missing
the :5070 and thus Kamailio refuses to register because the URI
match fails (uri == myself) .

Trying to add a new account an manually add the :5070 after the IP address
faild. Appending the port number (:5070) was possible, the advanced tab
showed 172.16.97.1:5070 in the Registrar and Proxy address field, the
portnumbers of both were 5060.

After I was done with this and hit "register" at the last account page
SC reported:

     [java] 18:37:44.053 SCHWERWIEGEND: impl.protocol.sip.ProtocolProviderServiceSipImpl.initOutboundProxy().1632 172.16.97.1:5070 appears to be an either
invalid or inaccessible address.
     [java] java.net.UnknownHostException: 172.16.97.1:5070

Thus I couldn't modifiy the request URI in SC to include to port number.

Solution proposal:
Allow to set up a domian name (or IP address) to include a port number.
The this can be done on a case by case basis depending o the requirements
of the registrar. I had a short look into the code and as far as I can
see this modification is not straightforward.

I had the same issue with Twinkle, but twinkle allows me to edit the
domain and I appended :5070 and thus twinkle's request URI for the
REGISTER request looks like this: sip:100@172.16.97.1:5070 and Kamailio
happily registers.

BTW, where in SC can I modify/set SC's standard SIP port numbers? Then I
could try to setup some other tests.

Regards,
Werner

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net