This section explains Invitations behaviour

We need an InvitationsDelegate to receive invitations events

class InvitationsEventDelegateExample: InvitationsEventDelegate {

    func invitations(_ invitations: Invitations, didCancelInvitationRequest: String) {


    func invitations(_ invitations: Invitations, didReceiveInvitationRequest: InvitationRequest) {
        // Do action with InvitationRequest
        // Like accept it sending a new conference as answer to the InvitationRequest
        invitations.replyWithConference(sippoInvitationRequest: didReceiveInvitationRequest, conferenceDelegate: sippoConferenceDelegate() { task in

        // Or decline
        invitations.decline(sippoInvitationRequest: didReceiveInvitationRequest)

let delegate = InvitationsDelegateExample()
let invitations = try? SippoClient.client.invitations.get()
invitations?.delegate = delegate

To request a conference invitation create an invitation request to a participant

invitations?.sendInvitationRequest(to: "participant", using: [.audio, .video]) { result in
    // do something with the result

// Invitation request can be cancelled until the callee accept/decline it
invitations?.cancelInvitationRequest(to: "participant")

When a new invitation request arrives through delegate it’s possible to accept or decline it

func invitations(_ invitations: Invitations, didReceiveInvitationRequest invitationRequest: SippoInvitationRequest) {
    invitations.decline(sippoInvitationRequest: invitationRequest)
    //or accept it creating a new conference to user who request an invitation
    invitations.replyWithConference(sippoInvitationRequest: invitationRequest, conferenceDelegate: ConferenceDelegateExample()) { result in
        // do something with the conference