Hi, It seems to me that siproxd should add its own record-route if it sees an incoming record-route, otherwise BYE messages ( ACKs etc) are sent directly to whatever IP is in the record-route from the other UA bypassing siproxd, wouldn't this be bad?
Example from tethereal to/from sipphone.com, interesting lines marked with <---------****.
I made myself some thoughts about this topic earlier and came to the conclusion that siproxd should not add Record-Route headers:
- Outgoing requests: Siproxd does masquerade the local UA, so from the outside view (outbound network interface)
the host running siproxd seems to be the UA itself.
- Incoming Requests: As the local UA must be configured to use siproxd as Outbound Proxy, all outgoing traffic
WILL be sent to siproxd first. Adding Record-Route header for incoming requests is superfluous.
The above are conclusions of my understanding of an Outbound Proxy according to the SIP standard (however, I may be wrong with this).
I just confirmed that is works as expected with the grandstream budgetone-100 as UA and sipphone.com as registration service.
Regards,
/Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(BTW I think you have done an excellent job on sipproxd!)
Ok so it appears that the Microsoft SIP stack, (RTC) does the wrong thing (or actually what the SIP spec says to do), and sends the BYE directly to the other UA if there is a record-route. It has no way to be told that there is an outbound proxy, only a proxy. (I don't think out bound proxies are well defined in the SIP spec). Therefore it WILL send BYE to the ip specified in the record-route of the incoming request.
It does not surprise me that some UA's do one thing and others do another thing, given the looseness of the SIP spec.
Anyway without a record-route MS RTP will bypass siproxd as shown in my previous post, when it sees a record-route.
The fixin this case would be for sipproxd to add a record-route on the inbound leg, only if there is already a record-route there. If I have to continue using the RTC from MS, I'll see if I can modify siproxd to do that. (Unless you want to do it, but seeing as your UA works, I don't suppose it is necessary for you).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just to shw the state of confusion from 8.1.2 of RFC3261 says...
In particular, a UAC configured with an outbound proxy SHOULD
attempt to send the request to the location indicated in the first
Route header field value instead of adopting the policy of sending
all messages to the outbound proxy.
This ensures that outbound proxies that do not add Record-Route
header field values will drop out of the path of subsequent
requests. It allows endpoints that cannot resolve the first Route
URI to delegate that task to an outbound proxy.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any comments on the rfc361 para 8.1.2? It appears to specifically say that without record-route the outbound proxy should be by passed? which appears to differ from what you were saying.
quote :
" This ensures that outbound proxies that do not add Record-Route
header field values will drop out of the path of subsequent
requests. It allows endpoints that cannot resolve the first Route
URI to delegate that task to an outbound proxy."
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I though I DID write a reply to your previous posting, but it seems to have lost somewhere. What you point out is
right, of course. I've put the support for Record-Route headers on my TODO list. It will be one of the next things I'll do.
Regards,
/Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I just uploaded a new snapshot of siproxd that includes reduced support for Record-Route headers.
It just covers the case for incoming packets that have already any Record-Route headers present.
Could you give it a try and give some feedback?
/Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The new snapshot does not work for me. I use kphone + siproxd + sipgate.de (asterisk). The symptoms are: If the caller hangs up on an incoming call siproxd does not recieve a BYE message from asterisk (doublechecked with a packet sniffer to make sure).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm still working on this feature. Try the today snapshot again. If it still doesn't work, can you provide me with a debug log of siproxd an maybe a network trace (e.g. Ethereal)? It would also be nice to know where the Asterisk box does send the los BYE message.
Regards,
/Thomas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, It seems to me that siproxd should add its own record-route if it sees an incoming record-route, otherwise BYE messages ( ACKs etc) are sent directly to whatever IP is in the record-route from the other UA bypassing siproxd, wouldn't this be bad?
Example from tethereal to/from sipphone.com, interesting lines marked with <---------****.
Incoming from sipphone on extif:
Session Initiation Protocol
Status line: SIP/2.0 200 OK
Status-Code: 200
Message Header
Record-Route: <sip:xxxx@198.65.166.131;ftag=00068ED3-0005-0000-0000-000000000000 <-----*******
;lr>
Via: SIP/2.0/UDP 64.175.250.110:5060;branch=z9hG4bKd696dfbe21b49450f2b6121942168367
Via: SIP/2.0/UDP 192.168.3.110:10144
From: "xxxx" <sip:xxxx@proxy01.sipphone.com>;tag=00068ED3-0005-0000-0000-
000000000000;epid=b828099375
To: <sip:xxxx@proxy01.sipphone.com>;tag=9d6eccb6487c17aaef2c8e89c7eae0b4
Call-ID: 00068ED3-0006-0000-0000-000000000000@192.168.3.110
CSeq: 1 INVITE
Contact: sip:aa+xxxxx@198.65.166.136
Content-Type: application/sdp
Server: Sip EXpress router (0.8.13-dev-27-unixsock (i386/linux))
Content-Length: 131
..... etc
The record route is passed thrpugh to the internal network, and no new one is added by sipproxd.
Outgoing BYE on extif sent directly to sipphone as per the record-route therefore bypassing sipproxd:
Source: 64.175.250.110 (64.175.250.110)
Destination: 198.65.166.131 (198.65.166.131) <--------------*******
User Datagram Protocol, Src Port: 61137 (61137), Dst Port: sip (5060)
Source port: 61137 (61137)
Destination port: sip (5060)
Length: 519
Checksum: 0x7446 (correct)
Session Initiation Protocol
Request line: BYE sip:xxxx@198.65.166.131;ftag=00068ED3-0005-0000-0000-000000000000;
lr SIP/2.0
Method: BYE
Message Header
Via: SIP/2.0/UDP 192.168.3.110:10144
Max-Forwards: 70
From: "xxxx" <sip:xxxx@proxy01.sipphone.com>;tag=00068ED3-0005-0000-0000-
000000000000;epid=b828099375
To: <sip:xxxx@proxy01.sipphone.com>;tag=9d6eccb6487c17aaef2c8e89c7eae0b4
Call-ID: 00068ED3-0006-0000-0000-000000000000@192.168.3.110
CSeq: 2 BYE
Route: <sip:aa+xxxx@198.65.166.136>
User-Agent: Windows RTC/1.2
Content-Length: 0
Hi,
I made myself some thoughts about this topic earlier and came to the conclusion that siproxd should not add Record-Route headers:
- Outgoing requests: Siproxd does masquerade the local UA, so from the outside view (outbound network interface)
the host running siproxd seems to be the UA itself.
- Incoming Requests: As the local UA must be configured to use siproxd as Outbound Proxy, all outgoing traffic
WILL be sent to siproxd first. Adding Record-Route header for incoming requests is superfluous.
The above are conclusions of my understanding of an Outbound Proxy according to the SIP standard (however, I may be wrong with this).
I just confirmed that is works as expected with the grandstream budgetone-100 as UA and sipphone.com as registration service.
Regards,
/Thomas
Hi,
(BTW I think you have done an excellent job on sipproxd!)
Ok so it appears that the Microsoft SIP stack, (RTC) does the wrong thing (or actually what the SIP spec says to do), and sends the BYE directly to the other UA if there is a record-route. It has no way to be told that there is an outbound proxy, only a proxy. (I don't think out bound proxies are well defined in the SIP spec). Therefore it WILL send BYE to the ip specified in the record-route of the incoming request.
It does not surprise me that some UA's do one thing and others do another thing, given the looseness of the SIP spec.
Anyway without a record-route MS RTP will bypass siproxd as shown in my previous post, when it sees a record-route.
The fixin this case would be for sipproxd to add a record-route on the inbound leg, only if there is already a record-route there. If I have to continue using the RTC from MS, I'll see if I can modify siproxd to do that. (Unless you want to do it, but seeing as your UA works, I don't suppose it is necessary for you).
Just to shw the state of confusion from 8.1.2 of RFC3261 says...
In particular, a UAC configured with an outbound proxy SHOULD
attempt to send the request to the location indicated in the first
Route header field value instead of adopting the policy of sending
all messages to the outbound proxy.
This ensures that outbound proxies that do not add Record-Route
header field values will drop out of the path of subsequent
requests. It allows endpoints that cannot resolve the first Route
URI to delegate that task to an outbound proxy.
Any comments on the rfc361 para 8.1.2? It appears to specifically say that without record-route the outbound proxy should be by passed? which appears to differ from what you were saying.
quote :
" This ensures that outbound proxies that do not add Record-Route
header field values will drop out of the path of subsequent
requests. It allows endpoints that cannot resolve the first Route
URI to delegate that task to an outbound proxy."
Hi Jim,
I though I DID write a reply to your previous posting, but it seems to have lost somewhere. What you point out is
right, of course. I've put the support for Record-Route headers on my TODO list. It will be one of the next things I'll do.
Regards,
/Thomas
Excellent, thank you.
Hi,
I just uploaded a new snapshot of siproxd that includes reduced support for Record-Route headers.
It just covers the case for incoming packets that have already any Record-Route headers present.
Could you give it a try and give some feedback?
/Thomas
The new snapshot does not work for me. I use kphone + siproxd + sipgate.de (asterisk). The symptoms are: If the caller hangs up on an incoming call siproxd does not recieve a BYE message from asterisk (doublechecked with a packet sniffer to make sure).
I'm still working on this feature. Try the today snapshot again. If it still doesn't work, can you provide me with a debug log of siproxd an maybe a network trace (e.g. Ethereal)? It would also be nice to know where the Asterisk box does send the los BYE message.
Regards,
/Thomas
Ok, now it works again ... :)