[reSIProcate] rfc 3262 / PRACK implementation and test cases
Hi folks,
I've finally gotten around to finishing up the coding of PRACK and UPDATE for the UAC. I'm writing some test cases for it now. I haven't put in all of the glare conditions yet nor the cases where 183s get delivered out of order. Keep in mind, I have only implemented and tested the UAC portion of rfc 3262.
Case 1: Basic INV(offer) / 183 (answer)
Case 2: INV(offer) + 183 (answer) + UPDATE in each direction
Case 3: INV(offer) + 183 (answer) followed by 183 with no SDP
Case 4: INV(offer) + 183 (no SDP) + 200-INV(answer)
Case 5: INV + 183 + 200 (offer) + ACK(answer)
Case 6: INV + 183 (offer) + PRACK(answer)
Case 7: show retransmission of 183
Case 8: delay 200-PRACK to force PRACK retransmission
Case 1: Basic INV(offer) / 183 (answer)
Alice Bob | |
| |
| | |(1) INVITE(offer) |
|----------------------->| | |
| |
|(2) 183(answer) | |<-----------------------|
| | | |
|(3) PRACK(rseq=1) |
|----------------------->| | |
| | |(4) 200(PRACK) |
|<-----------------------|
| | | |
|(5) 200(INVITE) | |<-----------------------|
| |
| | |(6) ACK |
|----------------------->| | |
| |
| |Case 2: INV(offer) + 183 (answer) + UPDATE in each direction
Alice Bob
| |
| |
| |
|(1) INVITE(offer1) |
|----------------------->|
| |
| |
|(2) 183(answer1) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) 200-PRACK |
|<-----------------------|
| |
| |
|(5) UPDATE(offer2) |
|----------------------->|
| |
| |
|(6) 200-UPDATE(answer2) |
|<-----------------------|
| |
| |
|(7) UPDATE(offer3) |
|<-----------------------|
| |
| |
|(8) 200-UPDATE(answer3) |
|----------------------->|
| |
| |
|(9) 200-INVITE |
|<-----------------------|
| |
| |
|(10) ACK |
|----------------------->|
| |
| |
| |
| |
Case 3: INV(offer) + 183 (answer) followed by 183 with no SDP
Alice Bob
| |
| |
| |
|(1) INVITE(offer1) |
|----------------------->|
| |
| |
|(2) 183(answer2) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) 200(PRACK) |
|<-----------------------|
| |
| |
|(5) 183 |
|<-----------------------|
| |
| |
|(6) PRACK(rseq=2) |
|----------------------->|
| |
| |
|(7) 200(PRACK) |
|<-----------------------|
| |
| |
|(8) 183(offer2) |
|<-----------------------|
| |
| |
|(9) PRACK(rseq=3,answer2)
|----------------------->|
| |
| |
|(10) 200(PRACK) |
|<-----------------------|
| |
| |
|(11) 200(INVITE) |
|<-----------------------|
| |
| |
|(12) ACK |
|----------------------->|
| |
| |
| |
| |
Case 4: INV(offer) + 183 (no SDP) + 200-INV(answer)
Alice Bob
| |
| |
| |
|(1) INVITE(offer) |
|----------------------->|
| |
| |
|(2) 183(rseq=1) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) 200-PRACK |
|<-----------------------|
| |
| |
|(5) 200-INVITE(answer) |
|<-----------------------|
| |
| |
|(6) ACK |
|----------------------->|
| |
| |
| |
| |
Case 5: INV + 183 + 200 (offer) + ACK(answer)
Alice Bob
| |
| |
| |
|(1) INVITE |
|----------------------->|
| |
| |
|(2) 183(rseq=1) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) 200-PRACK |
|<-----------------------|
| |
| |
|(5) 200-INVITE(offer) |
|<-----------------------|
| |
| |
|(6) ACK(answer) |
|----------------------->|
| |
| |
| |
| |
Case 6: INV + 183 (offer) + PRACK(answer)
Alice Bob
| |
| |
| |
|(1) INVITE |
|----------------------->|
| |
| |
|(2) 183(rseq=1,offer) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1,answer)|
|----------------------->|
| |
| |
|(4) 200-PRACK |
|<-----------------------|
| |
| |
|(5) 200-INVITE |
|<-----------------------|
| |
| |
|(6) ACK |
|----------------------->|
| |
| |
| |
| |
Case 7: show retransmission of 183
| |
| |
| |
|(1) INVITE(offer) |
|----------------------->|
| |
| |
|(2) 183(answer) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) 183(answer) ! retransmission
|<-----------------------|
| |
| |
|(5) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(6) 200-PRACK |
|<-----------------------|
| |
| |
|(7) 200-INVITE |
|<-----------------------|
| |
| |
|(8) ACK |
|----------------------->|
| |
| |
| |
| |
Case 8: delay 200-PRACK to force PRACK retransmission
Alice Bob
| |
| |
| |
|(1) INVITE(offer) |
|----------------------->|
| |
| |
|(2) 183(answer) |
|<-----------------------|
| |
| |
|(3) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(4) PRACK(rseq=1) |
|----------------------->|
| |
| |
|(5) 200-PRACK |
|<-----------------------|
| |
| |
|(6) 200-INVITE |
|<-----------------------|
| |
| |
|(7) ACK |
|----------------------->|
| |
| |
| |
| |