### Example JSON for registering event Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/registering.md This JSON object represents the 'registering' event notification sent when a SIP registration starts. It shows the basic structure containing only the event name. ```json { "event": "registering" } ``` -------------------------------- ### Example ice_media event payload (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/ice_media.md An example JSON payload for the `ice_media` event, showing the structure and typical values when audio is being received. ```JSON { "event": "ice_media", "line": 0, "type": "audio", "receiving": true } ``` -------------------------------- ### Example registration_failed event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/registration_failed.md An example JSON payload for the `registration_failed` session event, showing the required `code` and `reason` properties. ```json { "event": "registration_failed", "code": 403, "reason": "Forbidden" } ``` -------------------------------- ### Example JSON for transfer line event Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/transfer.md An example payload for the 'transfer' line event, showing the required and optional properties like refer_id, refer_to, and referred_by. ```json { "event": "transfer", "line": 0, "refer_id": 123, "refer_to": "007", "referred_by": "001" } ``` -------------------------------- ### Example incoming_call event JSON payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/incoming_call.md An example JSON payload representing the 'incoming_call' event, showing the structure and typical properties included. ```json { "event": "incoming_call", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "callee": "123", "caller": "456", "caller_display_name": "Some Name", "jsep": { "type": "offer", "sdp": "..." } } ``` -------------------------------- ### Example Notify Event JSON Payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/notify.md An example JSON payload representing a 'notify' call event, showing the structure and typical values for the event properties. ```json { "event": "notify", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "notify": "refer", "subscription_state": "active", "content_type": "message/sipfrag", "content": "SIP/2.0 100 Trying\r\n" } ``` -------------------------------- ### Example ice_webrtcup event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/ice_webrtcup.md An example JSON payload for the ice_webrtcup line event, indicating successful ICE and DTLS negotiation for a specific line. ```JSON { "event": "ice_webrtcup", "line": 0 } ``` -------------------------------- ### Example Error Response JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/responses/error.md An example of a typical `error` response payload, showing the required `response`, `transaction`, `line`, `code`, and `reason` fields. ```json { "response": "error", "transaction": "transaction-13", "line": 0, "code": 472, "reason": "Currently not accepting new sessions" } ``` -------------------------------- ### Example `accept` call request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/accept.md This JSON object provides an example structure for the `accept` request. It includes essential fields like `request`, `transaction`, `line`, `call_id`, and the required `jsep` property containing session description details. ```json { "request": "accept", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "jsep": { "...": "..." } } ``` -------------------------------- ### Example Resuming Call Event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/resuming.md An example JSON payload for the 'resuming' call event notification, showing the structure and typical fields. ```json { "event": "resuming", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example registered session event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/registered.md An example JSON payload for the 'registered' session event, showing the event type and a typical 'phrase' value. ```json { "event": "registered", "phrase": "ok" } ``` -------------------------------- ### ACK Response Example - Basic JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/responses/ack.md An example of a basic `ack` response JSON object. It confirms receipt of a request, including the response type, transaction identifier, and line number. ```json { "response": "ack", "transaction": "transaction-1", "line": 0 } ``` -------------------------------- ### Example ice_hangup event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/ice_hangup.md An example JSON payload for the `ice_hangup` line event, showing the event type, line number, and reason for hangup. ```json { "event": "ice_hangup", "line": 0, "reason": "DTLS alert" } ``` -------------------------------- ### Example `progress` event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/progress.md An example JSON object representing the `progress` call event, showing the structure and typical properties like transaction ID, line, call ID, callee, and the JSEP object containing the SDP answer. ```json { "event": "progress", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "callee": "123", "jsep": { "type": "answer", "sdp": "..." } } ``` -------------------------------- ### Example WTSP Event Message (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/index.md Provides an example of a WTSP event message, specifically a 'call' event, detailing fields like 'event' type, optional 'transaction' identifier, 'line', 'call_id', and call-specific details such as 'callee', 'caller', 'caller_display_name', and 'jsep'. ```JSON { "event": "call", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "callee": "0987654321", "caller": "1234567890", "caller_display_name": "Test User", "jsep": { "type": "offer", "sdp": "..." } } ``` -------------------------------- ### Example holding event JSON payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/holding.md This JSON object represents an example payload for the 'holding' event, indicating a call is being put on hold. ```json { "event": "holding", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example ice_slowlink event JSON payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/ice_slowlink.md An example of the JSON payload sent for the `ice_slowlink` line event, showing the structure and typical values for the event, line number, media type, uplink status, and lost packet count. ```json { "event": "ice_slowlink", "line": 0, "type": "audio", "uplink": true, "lost": 10 } ``` -------------------------------- ### Example updating_call Event Payload - JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/updating_call.md An example JSON payload for the updating_call event, showing typical properties like call_id, callee, caller, and jsep (session description). ```json { "event": "updating_call", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "callee": "123", "caller": "456", "caller_display_name": "Some Name", "jsep": { "type": "offer", "sdp": "..." } } ``` -------------------------------- ### Example WTSP Request Message (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/index.md Demonstrates the structure of a WTSP request message, specifically a 'call' request, including mandatory fields like 'request', 'transaction', 'line', 'call_id', and additional properties like 'number' and 'jsep' for call initiation. ```JSON { "request": "call", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "number": "1234567890", "jsep": { "type": "offer", "sdp": "..." } } ``` -------------------------------- ### Example Update Call Request JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/update.md This JSON object represents an example payload for the `update` request. It includes the transaction ID, line number, call ID, and the `jsep` property containing the updated session description. ```json { "request": "update", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "jsep": { "...": "..." } } ``` -------------------------------- ### Example Decline Call Request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/decline.md An example JSON payload for the `decline` request, showing the required fields like `request`, `transaction`, `line`, and `call_id`. It demonstrates the basic structure for initiating a call decline operation. ```JSON { "request": "decline", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example Error Event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/error.md An example JSON payload for the 'error' call event, showing the structure and typical values for the event, transaction, call details, error code, and reason. ```json { "event": "error", "transaction": "transaction-13", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "code": 450, "reason": "Could not allocate RTP/RTCP ports" } ``` -------------------------------- ### Accepting Call Event JSON Example Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/accepting.md An example JSON object representing the 'accepting' call event notification. It includes the event type, transaction identifier, line number, and call identifier. ```json { "event": "accepting", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example hangingup Call Event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/hangingup.md An example JSON payload for the `hangingup` call event, illustrating the structure and required fields such as `event`, `transaction`, `line`, and `call_id`. ```json { "event": "hangingup", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example 'declining' Call Event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/declining.md An example JSON payload for the 'declining' call event, showing typical properties like event name, transaction ID, line number, call ID, and the response code. ```JSON { "event": "declining", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "code": 486 } ``` -------------------------------- ### Example WTSP Response Message (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/index.md Illustrates the structure of a WTSP response message, showing an 'ack' response to a request, including the 'response' type, the corresponding 'transaction' identifier, and the 'line' number. ```JSON { "response": "ack", "transaction": "transaction-1", "line": 0 } ``` -------------------------------- ### Example Handshake State JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/handshake/state.md A sample JSON payload illustrating the structure and content of the 'state' message, showing a registered user with one active call on the first line and two idle lines. ```json { "handshake": "state", "keepalive_interval": 30000, "timestamp": 1662114679648, "registration": { "status": "registered" }, "lines": [ { "call_id": "qwertyuiopasdfghjklzxcvbnm", "call_logs": [ [ 1662114479751, { "event": "incoming_call", "callee": "123", "caller": "456" } ] ] }, null, null ] } ``` -------------------------------- ### Ringing Call Event JSON Example Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/ringing.md Example JSON payload for the 'ringing' call event, indicating an outgoing call is in the ringing state. It includes the event type, transaction ID, line number, and call ID. ```json { "event": "ringing", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example 'error' session event payload (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/error.md This JSON object represents an example payload for the 'error' session event, including the event name, transaction ID, error code, and reason. ```json { "event": "error", "transaction": "transaction-13", "code": 499, "reason": "Missing session or Sofia stack" } ``` -------------------------------- ### ACK Response Example - With Call ID JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/responses/ack.md An example of an `ack` response JSON object that includes an optional `call_id` field. This variant provides the call identifier associated with the acknowledged request, in addition to the standard fields. ```json { "response": "ack", "transaction": "transaction-2", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example hold request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/hold.md This JSON object represents an example request to put a call on hold. It specifies the request type, a transaction identifier, the line number, the call ID, and the desired media direction ('inactive' in this case). ```json { "request": "hold", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "direction": "inactive" } ``` -------------------------------- ### Example JSON payload for a call event Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/proceeding.md This JSON object shows an example structure for a call event notification, including the transaction ID, line number, call ID, and the 'code' property which indicates the specific event code (e.g., 180 for proceeding). ```json { "event": "missed_call", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "code": 180 } ``` -------------------------------- ### Example missed_call event payload (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/missed_call.md This JSON object provides an example structure and data for the `missed_call` event payload, illustrating the required and optional properties like `callee`, `caller`, and `caller_display_name`. ```json { "event": "missed_call", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "callee": "123", "caller": "456", "caller_display_name": "Some Name" } ``` -------------------------------- ### Example Hangup Event JSON Payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/hangup.md An example JSON payload for the hangup call event, illustrating the structure and typical properties such as event type, transaction ID, line number, call ID, SIP code, and reason. ```json { "event": "hangup", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "code": 200, "reason": "Session Terminated" } ``` -------------------------------- ### Example `error` line event JSON payload Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/line/error.md This JSON object shows an example payload for the `error` line event, including the standard event fields (`event`, `transaction`, `line`) and the event-specific properties (`code`, `reason`). The `code` field references specific error codes, and `reason` provides a human-readable description. ```json { "event": "error", "transaction": "transaction-13", "line": 0, "code": 440, "reason": "No message??" } ``` -------------------------------- ### Send a single ICE candidate (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/line/ice_trickle.md Example JSON payload for sending a single ICE candidate to the remote peer using the `ice_trickle` request. Includes the candidate string, sdpMLineIndex, and sdpMid. ```json { "request": "ice_trickle", "transaction": "transaction-1", "line": 0, "candidate": { "candidate": "candidate:430735571 1 udp 2122260223 192.168.1.100 53252 typ host generation 0 ufrag eZoF network-id 1 network-cost 10", "sdpMLineIndex": 0, "sdpMid": "audio" } } ``` -------------------------------- ### Example 'unregistering' event payload (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/unregistering.md This JSON object represents the payload for the 'unregistering' session event notification. It indicates that a SIP unregistration process has begun. ```json { "event": "unregistering" } ``` -------------------------------- ### Signal end of candidates with null (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/line/ice_trickle.md Example JSON payload for signaling the end of ICE candidates by sending a `null` value for the `candidate` property in the `ice_trickle` request. ```json { "request": "ice_trickle", "transaction": "transaction-2", "line": 0, "candidate": null } ``` -------------------------------- ### Example outgoing_call Request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/outgoing_call.md This JSON object provides a sample structure for the `outgoing_call` request body. It includes mandatory fields such as `request` type, a unique `transaction` identifier, the `line` index, a generated `call_id`, the target `number`, and the `jsep` property containing the SDP offer. ```json { "request": "outgoing_call", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm", "number": "1234567890", "jsep": { "type": "offer", "sdp": "..." } } ``` -------------------------------- ### Example unregistered event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/session/unregistered.md This JSON object represents the structure of the `unregistered` session event notification. ```json { "event": "unregistered" } ``` -------------------------------- ### Signal end of candidates with completed object (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/line/ice_trickle.md Example JSON payload for signaling the end of ICE candidates by sending a `completed` object with `true` in the `candidate` property using the `ice_trickle` request. ```json { "request": "ice_trickle", "transaction": "transaction-2", "line": 0, "candidate": { "completed": true } } ``` -------------------------------- ### Example JSON: Updating Call Event Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/updating.md This JSON object illustrates the structure and typical fields included in an 'updating' call event notification. It contains the event type, a transaction identifier, the line number, and the unique call identifier. ```json { "event": "updating", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example JSON for Calling Event Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/calling.md This JSON object represents the `calling` event notification received when an outgoing call request begins processing. It includes the event type, transaction ID, line number, and call ID. ```JSON { "event": "calling", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Handshake Keepalive Message with Timestamp (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/handshake/keepalive.md An example of the handshake keepalive message that includes a 'timestamp' field along with the required 'handshake' field. The timestamp likely indicates when the message was sent. ```json { "handshake": "keepalive", "timestamp": 1663526263768 } ``` -------------------------------- ### Example `transferring` event JSON Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/transferring.md This JSON object illustrates the structure and data contained in a `transferring` call event notification. It includes the event type, transaction ID, line number, and call ID. ```json { "event": "transferring", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Example Unhold Call Request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/unhold.md This JSON object represents a typical request payload to unhold a call. It specifies the request type, a unique transaction identifier, the line number, and the specific call ID to be resumed. ```json { "request": "unhold", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Accepted Call Event Notification (With SDP) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/accepted.md This example shows the `accepted` call event notification when an SDP answer is provided via the `jsep` property. It includes the event type, transaction ID, line number, call ID, and the session description (`jsep`) object containing the SDP type and content. ```json { "event": "accepted", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcb "jsep": { "type": "answer", "sdp": "..." } } ``` -------------------------------- ### Accepted Call Event Notification (No SDP) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/events/call/accepted.md This example shows the `accepted` call event notification when no SDP answer is provided (e.g., when the `accept` request itself didn't include SDP). It includes the event type, transaction ID, line number, and call ID. ```json { "event": "accepted", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` -------------------------------- ### Handshake Keepalive Message with Transaction ID (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/handshake/keepalive.md This example shows a handshake keepalive message that includes a 'transaction' field, potentially used for correlating requests and responses or managing specific transactions, in addition to the required 'handshake' field. ```json { "handshake": "keepalive", "transaction": "transaction-1" } ``` -------------------------------- ### Initialize WebSocket with webtrit-protocol in JavaScript Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/websocket_subprotocol.md Creates a new WebSocket instance in JavaScript, specifying the server URL and the 'webtrit-protocol' as the desired sub-protocol. ```JavaScript new WebSocket("wss://...", "webtrit-protocol") ``` -------------------------------- ### Minimum MS Teams Manifest.json Configuration Source: https://github.com/webtrit/webtrit_docs/blob/main/integrations/ms-teams/index.md This snippet provides the minimum required structure and fields for the manifest.json file used in an MS Teams application package. It includes basic information like schema, version, ID, developer details, icons, names, descriptions, accent color, static tabs, permissions, device permissions, and valid domains. ```JSON { "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.9/MicrosoftTeams.schema.json", "manifestVersion": "1.9", "version": "application version", "id": "unique app id", "packageName": "com.microsoft.teams.extension", "developer": { "name": "WebTrit", "websiteUrl": "https://www.webtrit.com/", "privacyUrl": "https://www.webtrit.com/privacy/portaphone-ms-teams", "termsOfUseUrl": "https://www.webtrit.com/terms-of-use" }, "icons": { "color": "color.png", "outline": "outline.png" }, "name": { "short": "WebTrit", "full": "WebTrit Web for MS Teams" }, "description": { "short": "Short description", "full": "Full description" }, "accentColor": "#FFFFFF", "staticTabs": [ { "entityId": "index", "name": "Dialer", "contentUrl": "URL to web resource", "websiteUrl": "URL to web resource", "scopes": [ "personal" ] }, { "entityId": "about", "scopes": [ "personal" ] } ], "permissions": [ "identity", "messageTeamMembers" ], "devicePermissions": [ "media" ], "validDomains": [ "valid domen as same as in URL" ] } ``` -------------------------------- ### Configure Static Tabs with URL Parameters in MS Teams Manifest.json Source: https://github.com/webtrit/webtrit_docs/blob/main/integrations/ms-teams/index.md This snippet demonstrates how to configure the `staticTabs` section within the manifest.json file to include URL parameters in the `contentUrl` and `websiteUrl` fields. This is shown as a solution to pass special parameters, potentially to control application behavior like disabling a navigation drawer. ```JSON "staticTabs": [ { "entityId": "index", "name": "Dialer", "contentUrl": "dailer.com/home?mode=mst", "websiteUrl": "dailer.com/home?mode=mst", "scopes": [ "personal" ] }, { "entityId": "about", "scopes": [ "personal" ] } ], ``` -------------------------------- ### Connect WebSocket with webtrit-protocol in Dart Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/websocket_subprotocol.md Establishes a WebSocket connection asynchronously in Dart, connecting to the specified URL and requesting the 'webtrit-protocol'. ```Dart await WebSocket.connect( 'wss://...', protocols: ['webtrit-protocol'], ); ``` -------------------------------- ### Simplest Handshake Keepalive Message (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/handshake/keepalive.md This is the most basic form of the handshake keepalive message, containing only the required 'handshake' field with the value 'keepalive'. ```json { "handshake": "keepalive" } ``` -------------------------------- ### Hangup Call Request (JSON) Source: https://github.com/webtrit/webtrit_docs/blob/main/signaling/requests/call/hangup.md This JSON object represents a request to hang up a specific call identified by `call_id` on a particular `line`. The `transaction` field is used to correlate the request with subsequent events. ```json { "request": "hangup", "transaction": "transaction-1", "line": 0, "call_id": "qwertyuiopasdfghjklzxcvbnm" } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.