Just to avoid any confusion, the doc should be updated with a diagram:

For a successful call we have:
```
UAC       proxy       UAS     presence server
 |--INVITE->|          |            |
 |<-100-----|--INVITE->|            |
 |          |--PUBLISH(trying)----->|
 |          |<-100-----|            |
 |          |          |            |
 |          |<-18x-----|            |
 |<-18x-----|--PUBLISH(early)------>|
 |          |          |            |
 |          |<-200-----|            |
 |<-200-----|--PUBLISH(confirmed)-->|
 |--ACK---->|          |            |
 |          |--ACK---->|            |
 |          |          |            |
```

 If we choose to avoid the "trying" state, then "early" will be triggered on 
the first 18x provisional reply.
Something like this:
```
UAC       proxy       UAS     presence server
 |--INVITE->|          |            |
 |<-100-----|--INVITE->|            |
 |          |<-100-----|            |
 |          |          |            |
 |          |<-18x-----|            |
 |<-18x-----|--PUBLISH(early)------>|
 |          |          |            |
 |          |<-200-----|            |
 |<-200-----|--PUBLISH(confirmed)-->|
 |--ACK---->|          |            |
 |          |--ACK---->|            |
 |          |          |            |
```

The issue is with rejected calls.  If we don't have a 18x provisional reply, 
then we have this:
```
UAC       proxy       UAS     presence server
 |--INVITE->|          |            |
 |<-100-----|--INVITE->|            |
 |          |--PUBLISH(trying)----->|
 |          |<-100-----|            |
 |          |          |            |
 |          |<-456xx---|            |
 |          |--PUBLISH(terminated)->|
 |<-456xx---|--ACK---->|            |
 |--ACK---->|          |            |
```

If we don't have a 18x provisional reply and we avoid the "trying" state, then 
we don't have any PUBLISH at all:
```
UAC       proxy       UAS     presence server
 |--INVITE->|          |            |
 |<-100-----|--INVITE->|            |
 |          |<-100-----|            |
 |          |          |            |
 |          |<-456xx---|            |
 |<-456xx---|--ACK---->|            |
 |--ACK---->|          |            |
```

---
Reply to this email directly or view it on GitHub:
https://github.com/OpenSIPS/opensips/issues/142#issuecomment-30758792
_______________________________________________
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to