Module sip

Control the SIP Proxy

Functions

SIP.getDeviceURL (callID)
Get a device URL from a callID

Parameters:

  • callID string

Returns:

    string
SIP.getCallID (deviceURL)
Get a callID from a device URL

Parameters:

  • deviceURL string

Returns:

    string
SIP.waitUntilCompleted (callID)
Wait for a call to be completed

Parameters:

  • callID string

Returns:

    boolean ok Whether the call completed successfully
SIP.waitUntilConnected (callID)
Wait for a call to be connected

Parameters:

  • callID string

Returns:

    string | nil result if the call is connected the callID is returned
SIP.waitUntilStreaming (callID)
Wait for a call to have media connected

Parameters:

  • callID string

Returns:

    string | nil result if the call is connected the callID is returned
SIP.call (from, to)
Initiate a call

Parameters:

  • from string
  • to string

Returns:

    string | nil
SIP.requestConfig (callID)
Request line configuration for a specified callID

Parameters:

  • callID string

Returns:

    table | nil
SIP.getTerminalExtension (terminal_id)
Get the extension for a terminal

Parameters:

  • terminal_id string

Returns:

    string | nil
SIP.getUserPhoneNumber (deal_id, user_id)
Get the phone number for a user

Parameters:

  • deal_id string
  • user_id string

Returns:

    string | nil
SIP.getUserPhoneExtension (deal_id, user_id)
Get the phone number for a user

Parameters:

  • deal_id string
  • user_id string

Returns:

    string | nil
SIP.transfer (callID, to)
Transfer a callID to a new destination

Parameters:

  • callID string
  • to string
SIP.forward (callID, from, to)
Forward a callID to a new destination

Parameters:

  • callID string the callID to forward
  • from string the line configuration used to make the call out
  • to string the destination

Returns:

    string | nil result if successful returns the device URL of the forwarded call
SIP.join (callAID, callBID)
Join two calls together. Joined calls will receive each others voice. If one side hangs up the other side will also hang up.

Parameters:

  • callAID string the callID of one side
  • callBID string the callID of the other side

Returns:

    boolean | nil result if successful returns true
SIP.hangup (callID)
Hangup a call

Parameters:

  • callID string
generated by LDoc 1.5.0 Last updated 2025-06-05 18:17:56