Skip to main content

Initialization

The widget must be initialized with the following parameters before each use

  • SIP domain (see SIP Domains)
  • SIP Account username (alphanumeric, a-z, A-Z, 0-9, max 32 characters)
    • For App Provider, this SIP account should be your unique user endpoint identification. E.g. user account is user123@email.com, SIP account can be user123loginsessiontoken
  • JWT

Widget Initialization

Sample postMsg to widget

postMessage(
<PostMessage<MessageType.initApp>>{
msgId: messageId,
type: MessageType.initApp,
data: {
jwt: jwt,
sipDomain: sipDomain
}
},
'*'
);

Sample widget response

<PostMessage<MessageType.initApp>>{
msgId: messageId,
type: MessageType.initApp,
response: {
status: 'success'
}
};

SIP Register Sample

REGISTER sip:sipsg01.b3networks.com SIP/2.0
Via: SIP/2.0/WSS 8t7c99t58ooj.invalid;branch=z9hG4bK6630772
Max-Forwards: 69
To: <sip:1732159154230@sipsg01.b3networks.com>
From: <sip:1732159154230@sipsg01.b3networks.com>;tag=kp1mm7pffi
Call-ID: gk4v8udqqtevo5ap1uali8
CSeq: 1 REGISTER
X-Authorization: Bearer eyJraWQiOiI0VkluX0dYeFQtbVRKbFhTU0hhTHZpQUpBS2FZVlpKamRNQUdHYlRHMU1jIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiIxMzM4NjUxYi0xODRmLTQ3YTYtODEzZS03YWE4ZjNmOWY2YzQiLCJzdWIiOiJhbnZ1LmdtYWlsLmNvbSIsImNwYWFzLmV4cGlyeSI6MTczMTM4MzE5NjgzMywiZXhwIjoxNzMxNDY5NTk2ODMzLCJub25jZSI6IjE0MzU1NWUwLTE3YjItNDZmOC04OGQwLTUxNWE1YzcxY2E2NSIsImlhdCI6MTczMTM4MzE5NjgzM30.i6R7r2InCQOLy4p4xtq4_I7n543Cy-9czTknD10EYaBYfhCrFFscAtrlxBqN8pyD9o3uBWUOujOO37BN7UTuf6K5OACkRRyCuE1c76GEoyhfPntu03pEkmEzg0FVguZhkiEzyuQH1AYdshdR__2Hdv9kXI-hT_nK6NoJPseT346-gkpvpot1zjx2l9iG9LiBqFEuto4rhkoj0kVCF272qLdThLhHGogjLg2X7_0rnnGfeTpf-hMk0sfpPPQihADVE9oMPwLjJ7g5xqELfhovoV1GuWskFBoLk-0MpwsD9bcHldNC6MA0Jhi0L0lBf8dn8EysnpQMsSxEDaB0va35og
Contact: <sip:csb1g7md@8t7c99t58ooj.invalid;transport=ws>;+sip.ice;reg-id=1;+sip.instance="<urn:uuid:f3a924a3-c040-4b9d-8c8d-69949aefd00b>";expires=1800
Expires: 1800
Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY
Supported: path,gruu,outbound
User-Agent: B3networks
Content-Length: 0