Diago returns the ErrClientEarlyMedia error in the OnResponse callback to exit WaitAnswer early for 183 early media. It's expected to call WaitAnswer a second time to actually wait for a 200 OK response, but it fails with a transaction canceled message.
This happens because s.inviteTx is not updated after a new transaction request with authorization is made when OnResponse returns an error.
|
tx, err = s.TransactionRequest(ctx, inviteRequest) |
|
|
|
if err != nil { |
|
return err |
|
} |
|
continue |