Hi, I'm having problems getting SER to (loose) route requests from UDP to TCP. I'm not sure if the UA is at fault here or some SER config issue. SER receives an INVITE over TCP, record_route() is called and then the request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by SER. One has the transport=tcp parameter. Record-Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz When the UA sends the BYE to SER, it has the 2 Route headers like so (on a single line): Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,sip:xx.xx.xx.xx ;transport=tcp;r2=on;ftag=xyz;lr=on The SER script simply calls t_relay() in the loose_route section of the script. I expected t_relay() to relay the BYE via TCP, since the Route header has transport=tcp, but it sends the BYE via UDP instead. Anyone seen this problem before? Do I need to check for transport=tcp and call t_relay_to_tcp, rather than using t_relay after loose_route()? Mark
Someone please correct me if I'm wrong but from a quick look at the code in (rr and tm) there seems to be no connection between the transport= param in a Route header (directed at SER itself), and the transport selected by t_relay().
Is this by design or just a missing feature?
It would seem the only way to get t_relay() to use TCP from a loose routed request would be to add the transport=tcp to the RURI.
The code in tm and rr is not exactly easy to follow in a couple of hours so anyone who might understand how this is intended to work please send me an email. It looks to me as if SER is removing the Route headers if they are directed to "myself" and not preserving the transport=tcp information in any way that is used later by t_relay()
Thanks
On 9/28/05, Mark Aiken aiken.mark@gmail.com wrote:
Hi, I'm having problems getting SER to (loose) route requests from UDP to TCP. I'm not sure if the UA is at fault here or some SER config issue. SER receives an INVITE over TCP, record_route() is called and then the request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by SER. One has the transport=tcp parameter. Record-Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz When the UA sends the BYE to SER, it has the 2 Route headers like so (on a single line): Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,sip:xx.xx.xx.xx ;transport=tcp;r2=on;ftag=xyz;lr=on The SER script simply calls t_relay() in the loose_route section of the script. I expected t_relay() to relay the BYE via TCP, since the Route header has transport=tcp, but it sends the BYE via UDP instead. Anyone seen this problem before? Do I need to check for transport=tcp and call t_relay_to_tcp, rather than using t_relay after loose_route()? Mark
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP to TCP. I'm not sure if the UA is at fault here or some SER config issue.
SER receives an INVITE over TCP, record_route() is called and then the request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by SER. One has the transport=tcp parameter.
Record-Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so (on a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz;lr=on
The SER script simply calls t_relay() in the loose_route section of the script.
I expected t_relay() to relay the BYE via TCP, since the Route header has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for transport=tcp and call t_relay_to_tcp, rather than using t_relay after loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP to TCP. I'm not sure if the UA is at fault here or some SER config issue.
SER receives an INVITE over TCP, record_route() is called and then the request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by SER. One has the transport=tcp parameter.
Record-Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so (on a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of the script.
I expected t_relay() to relay the BYE via TCP, since the Route header has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for transport=tcp and call t_relay_to_tcp, rather than using t_relay after loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc
On 9/29/05, Mark Aiken aiken.mark@gmail.com wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP to TCP. I'm not sure if the UA is at fault here or some SER config issue.
SER receives an INVITE over TCP, record_route() is called and then the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so
(on
a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of
the
script.
I expected t_relay() to relay the BYE via TCP, since the Route header has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for transport=tcp and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
Serusers mailing list Serusers@iptel.org http://mail.iptel.org/mailman/listinfo/serusers
Serusers mailing list Serusers@iptel.org http://mail.iptel.org/mailman/listinfo/serusers
The problem is the other way. BYE from UDP to TCP. However I do see the problem now.
Thanks Klaus for pointing me to the URI as it that is indeed the problem.
The TCP UA has transport=tcp in the Contact: header and SER correctly leave that intact when forwarding to UDP. The UDP UA, when sending the loose routed BYE back to SER, does not correctly add the URI param from the Contact URI to the RURI.
I expected SER to not care about this because the rr params clearly have the transport=tcp coming back in the local route header. Its also my understanding thet URI params in Contact headers are optional so the UDP UA need not return them.
Anyway, I've fix my problem by adding the transport=tcp param to the RURI in the loose route section of the script prior to t_relay.
I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since there are many of these UAs in the field I needed to fix the problem.
I would like to know why transport=tcp is ignored in the Route header by SER. If the RURI must have transport=tcp then why bother having it in the Route header at all? I would think that information in the Route would trump lack of information in the RURI.
Mark
On 9/29/05, Cesc cesc.santa@gmail.com wrote:
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc
On 9/29/05, Mark Aiken aiken.mark@gmail.com wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion <klaus.mailinglists@pernau.at > wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP
to
TCP. I'm not sure if the UA is at fault here or some SER config
issue.
SER receives an INVITE over TCP, record_route() is called and then
the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by
SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so
(on
a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of
the
script.
I expected t_relay() to relay the BYE via TCP, since the Route
header
has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for
transport=tcp
and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
The two Route header fields belong to SER (because it inserted corresponding Record-Route header fields), thus SER would only remove them -- the two Route header fields will be not used when SER decides where to send the request (and what transport to use).
If there are no more Route header fields in the message then SER would forward to the URI specified in the Request-URI. If that URI contains no transport=tcp parameter then SER will forward over UDP.
That is the explanation of what happens -- but I am not saying that this is the correct behavior. SER inserts two Route header field because the transport protocol has changed (the request was received over TCP but then was forwarded over UDP). In this case SER should probably forward the request over TCP regardless of the transport suggested by the Request-URI (former Contact). But I have to think about it a bit more.
I created a bug (SER-78) in the bug tracking system at http://bugs.sip-router.org for now. But it is likely that this case (two Route header fields inserted by SER) is not handled properly.
Thanks for pointing this out.
Jan.
On 29-09-2005 11:52, Mark Aiken wrote:
The problem is the other way. BYE from UDP to TCP. However I do see the problem now.
Thanks Klaus for pointing me to the URI as it that is indeed the problem.
The TCP UA has transport=tcp in the Contact: header and SER correctly leave that intact when forwarding to UDP. The UDP UA, when sending the loose routed BYE back to SER, does not correctly add the URI param from the Contact URI to the RURI.
I expected SER to not care about this because the rr params clearly have the transport=tcp coming back in the local route header. Its also my understanding thet URI params in Contact headers are optional so the UDP UA need not return them.
Anyway, I've fix my problem by adding the transport=tcp param to the RURI in the loose route section of the script prior to t_relay.
I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since there are many of these UAs in the field I needed to fix the problem.
I would like to know why transport=tcp is ignored in the Route header by SER. If the RURI must have transport=tcp then why bother having it in the Route header at all? I would think that information in the Route would trump lack of information in the RURI.
Mark
On 9/29/05, Cesc cesc.santa@gmail.com wrote:
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc
On 9/29/05, Mark Aiken aiken.mark@gmail.com wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion <klaus.mailinglists@pernau.at > wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP
to
TCP. I'm not sure if the UA is at fault here or some SER config
issue.
SER receives an INVITE over TCP, record_route() is called and then
the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by
SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so
(on
a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of
the
script.
I expected t_relay() to relay the BYE via TCP, since the Route
header
has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for
transport=tcp
and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Jan Janak wrote:
The two Route header fields belong to SER (because it inserted corresponding Record-Route header fields), thus SER would only remove them -- the two Route header fields will be not used when SER decides where to send the request (and what transport to use).
If there are no more Route header fields in the message then SER would forward to the URI specified in the Request-URI. If that URI contains no transport=tcp parameter then SER will forward over UDP.
That is the explanation of what happens -- but I am not saying that this is the correct behavior. SER inserts two Route header field because the transport protocol has changed (the request was received over TCP but then was forwarded over UDP). In this case SER should probably forward the request over TCP regardless of the transport suggested by the Request-URI (former Contact). But I have to think about it a bit more.
I'm not sure about this. If the client sends a request via TCP does not imply that the client wants to receive requests via TCP. If it also wants to receive via TCP, the client has to make this clear by using transport=tcp in the Contact: URI.
klaus
I created a bug (SER-78) in the bug tracking system at http://bugs.sip-router.org for now. But it is likely that this case (two Route header fields inserted by SER) is not handled properly.
Thanks for pointing this out.
Jan.
On 29-09-2005 11:52, Mark Aiken wrote:
The problem is the other way. BYE from UDP to TCP. However I do see the problem now.
Thanks Klaus for pointing me to the URI as it that is indeed the problem.
The TCP UA has transport=tcp in the Contact: header and SER correctly leave that intact when forwarding to UDP. The UDP UA, when sending the loose routed BYE back to SER, does not correctly add the URI param from the Contact URI to the RURI.
I expected SER to not care about this because the rr params clearly have the transport=tcp coming back in the local route header. Its also my understanding thet URI params in Contact headers are optional so the UDP UA need not return them.
Anyway, I've fix my problem by adding the transport=tcp param to the RURI in the loose route section of the script prior to t_relay.
I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since there are many of these UAs in the field I needed to fix the problem.
I would like to know why transport=tcp is ignored in the Route header by SER. If the RURI must have transport=tcp then why bother having it in the Route header at all? I would think that information in the Route would trump lack of information in the RURI.
Mark
On 9/29/05, Cesc cesc.santa@gmail.com wrote:
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc
On 9/29/05, Mark Aiken aiken.mark@gmail.com wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion <klaus.mailinglists@pernau.at > wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP
to
TCP. I'm not sure if the UA is at fault here or some SER config
issue.
SER receives an INVITE over TCP, record_route() is called and then
the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by
SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so
(on
a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of
the
script.
I expected t_relay() to relay the BYE via TCP, since the Route
header
has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for
transport=tcp
and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
At 07:19 PM 9/29/2005, Jan Janak wrote:
The two Route header fields belong to SER (because it inserted corresponding Record-Route header fields), thus SER would only remove them -- the two Route header fields will be not used when SER decides where to send the request (and what transport to use).
If there are no more Route header fields in the message then SER would forward to the URI specified in the Request-URI. If that URI contains no transport=tcp parameter then SER will forward over UDP.
That is the explanation of what happens -- but I am not saying that this is the correct behavior. SER inserts two Route header field because the transport protocol has changed (the request was received over TCP but then was forwarded over UDP). In this case SER should probably forward the request over TCP regardless of the transport suggested by the Request-URI (former Contact). But I have to think about it a bit more.
I beg to disagree. Route specifies how to get to SER (and is two-fold to make sure SER is reachable from both sides), Contact dictates how to get to the next hop. Contacts may even get updated during dialog duration.
-jiri
I created a bug (SER-78) in the bug tracking system at http://bugs.sip-router.org for now. But it is likely that this case (two Route header fields inserted by SER) is not handled properly.
Thanks for pointing this out.
Jan.
On 29-09-2005 11:52, Mark Aiken wrote:
The problem is the other way. BYE from UDP to TCP. However I do see the problem now.
Thanks Klaus for pointing me to the URI as it that is indeed the problem.
The TCP UA has transport=tcp in the Contact: header and SER correctly leave that intact when forwarding to UDP. The UDP UA, when sending the loose routed BYE back to SER, does not correctly add the URI param from the Contact URI to the RURI.
I expected SER to not care about this because the rr params clearly have the transport=tcp coming back in the local route header. Its also my understanding thet URI params in Contact headers are optional so the UDP UA need not return them.
Anyway, I've fix my problem by adding the transport=tcp param to the RURI in the loose route section of the script prior to t_relay.
I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since there are many of these UAs in the field I needed to fix the problem.
I would like to know why transport=tcp is ignored in the Route header by SER. If the RURI must have transport=tcp then why bother having it in the Route header at all? I would think that information in the Route would trump lack of information in the RURI.
Mark
On 9/29/05, Cesc cesc.santa@gmail.com wrote:
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc
On 9/29/05, Mark Aiken aiken.mark@gmail.com wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, Klaus Darilion <klaus.mailinglists@pernau.at > wrote:
Hi Mark!
I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP.
klaus
Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests from UDP
to
TCP. I'm not sure if the UA is at fault here or some SER config
issue.
SER receives an INVITE over TCP, record_route() is called and then
the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route headers added by
SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route headers like so
(on
a single line):
Route: sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on,<sip:xx.xx.xx.xx
;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route section of
the
script.
I expected t_relay() to relay the BYE via TCP, since the Route
header
has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for
transport=tcp
and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
-- Jiri Kuthan http://iptel.org/~jiri/
Mark Aiken wrote:
The problem is the other way. BYE from UDP to TCP. However I do see the problem now.
Thanks Klaus for pointing me to the URI as it that is indeed the problem.
The TCP UA has transport=tcp in the Contact: header and SER correctly leave that intact when forwarding to UDP. The UDP UA, when sending the loose routed BYE back to SER, does not correctly add the URI param from the Contact URI to the RURI.
I expected SER to not care about this because the rr params clearly have the transport=tcp coming back in the local route header. Its also my
no, as described in my previous email
understanding thet URI params in Contact headers are optional so the UDP UA need not return them.
They are not. Because as you see in your setup it will break things!
Anyway, I've fix my problem by adding the transport=tcp param to the RURI in the loose route section of the script prior to t_relay.
That's a bad hack. Try to get a fix for the broken UA.
I dont know who is at fault here - the TCP UA, the UDP UA, or SER but since there are many of these UAs in the field I needed to fix the problem.
Sounds like the UDP UA is broken.
I would like to know why transport=tcp is ignored in the Route header by SER. If the RURI must have transport=tcp then why bother having it in the Route header at all? I would think that information in the Route would trump lack of information in the RURI.
as described, it tells how to reach the hop targeted in the route header, not the next hop. See the following example: UA1 has the contact: ip;t(ransport)=xxx
UA1 proxy1 proxy2 proxy3 proxy4 UA2 ip;t=xxx rr;t=TCP rr;t=UDP rr;t=SCTP rr;t=UDP
If now UA2 sends a BYE, we have the following protocols:
<--UDP-- <--SCTP-- <--UDP-- <----TCP------ <----XXX-----
hope this helps. klaus
Mark
On 9/29/05, *Cesc* <cesc.santa@gmail.com mailto:cesc.santa@gmail.com> wrote:
I would say that as long as your UA's contact header registered in ser specifies UDP, t_relay should do the trick when receiving the bye (tcp) and relaying it (udp). It works in my lab :) I cannot be more specific as i am away now ... sorry. Cesc On 9/29/05, *Mark Aiken* < aiken.mark@gmail.com <mailto:aiken.mark@gmail.com>> wrote: HI, The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me. I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP. There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one. Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost). For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests. This seems like a lot of work in the .cfg file which is better done in rr/tm module. I still think I must be doing something wrong as SER should handle this automatically for loose routed requests. Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE? Mark On 9/29/05, *Klaus Darilion* <klaus.mailinglists@pernau.at <mailto:klaus.mailinglists@pernau.at>> wrote: Hi Mark! I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP. klaus Mark Aiken wrote:
Hi,
I'm having problems getting SER to (loose) route requests
from UDP to
TCP. I'm not sure if the UA is at fault here or some SER
config issue.
SER receives an INVITE over TCP, record_route() is called
and then the
request is relayed via UDP (t_relay_to_udp) to the UA. The INVITE relayed to the UDP UA now has 2 Record-Route
headers added by
SER. One has the transport=tcp parameter.
Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> Record-Route: sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz
When the UA sends the BYE to SER, it has the 2 Route
headers like so (on
a single line):
Route:
<sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on>,<sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz;lr=on>
The SER script simply calls t_relay() in the loose_route
section of the
script.
I expected t_relay() to relay the BYE via TCP, since the
Route header
has transport=tcp, but it sends the BYE via UDP instead.
Anyone seen this problem before? Do I need to check for
transport=tcp
and call t_relay_to_tcp, rather than using t_relay after
loose_route()?
Mark
------------------------------------------------------------------------
Serusers mailing list serusers@lists.iptel.org mailto:serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________ Serusers mailing list serusers@lists.iptel.org <mailto:serusers@lists.iptel.org> http://lists.iptel.org/mailman/listinfo/serusers
On 9/30/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
That's a bad hack. Try to get a fix for the broken UA.
If only that were an option. I will send them a bug report but its unlikely to be fixed soon and there are many, many in the field with many more deployed each day. I am only thankful SER gives me the tools to fix this problem. I think the problem with UAs being non-compliant with sutler aspects of the 'standard' RFCs is only going to become worse, as price pressures force the cost of SIP based CPE down. When John Wang discovers how to get a 256 byte SIP stack running in a .50c PIC from his garage in Taiwan, I doubt he will be to worried about Contact URI parameters. many thanks for your help on this. Mark
FYI - I just tested Asterisk 1.2 cvs HEAD and it also has this bug. I've got several WiFi phones that also have the problem. Seems to be an epidemic. Mark
On 9/30/05, Mark Aiken aiken.mark@gmail.com wrote:
On 9/30/05, Klaus Darilion klaus.mailinglists@pernau.at wrote:
That's a bad hack. Try to get a fix for the broken UA.
If only that were an option. I will send them a bug report but its unlikely to be fixed soon and there are many, many in the field with many more deployed each day. I am only thankful SER gives me the tools to fix this problem. I think the problem with UAs being non-compliant with sutler aspects of the 'standard' RFCs is only going to become worse, as price pressures force the cost of SIP based CPE down. When John Wang discovers how to get a 256 byte SIP stack running in a .50c PIC from his garage in Taiwan, I doubt he will be to worried about Contact URI parameters. many thanks for your help on this. Mark
Please report the Asterisk bug at bugs.digium.com
regards klaus
Mark Aiken wrote:
FYI - I just tested Asterisk 1.2 cvs HEAD and it also has this bug. I've got several WiFi phones that also have the problem. Seems to be an epidemic.
Mark
On 9/30/05, *Mark Aiken* <aiken.mark@gmail.com mailto:aiken.mark@gmail.com> wrote:
On 9/30/05, *Klaus Darilion* < klaus.mailinglists@pernau.at <mailto:klaus.mailinglists@pernau.at>> wrote: That's a bad hack. Try to get a fix for the broken UA. If only that were an option. I will send them a bug report but its unlikely to be fixed soon and there are many, many in the field with many more deployed each day. I am only thankful SER gives me the tools to fix this problem. I think the problem with UAs being non-compliant with sutler aspects of the 'standard' RFCs is only going to become worse, as price pressures force the cost of SIP based CPE down. When John Wang discovers how to get a 256 byte SIP stack running in a .50c PIC from his garage in Taiwan, I doubt he will be to worried about Contact URI parameters. many thanks for your help on this. Mark
I still think this a problem of the caller's client.
As long as there is no transport=tcp parameter in the Contact: header of the INVITE ser will use UDP (as the standard says). The transport parameter in record route defines how to reach the hop targeted in the route header, not the next one.
Thus, the callee will send the BYE request to ser using UDP. Ser will remove its own route headers. Then, ser will route acording the request URI in the BYE message (which is the contact URI from the INVITE) and will use the transport of the request URI.
klaus
Mark Aiken wrote:
HI,
The original RURI does have but when SER relays to UDP UA it places transport=tcp in the Record-Route but not in the RURI to the UDP UA, which seems correct to me.
I guess the problem is when using relay_to_udp on an INVITE from a TCP UA, to force SER to act as a TCP to UDP proxy, SER cant handle loose routing new requests in the same dialog back via TCP.
There seems to be no code in SER to handle this, from the small bits I've looked at anyway. The information is in the rr params that SER added, but SER just ignores the information on loose routed requests when the route is a local one.
Does anyone know if there is some special trick to get SER to handle TCP<->UDP conversion of loose routed requests? Should the UA be adding the transport=tcp from the rr param to the RURI of the BYE ( I would not think so, since its the 2nd route added by SER anyway, not the topmost).
For SER to work as a TCP<=>UDP proxy, one needs to "search" for the transport=tcp, somehow be sure its in a local route header, and add the transport=tcp to the uri before calling t_relay, I guess. I haven't tried that yet. All this for loose routed requests.
This seems like a lot of work in the .cfg file which is better done in rr/tm module.
I still think I must be doing something wrong as SER should handle this automatically for loose routed requests.
Is using relay_to_udp not the proper way to force TCP to UDP proxy of an INVITE?
Mark
On 9/29/05, *Klaus Darilion* <klaus.mailinglists@pernau.at mailto:klaus.mailinglists@pernau.at> wrote:
Hi Mark! I do not know it exactly, but I think the important thing is the contact header URI of the INVITE. Does it contain a transport=tcp parameter? Otherwise, ser is correct when using UDP. klaus Mark Aiken wrote: > Hi, > > I'm having problems getting SER to (loose) route requests from UDP to > TCP. I'm not sure if the UA is at fault here or some SER config issue. > > SER receives an INVITE over TCP, record_route() is called and then the > request is relayed via UDP (t_relay_to_udp) to the UA. The > INVITE relayed to the UDP UA now has 2 Record-Route headers added by > SER. One has the transport=tcp parameter. > > Record-Route: <sip: xx.xx.xx.xx;r2=on;ftag=xyz;lr=on> > Record-Route: <sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz> > > When the UA sends the BYE to SER, it has the 2 Route headers like so (on > a single line): > > Route: > <sip:xx.xx.xx.xx;r2=on;ftag=xyz;lr=on>,<sip:xx.xx.xx.xx;transport=tcp;r2=on;ftag=xyz;lr=on> > > The SER script simply calls t_relay() in the loose_route section of the > script. > > I expected t_relay() to relay the BYE via TCP, since the Route header > has transport=tcp, but it sends the BYE via UDP instead. > > Anyone seen this problem before? Do I need to check for transport=tcp > and call t_relay_to_tcp, rather than using t_relay after loose_route()? > > Mark > > > ------------------------------------------------------------------------ > > _______________________________________________ > Serusers mailing list > serusers@lists.iptel.org <mailto:serusers@lists.iptel.org> > http://lists.iptel.org/mailman/listinfo/serusers