Guides
Send a Message
This guide uses the full SIP.js API. The Simple User is intended to help get beginners up and running quickly. This guide is adopted from the SIP.js Github API documentation.
Prerequisites
See the User Agent guide on how to create a user agent. This guide requires a registered user agent.
Construct The Messager
A Messager
is required to send the message. This will send a message to a targeted URI. This will be an out of dialog sip message. Please see the API Documentation to determine how to send an in dialog message. The Messager
constructor requires that the User Agent, target URI, and message content be passed into it.
const content = 'Hello World';
const target = UserAgent.makeURI("sip:bob@example.com");
const messager = new Messager(userAgent, target, content);
Sending the Message
Once the messager is constructed call messager.message()
to send the message.
messager.message();