As per your call flow, it seems that there is some problem with the
Authorization header in the REFER and IMO this issue has nothing to do
with REFER and BYE race-condition. There are many implementations
which send BYE immediately after sending REFER.
You may like to see RFC 5057 on multiple dialog usage.
IMO, the best practice would be that the UAC (If it is sending
mid-dialog REFER) should wait for either REFER 2xx response or NOTIFY
before sending BYE request. This would ensure that the usage count of
the dialog is incremented and would avoid REFER/BYE race in which
case, if BYE reached first, it would terminate the dialog.

If REFER is being sent out-of-dialog, then BYE can be send immediately
after REFER.

On Sat, Nov 1, 2008 at 1:52 PM, Igor Goncharovsky
<[EMAIL PROTECTED]> wrote:
> Hi, All!
>
> I am faced with error in one SIP realization and try to fix it. I am
> need to know what right behavior in that situation. Client call B2BUA,
> server answer and must redirect to another location. Server send REFER
> and for some reason send BYE after REFER and finish dialog.
>
> 1. Can UAS send BYE right after REFER sent?
> 2. If that happens what reply must be sent for 401 Unauth, received in
> response to REFER?
>
> This is current message flow:
>
>   192.168.1.120                  192.168.1.1
>   |                               |
> 1 : |U------------INVITE----------->|
> 2 : |<------100 Trying/INVITE------U|
> 3 : |<--------200 OK/INVITE--------U|
> 4 : |U-------------ACK------------->|
> 5 : |U------------INVITE----------->|
> 6 : |<------100 Trying/INVITE------U|
> 7 : |<--------200 OK/INVITE--------U|
> 8 : |U-------------ACK------------->|
> 9 : |U--------audio/PCMA(8)-------->|
> 10: |<------------REFER------------U|
> 11: |<-------------BYE-------------U|
> 12: |U-----401 Unauthorized/REFER-->|
> 13: |U-----401 Unauthorized/BYE---->|
> 14: |<-------------BYE-------------U|
> 15: |U----------200 OK/BYE--------->|
> 16: |<------------REFER------------U|
> 17: |U-----401 Unauthorized/REFER-->|
> 18: |<------------REFER------------U|
> 19: |U-----401 Unauthorized/REFER-->|
> 20: |<------------REFER------------U|
> 21: |U-----401 Unauthorized/REFER-->|
> 22: |<------------REFER------------U|
> 23: |U-----401 Unauthorized/REFER-->|
> 24: |<------------REFER------------U|
> 25: |U-----401 Unauthorized/REFER-->|
> 26: |<------------REFER------------U|
> 27: |U-----401 Unauthorized/REFER-->|
>
>
> --
> Best regards,
> Igor Goncharovsky
> _______________________________________________
> Sip-implementors mailing list
> [email protected]
> https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors
>
_______________________________________________
Sip-implementors mailing list
[email protected]
https://lists.cs.columbia.edu/cucslists/listinfo/sip-implementors

Reply via email to