Skip to content

Unable to call WaitAnswer a second time when the OnResponse callback returned an error #281

@serfreeman1337

Description

@serfreeman1337

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.

sipgo/dialog_client.go

Lines 324 to 329 in 8cd3738

tx, err = s.TransactionRequest(ctx, inviteRequest)
if err != nil {
return err
}
continue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions