External: LinphoneCore

LinphoneCore

Linphone core main object created by function
Source:

Members

adaptiveRateAlgorithm :string

Sets adaptive rate algorithm. It will be used for each new calls starting from now. Calls already started will not be updated.
Type:
  • string
Source:

adaptiveRateControlEnabled :boolean

Enable adaptive rate control.
Type:
  • boolean
Source:

audioAdaptiveJittcompEnabled :boolean

Enable or disable the audio adaptive jitter compensation.
Type:
  • boolean
Source:

audioCodecs :Array.<Object>

Sets the list of audio codecs.
Type:
  • Array.<Object>
Source:

audioDscp :number

Set the DSCP field for outgoing audio streams.
Type:
  • number
Source:

audioJittcomp :number

Sets the nominal audio jitter buffer size in milliseconds. The value takes effect immediately for all running and pending calls, if any. A value of 0 disables the jitter buffer.
Type:
  • number
Source:

audioPort :number

Sets the UDP port used for audio streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
Type:
  • number
Source:

<readonly> authInfoList :Array.<Object>

Returns an unmodifiable list of currently entered LinphoneAuthInfo.
Type:
  • Array.<Object>
Source:

avpfMode :linphone.AVPFMode

Enable RTCP feedback (also known as RTP/AVPF profile). Setting LinphoneAVPFDefault is equivalent to LinphoneAVPFDisabled. This setting can be overriden per LinphoneProxyConfig with
Type:
Source:

avpfRrInterval :number

Set the avpf report interval in seconds. This value can be overriden by the proxy config using
Type:
  • number
Source:

<readonly> callLogs :Array.<Object>

Get the list of call logs (past calls).
Type:
  • Array.<Object>
Source:

<readonly> calls :Array.<Object>

Returns the current list of calls.
Type:
  • Array.<Object>
Source:

<readonly> callsNb :number

Get the number of Call
Type:
  • number
Source:

captureDevice :string

Sets the sound device used for capture.
Type:
  • string
Source:

chatDatabasePath :string

Sets the database filename where chat messages will be stored. If the file does not exist, it will be created.
Type:
  • string
Source:

<readonly> chatEnabled :boolean

Returns whether chat is enabled.
Type:
  • boolean
Source:

<readonly> chatRooms :Array.<Object>

Returns an list of chat rooms
Type:
  • Array.<Object>
Source:

<readonly> conferenceLocalInputVolume :number

Returns the sound volume (mic input) of the local participant of the conference.
Type:
  • number
Source:

<readonly> conferenceSize :number

Returns the number of participants to the conference, including the local participant.
Type:
  • number
Source:

<readonly> config :external:LpConfig

Returns the LpConfig object used to manage the storage (config) file.
Type:
Source:

<readonly> currentCall :external:LinphoneCall

Returns The _LinphoneCall struct of the current call if one is in call
Type:
Source:

<readonly> currentCallRemoteAddress :external:LinphoneAddress

Get the remote address of the current call.
Type:
Source:

defaultProxyConfig :external:LinphoneProxyConfig

Sets the default proxy.
Type:
Source:

delayedTimeout :number

Set the in delayed timeout in seconds.
Type:
  • number
Source:

deviceRotation :number

Tells the core the device current orientation. This can be used by capture filters on mobile devices to select between portrait/landscape mode and to produce properly oriented images. The exact meaning of the value in rotation if left to each device specific implementations.
Type:
  • number
Source:

dnsSrvEnabled :boolean

Enable or disable DNS SRV resolution.
Type:
  • boolean
Source:

downloadBandwidth :number

Sets maximum available download bandwidth This is IP bandwidth, in kbit/s. This information is used signaled to other parties during calls (within SDP messages) so that the remote end can have sufficient knowledge to properly configure its audio & video codec output bitrate to not overflow available bandwidth.
Type:
  • number
Source:

downloadPtime :number

Set audio packetization time linphone expects to receive from peer. A value of zero means that ptime is not specified.
Type:
  • number
Source:

echoCancellationEnabled :boolean

Enables or disable echo cancellation. Value is saved and used for subsequent calls. This actually controls software echo cancellation. If hardware echo cancellation is available, it will be always used and activated for calls, regardless of the value passed to this function. When hardware echo cancellation is available, the software one is of course not activated.
Type:
  • boolean
Source:

echoLimiterEnabled :boolean

Enables or disable echo limiter.
Type:
  • boolean
Source:

fileManager :external:FileManager

Get the file manager.
Type:
Source:

firewallPolicy :linphone.FirewallPolicy

Set the policy to use to pass through firewalls.
Type:
Source:

<readonly> friendList :Array.<Object>

Get Buddy list of LinphoneFriend
Type:
  • Array.<Object>
Source:

guessHostname :boolean

Tells LinphoneCore to guess local hostname automatically in primary contact.
Type:
  • boolean
Source:

<readonly> identity :string

Returns the default identity SIP address.
Type:
  • string
Source:

inCallTimeout :number

Set the in call timeout in seconds.
Type:
  • number
Source:

<readonly> incomingInvitePending :boolean

Tells whether there is an incoming invite pending.
Type:
  • boolean
Source:

<readonly> inConference :boolean

Indicates whether the local participant is part of the conference.
Type:
  • boolean
Source:

incTimeout :number

Set the incoming call timeout in seconds.
Type:
  • number
Source:

ipv6Enabled :boolean

Turns IPv6 support on or off.
Type:
  • boolean
Source:

iterateEnabled :boolean

Enable/disable the iteration process of the LinphoneCore.
Type:
  • boolean
Source:

iterateInterval :number

Set the interval between two iterations of the LinphoneCore process (in milliseconds).
Type:
  • number
Source:

keepAliveEnabled :boolean

enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
Type:
  • boolean
Source:

logCollectionUploadServerUrl :string

Set the url of the server where to upload the collected log files.
Type:
  • string
Source:

logHandler :object

Set the javascript function to be used as the log handler. This function will received the log level as its first parameter and the log message as its second parameter.
Type:
  • object
Source:

magic :string

Value to be used to identify the instance of the plugin.
Type:
  • string
Source:

maxCalls :number

Set the maximum number of simultaneous calls Linphone core can manage at a time. All new call above this limit are declined with a busy answer
Type:
  • number
Source:

mediaEncryption :linphone.MediaEncryption

Choose the media encryption policy to be used for RTP packets.
Type:
Source:

mediaEncryptionMandatory :boolean

Define behaviour when encryption parameters negociation fails on outgoing call.
Type:
  • boolean
Source:

micEnabled :boolean

Enable or disable the microphone.
Type:
  • boolean
Source:

micGainDb :number

Allow to control microphone level: gain in db
Type:
  • number
Source:

<readonly> missedCallsCount :number

Get the number of missed calls. Once checked, this counter can be reset with
Type:
  • number
Source:

mtu :number

Sets the maximum transmission unit size in bytes. This information is useful for sending RTP packets. Default value is 1500.
Type:
  • number
Source:

natAddress :string

Set the public IP address of NAT when using the firewall policy is set to use NAT.
Type:
  • string
Source:

nativePreviewWindowId :external:unsignedlong

Set the native window id where the preview video (local camera) is to be displayed. This has to be used in conjonction with
Type:
  • external:unsignedlong
Source:

nativeVideoWindowId :external:unsignedlong

Set the native video window id where the video is to be displayed. For MacOS, Linux, Windows: if not set or zero the core will create its own window, unless the special id -1 is given.
Type:
  • external:unsignedlong
Source:

networkReachable :boolean

This method is called by the application to notify the linphone core library when network is reachable. Calling this method with true trigger linphone to initiate a registration process for all proxies. Calling this method disables the automatic network detection mode. It means you must call this method after each network state changes.
Type:
  • boolean
Source:

nortpTimeout :number

Sets the no-rtp timeout value in seconds.
Type:
  • number
Source:

playbackDevice :string

Sets the sound device used for playback.
Type:
  • string
Source:

playbackGainDb :number

Allow to control play level before entering sound card: gain in db
Type:
  • number
Source:

playFile :string

Sets a wav file to be played when putting somebody on hold, or when files are used instead of soundcards (see
Type:
  • string
Source:

playLevel :number

Set sound playback level in 0-100 scale
Type:
  • number
Source:

<readonly> pluginVersion :string

Gets the version of the plugin.
Type:
  • string
Source:

preferredFramerate :number

Set the preferred frame rate for video. Based on the available bandwidth constraints and network conditions, the video encoder remains free to lower the framerate. There is no warranty that the preferred frame rate be the actual framerate. used during a call. Default value is 0, which means "use encoder's default fps value".
Type:
  • number
Source:

preferredVideoSize :external:MSVideoSize

Sets the preferred video size.
Type:
  • external:MSVideoSize
Source:

preferredVideoSizeByName :string

Sets the preferred video size by its name.
Type:
  • string
Source:

presenceModel :external:LinphonePresenceModel

Set my presence model
Type:
Source:

previewVideoSize :external:MSVideoSize

Sets the video size for the captured (preview) video. This method is for advanced usage where a video capture must be set independently of the size of the stream actually sent through the call. This allows for example to have the preview window with HD resolution even if due to bandwidth constraint the sent video size is small. Using this feature increases the CPU consumption, since a rescaling will be done internally.
Type:
  • external:MSVideoSize
Source:

previewVideoSizeByName :string

Sets the preview video size by its name. See
Type:
  • string
Source:

primaryContact :string

Sets the local "from" identity.
Type:
  • string
Source:

<readonly> primaryContactParsed :external:LinphoneAddress

Same as
Type:
Source:

provisioningUri :string

Set URI where to download xml configuration file at startup. This can also be set from configuration file or factory config file, from [misc] section, item "config-uri". Calling this function does not load the configuration. It will write the value into configuration so that configuration from remote URI will take place at next LinphoneCore start.
Type:
  • string
Source:

<readonly> proxyConfigList :Array.<Object>

Returns an unmodifiable list of entered proxy configurations.
Type:
  • Array.<Object>
Source:

recLevel :number

Set sound capture level in 0-100 scale
Type:
  • number
Source:

recordFile :string

Sets a wav file where incoming stream is to be recorded, when files are used instead of soundcards (see
Type:
  • string
Source:

ring :string

Sets the path to a wav file used for ringing.
Type:
  • string
Source:

ringback :string

Sets the path to a wav file used for ringing back.
Type:
  • string
Source:

ringerDevice :string

Sets the sound device used for ringing.
Type:
  • string
Source:

ringLevel :number

Set sound ring level in 0-100 scale
Type:
  • number
Source:

rootCa :string

Sets the path to a file or folder containing trusted root CAs (PEM format)
Type:
  • string
Source:

sdp200AckEnabled :boolean

Control when media offer is sent in SIP INVITE.
Type:
  • boolean
Source:

selfViewEnabled :boolean

Enables or disable self view during calls.
Type:
  • boolean
Source:

sipDscp :number

Set the DSCP field for SIP signaling channel.
Type:
  • number
Source:

sipPort :number

Sets the UDP port to be used by SIP.
Type:
  • number
Source:

sipTransports :external:LCSipTransports

Sets the ports to be used for each of transport (UDP or TCP)
Type:
  • external:LCSipTransports
Source:

sipTransportTimeout :number

Set the SIP transport timeout.
Type:
  • number
Source:

<readonly> soundDevices :string

Returns an unmodifiable array of available sound devices.
Type:
  • string
Source:

staticPicture :string

Set the path to the image file to stream when "Static picture" is set as the video device.
Type:
  • string
Source:

staticPictureFps :number

Set the frame rate for static picture.
Type:
  • number
Source:

stunServer :string

Set the STUN server address to use when the firewall policy is set to STUN.
Type:
  • string
Source:

<readonly> supportedFileFormats :string

Returns a null terminated table of strings containing the file format extension supported for call recording.
Type:
  • string
Source:

<readonly> supportedVideoSizes :external:MSVideoSizeDef

Returns the zero terminated table of supported video resolutions.
Type:
  • external:MSVideoSizeDef
Source:

uploadBandwidth :number

Sets maximum available upload bandwidth This is IP bandwidth, in kbit/s. This information is used by liblinphone together with remote side available bandwidth signaled in SDP messages to properly configure audio & video codec's output bitrate.
Type:
  • number
Source:

uploadPtime :number

Set audio packetization time linphone will send (in absence of requirement from peer) A value of 0 stands for the current codec default packetization time.
Type:
  • number
Source:

<readonly> upnpExternalIpaddress :string

Return the external ip address of router. In some cases the uPnP can have an external ip address but not a usable uPnP (state different of Ok).
Type:
  • string
Source:

<readonly> upnpState :linphone.UpnpState

Return the internal state of uPnP.
Type:
Source:

useFiles :boolean

Ask the core to stream audio from and to files, instead of using the soundcard.
Type:
  • boolean
Source:

useInfoForDtmf :boolean

Sets whether SIP INFO is to be used for sending digits.
Type:
  • boolean
Source:

useRfc2833ForDtmf :boolean

Sets whether RFC2833 is to be used for sending digits.
Type:
  • boolean
Source:

<readonly> version :string

Gets the version of the core.
Type:
  • string
Source:

videoAdaptiveJittcompEnabled :boolean

Enable or disable the video adaptive jitter compensation.
Type:
  • boolean
Source:

videoCaptureEnabled :boolean

Enable or disable video capture.
Type:
  • boolean
Source:

videoCodecs :Array.<Object>

Sets the list of video codecs.
Type:
  • Array.<Object>
Source:

videoDevice :string

Sets the active video device.
Type:
  • string
Source:

<readonly> videoDevices :string

Returns an unmodifiable array of available video capture devices.
Type:
  • string
Source:

videoDisplayEnabled :boolean

Enable or disable video display.
Type:
  • boolean
Source:

videoDisplayFilter :string

Set the name of the mediastreamer2 filter to be used for rendering video. This is for advanced users of the library, mainly to workaround hardware/driver bugs.
Type:
  • string
Source:

videoDscp :number

Set the DSCP field for outgoing video streams.
Type:
  • number
Source:

videoJittcomp :number

Sets the nominal video jitter buffer size in milliseconds. The value takes effect immediately for all running and pending calls, if any. A value of 0 disables the jitter buffer.
Type:
  • number
Source:

videoPolicy :external:LinphoneVideoPolicy

Sets the default policy for video. This policy defines whether:
Type:
  • external:LinphoneVideoPolicy
Source:

videoPort :number

Sets the UDP port used for video streaming. A value if -1 will request the system to allocate the local port randomly. This is recommended in order to avoid firewall warnings.
Type:
  • number
Source:

videoPreviewEnabled :boolean

Controls video preview enablement.
Type:
  • boolean
Source:

videoSourceReuseEnabled :boolean

Enable or disable video source reuse when switching from preview to actual video call.
Type:
  • boolean
Source:

zrtpSecretsFile :string

Set the path to the file storing the zrtp secrets cache.
Type:
  • string
Source:

Methods

abortAuthentication(info) → {void}

This method is used to abort a user authentication request initiated by LinphoneCore from the auth_info_requested callback of LinphoneCoreVTable.
Parameters:
Name Type Description
info external:LinphoneAuthInfo -
Source:
Returns:
Type
void

acceptCall(call) → {number}

Accept an incoming call.
Parameters:
Name Type Description
call external:LinphoneCall the LinphoneCall object representing the call to be answered.
Source:
Returns:
Type
number

acceptCallUpdate(call, params) → {number}

Accept call modifications initiated by other end.
Parameters:
Name Type Description
call external:LinphoneCall the LinphoneCall object
params external:LinphoneCallParams a LinphoneCallParams object describing the call parameters to accept.
Source:
Returns:
Type
number

acceptCallWithParams(call, params) → {number}

Accept an incoming call, with parameters.
Parameters:
Name Type Description
call external:LinphoneCall the LinphoneCall object representing the call to be answered.
params external:LinphoneCallParams the specific parameters for this call, for example whether video is accepted or not. Use NULL to use default parameters.
Source:
Returns:
Type
number

acceptEarlyMedia(call) → {number}

Accept an early media session for an incoming call. This is identical as calling
Parameters:
Name Type Description
call external:LinphoneCall the incoming call
Source:
Returns:
Type
number

acceptEarlyMediaWithParams(call, params) → {number}

When receiving an incoming, accept to start a media session as early-media. This means the call is not accepted but audio & video streams can be established if the remote party supports early media. However, unlike after call acceptance, mic and camera input are not sent during early-media, though received audio & video are played normally. The call can then later be fully accepted using
Parameters:
Name Type Description
call external:LinphoneCall the call
params external:LinphoneCallParams the call params, can be NULL.
Source:
Returns:
Type
number

addAllToConference() → {number}

Add all calls into a conference.
Source:
Returns:
Type
number

addAuthInfo(info) → {void}

Adds authentication information to the LinphoneCore.
Parameters:
Name Type Description
info external:LinphoneAuthInfo -
Source:
Returns:
Type
void

addFriend(fr) → {void}

Add a friend to the current buddy list, if
Parameters:
Name Type Description
fr external:LinphoneFriend to add
Source:
Returns:
Type
void

addListener(vtable) → {void}

add a listener to be notified of linphone core events. Once events are received, registered vtable are invoked in order.
Parameters:
Name Type Description
vtable external:LinphoneCoreVTable object
Source:
Returns:
Type
void

addProxyConfig(config) → {number}

Add a proxy configuration. This will start registration on the proxy, if registration is enabled.
Parameters:
Name Type Description
config external:LinphoneProxyConfig -
Source:
Returns:
Type
number

addSupportedTag(tag) → {void}

This function controls signaling features supported by the core. They are typically included in a SIP Supported header.
Parameters:
Name Type Description
tag string the feature tag name
Source:
Returns:
Type
void

addToConference(call) → {number}

Merge a call into a conference.
Parameters:
Name Type Description
call external:LinphoneCall an established call, either in LinphoneCallStreamsRunning or LinphoneCallPaused state.
Source:
Returns:
Type
number

canWeAddCall() → {boolean}

Check if we do not have exceed the number of simultaneous call
Source:
Returns:
Type
boolean

clearAllAuthInfo() → {void}

Clear all authentication information.
Source:
Returns:
Type
void

clearCallLogs() → {void}

Erase the call log.
Source:
Returns:
Type
void

clearProxyConfig() → {void}

Erase all proxies from config.
Source:
Returns:
Type
void

declineCall(call, reason) → {number}

Decline a pending incoming call, with a reason.
Parameters:
Name Type Description
call external:LinphoneCall the LinphoneCall, must be in the IncomingReceived state.
reason linphone.Reason the reason for rejecting the call: LinphoneReasonDeclined or LinphoneReasonBusy
Source:
Returns:
Type
number

deferCallUpdate(call) → {number}

When receiving a
Parameters:
Name Type Description
call external:LinphoneCall -
Source:
Returns:
Type
number

disableChat(deny_reason) → {void}

Inconditionnaly disable incoming chat messages.
Parameters:
Name Type Description
deny_reason linphone.Reason the deny reason (LinphoneReasonNone has no effect).
Source:
Returns:
Type
void

enableChat() → {void}

Enable reception of incoming chat messages. By default it is enabled but it can be disabled with
Source:
Returns:
Type
void

enablePayloadType(pt, enable) → {number}

Enable or disable the use of the specified payload type.
Parameters:
Name Type Description
pt external:LinphonePayloadType The
enable boolean TRUE to enable the payload type, FALSE to disable it.
Source:
Returns:
Type
number

enterConference() → {number}

Moves the local participant inside the conference.
Source:
Returns:
Type
number

findAuthInfo(realm, username, sip_domain) → {external:LinphoneAuthInfo}

Find authentication info matching realm, username, domain criteria. First of all, (realm,username) pair are searched. If multiple results (which should not happen because realm are supposed to be unique), then domain is added to the search.
Parameters:
Name Type Description
realm string the authentication 'realm' (optional)
username string the SIP username to be authenticated (mandatory)
sip_domain string the SIP domain name (optional)
Source:
Returns:
Type
external:LinphoneAuthInfo

findCallFromUri(uri) → {external:LinphoneCall}

Search from the list of current calls if a remote address match uri
Parameters:
Name Type Description
uri string which should match call remote uri
Source:
Returns:
Type
external:LinphoneCall

findFriend(addr) → {external:LinphoneFriend}

Search a LinphoneFriend by its address.
Parameters:
Name Type Description
addr external:LinphoneAddress The address to use to search the friend.
Source:
Returns:
Type
external:LinphoneFriend

findPayloadType(type, rate, channels) → {external:LinphonePayloadType}

Get payload type from mime type and clock rate
Parameters:
Name Type Description
type string payload mime type (I.E SPEEX, PCMU, VP8)
rate number can be
channels number number of channels, can be
Source:
Returns:
Type
external:LinphonePayloadType

getAudioPortRange(min_port, max_port) → {void}

Get the audio port range from which is randomly chosen the UDP port used for audio streaming.
Parameters:
Name Type Description
min_port number -
max_port number -
Source:
Returns:
Type
void

getCallByRemoteAddress(remote_address) → {external:LinphoneCall}

Get the call with the remote_address specified
Parameters:
Name Type Description
remote_address string -
Source:
Returns:
Type
external:LinphoneCall

getChatRoom(addr) → {external:LinphoneChatRoom}

Get a chat room whose peer is the supplied address. If it does not exist yet, it will be created.
Parameters:
Name Type Description
addr external:LinphoneAddress a linphone address.
Source:
Returns:
Type
external:LinphoneChatRoom

getChatRoomFromUri(to) → {external:LinphoneChatRoom}

Get a chat room for messaging from a sip uri like sip:
Parameters:
Name Type Description
to string The destination address for messages.
Source:
Returns:
Type
external:LinphoneChatRoom

getFriendByRefKey(key) → {external:LinphoneFriend}

Search a LinphoneFriend by its reference key.
Parameters:
Name Type Description
key string The reference key to use to search the friend.
Source:
Returns:
Type
external:LinphoneFriend

getPayloadTypeBitrate(pt) → {number}

Get the bitrate explicitely set with
Parameters:
Name Type Description
pt external:LinphonePayloadType the
Source:
Returns:
Type
number

getSipTransports(transports) → {number}

Retrieves the port configuration used for each transport (udp, tcp, tls). A zero value port for a given transport means the transport is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be choosen randomly by the system.
Parameters:
Name Type Description
transports external:LCSipTransports -
Source:
Returns:
Type
number

getSipTransportsUsed(tr) → {void}

Retrieves the real port number assigned for each sip transport (udp, tcp, tls). A zero value means that the transport is not activated. If LC_SIP_TRANSPORT_RANDOM was passed to
Parameters:
Name Type Description
tr external:LCSipTransports a LCSipTransports structure.
Source:
Returns:
Type
void

getVideoPortRange(min_port, max_port) → {void}

Get the video port range from which is randomly chosen the UDP port used for video streaming.
Parameters:
Name Type Description
min_port number -
max_port number -
Source:
Returns:
Type
void

inCall() → {boolean}

Returns TRUE if there is a call running.
Source:
Returns:
Type
boolean

init(config, factory) → {number}

Initializes and launches the execution of the LinphoneCore.
Parameters:
Name Type Description
config string Path to the user config file. If it does not exists it will be created. The config file is used to store all settings, call logs, friends, proxies... so that all these settings become persistent over the life of the LinphoneCore object. It is allowed to set a null config file. In that case LinphoneCore will not store any settings.
factory string Path to the read-only factory config file. It can be used to store hard-coded preference such as proxy settings or internal preferences. The settings in this factory file always override the one in the normal config file. It is OPTIONAL, use null if unneeded.
Source:
Returns:
0 if successful, any other value on error
Type
number

interpretUrl(url) → {external:LinphoneAddress}

Interpret a call destination as supplied by the user, and returns a fully qualified LinphoneAddress.
Parameters:
Name Type Description
url string -
Source:
Returns:
Type
external:LinphoneAddress

invite(url) → {external:LinphoneCall}

Initiates an outgoing call
Parameters:
Name Type Description
url string the destination of the call (sip address, or phone number).
Source:
Returns:
Type
external:LinphoneCall

inviteAddress(addr) → {external:LinphoneCall}

Initiates an outgoing call given a destination LinphoneAddress
Parameters:
Name Type Description
addr external:LinphoneAddress the destination of the call (sip address).
Source:
Returns:
Type
external:LinphoneCall

inviteAddressWithParams(addr, params) → {external:LinphoneCall}

Initiates an outgoing call given a destination LinphoneAddress
Parameters:
Name Type Description
addr external:LinphoneAddress the destination of the call (sip address).
params external:LinphoneCallParams call parameters
Source:
Returns:
Type
external:LinphoneCall

inviteWithParams(url, params) → {external:LinphoneCall}

Initiates an outgoing call according to supplied call parameters
Parameters:
Name Type Description
url string the destination of the call (sip address, or phone number).
params external:LinphoneCallParams call parameters
Source:
Returns:
Type
external:LinphoneCall

iterate() → {void}

Main loop function. It is crucial that your application call it periodically.
Source:
Returns:
Type
void

leaveConference() → {number}

Moves the local participant out of the conference.
Source:
Returns:
Type
number

migrateToMultiTransport() → {number}

Migrate configuration so that all SIP transports are enabled. Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. This function helps application to migrate the configuration so that all transports are enabled. Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. This function must be used just after creating the core, before any call to
Source:
Returns:
Type
number

newAddress(address) → {external:LinphoneAddress}

Create a
Parameters:
Name Type Description
address string String containing the user supplied address
Source:
Returns:
Type
external:LinphoneAddress

newAuthInfo(username, userid, passwd, ha1, realm, domain) → {external:LinphoneAuthInfo}

Create an authentication information with default values from Linphone core.
Parameters:
Name Type Description
username string String containing the username part of the authentication credentials
userid string String containing the username to use to calculate the authentication digest (optional)
passwd string String containing the password of the authentication credentials (optional, either passwd or ha1 must be set)
ha1 string String containing a ha1 hash of the password (optional, either passwd or ha1 must be set)
realm string String used to discriminate different SIP authentication domains (optional)
domain string String containing the SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
Source:
Returns:
Type
external:LinphoneAuthInfo

newCallParams(call) → {external:LinphoneCallParams}

Create a LinphoneCallParams suitable for
Parameters:
Name Type Description
call external:LinphoneCall the call for which the parameters are to be build, or NULL in the case where the parameters are to be used for a new outgoing call.
Source:
Returns:
Type
external:LinphoneCallParams

newFriend() → {external:LinphoneFriend}

Create a default LinphoneFriend.
Source:
Returns:
Type
external:LinphoneFriend

newFriendWithAddress(address) → {external:LinphoneFriend}

Create a LinphoneFriend from the given address.
Parameters:
Name Type Description
address string A string containing the address to create the LinphoneFriend from
Source:
Returns:
Type
external:LinphoneFriend

newLpConfig(filename) → {external:LpConfig}

Create a LpConfig object from a user config file.
Parameters:
Name Type Description
filename string The filename of the config file to read to fill the instantiated LpConfig
Source:
Returns:
Type
external:LpConfig

newPresenceActivity(acttype, description) → {external:LinphonePresenceActivity}

Create a LinphonePresenceActivity with the given type and description.
Parameters:
Name Type Description
acttype linphone.PresenceActivityType The
description string An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
Source:
Returns:
Type
external:LinphonePresenceActivity

newPresenceModel() → {external:LinphonePresenceModel}

Create a default LinphonePresenceModel.
Source:
Returns:
Type
external:LinphonePresenceModel

newPresenceModelWithActivity(acttype, description) → {external:LinphonePresenceModel}

Create a LinphonePresenceModel with the given activity type and activity description.
Parameters:
Name Type Description
acttype linphone.PresenceActivityType The
description string An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
Source:
Returns:
Type
external:LinphonePresenceModel

newPresenceModelWithActivityAndNote(acttype, description, note, lang) → {external:LinphonePresenceModel}

Create a LinphonePresenceModel with the given activity type, activity description, note content and note language.
Parameters:
Name Type Description
acttype linphone.PresenceActivityType The
description string An additional description of the activity to set for the activity. Can be NULL if no additional description is to be added.
note string The content of the note to be added to the created model.
lang string The language of the note to be added to the created model.
Source:
Returns:
Type
external:LinphonePresenceModel

newPresenceNote(content, lang) → {external:LinphonePresenceNote}

Create a LinphonePresenceNote with the given content and language.
Parameters:
Name Type Description
content string The content of the note to be created.
lang string The language of the note to be created.
Source:
Returns:
Type
external:LinphonePresenceNote

newPresencePerson(id) → {external:LinphonePresencePerson}

Create a LinphonePresencePerson with the given id.
Parameters:
Name Type Description
id string The id of the person to be created.
Source:
Returns:
Type
external:LinphonePresencePerson

newPresenceService(id, basic_status, contact) → {external:LinphonePresenceService}

Create a LinphonePresenceService with the given id, basic status and contact.
Parameters:
Name Type Description
id string The id of the service to be created.
basic_status linphone.PresenceBasicStatus The basic status of the service to be created.
contact string A string containing a contact information corresponding to the service to be created.
Source:
Returns:
Type
external:LinphonePresenceService

newProxyConfig() → {external:LinphoneProxyConfig}

Create a proxy config with default values from Linphone core.
Source:
Returns:
Type
external:LinphoneProxyConfig

newPublish(resource, event, expires) → {external:LinphoneEvent}

Create a publish context for an event state. After being created, the publish must be sent using
Parameters:
Name Type Description
resource external:LinphoneAddress the resource uri for the event
event string the event name
expires number the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
Source:
Returns:
Type
external:LinphoneEvent

newSubscribe(resource, event, expires) → {external:LinphoneEvent}

Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before. Unlike
Parameters:
Name Type Description
resource external:LinphoneAddress the destination resource
event string the event name
expires number the whished duration of the subscription
Source:
Returns:
Type
external:LinphoneEvent

notifyAllFriends(presence) → {void}

Notify all friends that have subscribed
Parameters:
Name Type Description
presence external:LinphonePresenceModel to notify
Source:
Returns:
Type
void

pauseAllCalls() → {number}

Pause all currently running calls.
Source:
Returns:
Type
number

pauseCall(call) → {number}

Pauses the call. If a music file has been setup using
Parameters:
Name Type Description
call external:LinphoneCall -
Source:
Returns:
Type
number

payloadTypeEnabled(pt) → {boolean}

Tells whether the specified payload type is enabled.
Parameters:
Name Type Description
pt external:LinphonePayloadType The
Source:
Returns:
Type
boolean

payloadTypeIsVbr(pt) → {boolean}

Tells whether the specified payload type represents a variable bitrate codec.
Parameters:
Name Type Description
pt external:LinphonePayloadType The
Source:
Returns:
Type
boolean

playDtmf(dtmf, duration_ms) → {void}

Plays a dtmf sound to the local user.
Parameters:
Name Type Description
dtmf external:char DTMF to play ['0'..'16'] | '#' | '#'
duration_ms number duration in ms, -1 means play until next further call to
Source:
Returns:
Type
void

playLocal(audiofile) → {number}

Plays an audio file to the local user. This function works at any time, during calls, or when no calls are running. It doesn't request the underlying audio system to support multiple playback streams.
Parameters:
Name Type Description
audiofile string path to audio file in wav PCM 16 bit format.
Source:
Returns:
Type
number

publish(resource, event, expires, body) → {external:LinphoneEvent}

Publish an event state. This first create a LinphoneEvent with
Parameters:
Name Type Description
resource external:LinphoneAddress the resource uri for the event
event string the event name
expires number the lifetime of event being published, -1 if no associated duration, in which case it will not be refreshed.
body external:LinphoneContent the actual published data
Source:
Returns:
Type
external:LinphoneEvent

redirectCall(call, redirect_uri) → {number}

Redirect the specified call to the given redirect URI.
Parameters:
Name Type Description
call external:LinphoneCall The
redirect_uri string The URI to redirect the call to.
Source:
Returns:
Type
number

refreshRegisters() → {void}

force registration refresh to be initiated upon next iterate
Source:
Returns:
Type
void

rejectSubscriber(lf) → {void}

Black list a friend. same as
Parameters:
Name Type Description
lf external:LinphoneFriend to add
Source:
Returns:
Type
void

reloadSoundDevices() → {void}

Update detection of sound devices.
Source:
Returns:
Type
void

reloadVideoDevices() → {void}

Update detection of camera devices.
Source:
Returns:
Type
void

removeAuthInfo(info) → {void}

Removes an authentication information object.
Parameters:
Name Type Description
info external:LinphoneAuthInfo -
Source:
Returns:
Type
void

removeCallLog(call_log) → {void}

Remove a specific call log from call history list. This function destroys the call log object. It must not be accessed anymore by the application after calling this function.
Parameters:
Name Type Description
call_log external:LinphoneCallLog object to remove.
Source:
Returns:
Type
void

removeFriend(fr) → {void}

remove a friend from the buddy list
Parameters:
Name Type Description
fr external:LinphoneFriend to add
Source:
Returns:
Type
void

removeFromConference(call) → {number}

Remove a call from the conference.
Parameters:
Name Type Description
call external:LinphoneCall a call that has been previously merged into the conference.
Source:
Returns:
Type
number

removeListener(vtable) → {void}

remove a listener registred by linphone_core_add_listener.
Parameters:
Name Type Description
vtable external:LinphoneCoreVTable object
Source:
Returns:
Type
void

removeProxyConfig(config) → {void}

Removes a proxy configuration.
Parameters:
Name Type Description
config external:LinphoneProxyConfig -
Source:
Returns:
Type
void

removeSupportedTag(tag) → {void}

Remove a supported tag.
Parameters:
Name Type Description
tag string the tag to remove
Source:
Returns:
Type
void

resetMissedCallsCount() → {void}

Reset the counter of missed calls.
Source:
Returns:
Type
void

resumeCall(call) → {number}

Resumes the call.
Parameters:
Name Type Description
call external:LinphoneCall -
Source:
Returns:
Type
number

sendDtmf(dtmf) → {void}

Send the specified dtmf.
Parameters:
Name Type Description
dtmf external:char The dtmf name specified as a char, such as '0', '#' etc...
Source:
Returns:
Type
void

setAudioPortRange(min_port, max_port) → {void}

Sets the UDP port range from which to randomly select the port used for audio streaming.
Parameters:
Name Type Description
min_port number -
max_port number -
Source:
Returns:
Type
void

setCallErrorTone(reason, audiofile) → {void}

Assign an audio file to be played locally upon call failure, for a given reason.
Parameters:
Name Type Description
reason linphone.Reason the
audiofile string a wav file to be played when such call failure happens.
Source:
Returns:
Type
void

setPayloadTypeBitrate(pt, bitrate) → {void}

Set an explicit bitrate (IP bitrate, not codec bitrate) for a given codec, in kbit/s.
Parameters:
Name Type Description
pt external:LinphonePayloadType the
bitrate number the IP bitrate in kbit/s.
Source:
Returns:
Type
void

setUserAgent(ua_name, version) → {void}

Sets the user agent string used in SIP messages.
Parameters:
Name Type Description
ua_name string -
version string -
Source:
Returns:
Type
void

setVideoPortRange(min_port, max_port) → {void}

Sets the UDP port range from which to randomly select the port used for video streaming.
Parameters:
Name Type Description
min_port number -
max_port number -
Source:
Returns:
Type
void

soundDeviceCanCapture(device) → {boolean}

Returns true if the specified sound device can capture sound.
Parameters:
Name Type Description
device string the device name as returned by
Source:
Returns:
Type
boolean

soundDeviceCanPlayback(device) → {boolean}

Returns true if the specified sound device can play sound.
Parameters:
Name Type Description
device string the device name as returned by
Source:
Returns:
Type
boolean

soundResourcesLocked() → {boolean}

Check if a call will need the sound resources.
Source:
Returns:
Type
boolean

startDtmfStream() → {void}

Special function to warm up dtmf feeback stream.
Source:
Returns:
Type
void

stopDtmf() → {void}

Stops playing a dtmf started by
Source:
Returns:
Type
void

stopDtmfStream() → {void}

Special function to stop dtmf feed back function. Must be called before entering BG mode
Source:
Returns:
Type
void

stopRinging() → {void}

Whenever the liblinphone is playing a ring to advertise an incoming call or ringback of an outgoing call, this function stops the ringing. Typical use is to stop ringing when the user requests to ignore the call.
Source:
Returns:
Type
void

subscribe(resource, event, expires, body) → {external:LinphoneEvent}

Create an outgoing subscription, specifying the destination resource, the event name, and an optional content body. If accepted, the subscription runs for a finite period, but is automatically renewed if not terminated before.
Parameters:
Name Type Description
resource external:LinphoneAddress the destination resource
event string the event name
expires number the whished duration of the subscription
body external:LinphoneContent an optional body, may be NULL.
Source:
Returns:
Type
external:LinphoneEvent

terminateAllCalls() → {number}

Terminates all the calls.
Source:
Returns:
Type
number

terminateCall(call) → {number}

Terminates a call.
Parameters:
Name Type Description
call external:LinphoneCall the LinphoneCall object representing the call to be terminated.
Source:
Returns:
Type
number

terminateConference() → {number}

Terminates the conference and the calls associated with it.
Source:
Returns:
Type
number

transferCall(call, refer_to) → {number}

Performs a simple call transfer to the specified destination.
Parameters:
Name Type Description
call external:LinphoneCall -
refer_to string -
Source:
Returns:
Type
number

transferCallToAnother(call, dest) → {number}

Transfer a call to destination of another running call. This is used for "attended transfer" scenarios.
Parameters:
Name Type Description
call external:LinphoneCall a running call you want to transfer
dest external:LinphoneCall a running call whose remote person will receive the transfer
Source:
Returns:
Type
number

uninit() → {number}

Stops the execution and uninitializes the LinphoneCore.
Source:
Returns:
0 if successful, any other value on error
Type
number

updateCall(call, params) → {number}

Updates a running call according to supplied call parameters or parameters changed in the LinphoneCore.
Parameters:
Name Type Description
call external:LinphoneCall the call to be updated
params external:LinphoneCallParams the new call parameters to use. (may be NULL)
Source:
Returns:
Type
number

uploadLogCollection() → {void}

Upload the log collection to the configured server url.
Source:
Returns:
Type
void

usePreviewWindow(yesno) → {void}

Tells the core to use a separate window for local camera preview video, instead of inserting local view within the remote video window.
Parameters:
Name Type Description
yesno boolean TRUE to use a separate window, FALSE to insert the preview in the remote video window.
Source:
Returns:
Type
void

verifyServerCertificates(yesno) → {void}

Specify whether the tls server certificate must be verified when connecting to a SIP/TLS server.
Parameters:
Name Type Description
yesno boolean -
Source:
Returns:
Type
void

verifyServerCn(yesno) → {void}

Specify whether the tls server certificate common name must be verified when connecting to a SIP/TLS server.
Parameters:
Name Type Description
yesno boolean -
Source:
Returns:
Type
void

Events

authInfoRequested

event for requesting authentication information to application or user.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
realm string the realm (domain) on which authentication is required.
username string the username that needs to be authenticated. Application shall reply to this callback using
domain string -
Source:

buddyInfoUpdated

event prototype
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
lf external:LinphoneFriend -
Source:

callEncryptionChanged

Call encryption changed event.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
call external:LinphoneCall the call on which encryption is changed.
on boolean whether encryption is activated.
authenticationToken string an authentication_token, currently set for ZRTP kind of encryption only.
Source:

callLogUpdated

event to notify a new call-log entry has been added. This is done typically when a call terminates.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
newcl external:LinphoneCallLog the new call log entry added.
Source:

callStateChanged

Call state notification event.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
call external:LinphoneCall the call object whose state is changed.
cstate linphone.CallState the new state of the call
message string an informational message about the state.
Source:

callStatsUpdated

event for receiving quality statistics for calls.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
call external:LinphoneCall the call
stats external:LinphoneCallStats the call statistics.
Source:

cbFunc

event prototype
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
userData void -
Source:

configuringStatus

event prototype for configuring status changes notification
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
status linphone.ConfiguringState informational message.
message string -
Source:

dtmfReceived

event for being notified of DTMFs received.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the linphone core
call external:LinphoneCall the call that received the dtmf
dtmf number the ascii code of the dtmf
Source:

fileTransferProgressIndication

File transfer progress indication event prototype.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
message external:LinphoneChatMessage message from which the body is received.
content external:LinphoneContent incoming content information
offset number The number of bytes sent/received since the beginning of the transfer.
total number The total number of bytes to be sent/received.
Source:

fileTransferRecv

File transfer receive event prototype. This function is called by the core upon an incoming File transfer is started. This function may be call several time for the same file in case of large file.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
message external:LinphoneChatMessage message from which the body is received.
content external:LinphoneContent incoming content information
buff string pointer to the received data
size number number of bytes to be read from buff. 0 means end of file.
Source:

fileTransferSend

File transfer send event prototype. This function is called by the core upon an outgoing File transfer is started. This function is called until size is set to 0.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
message external:LinphoneChatMessage message from which the body is received.
content external:LinphoneContent outgoing content
buff string pointer to the buffer where data chunk shall be written by the app
size number as input value, it represents the number of bytes expected by the framework. As output value, it means the number of bytes wrote by the application in the buffer. 0 means end of file.
Source:

globalStateChanged

Global state notification event.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
gstate linphone.GlobalState the global state
message string informational message.
Source:

infoReceived

event prototype for receiving info messages.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
call external:LinphoneCall the call whose info message belongs to.
msg external:LinphoneInfoMessage the info message.
Source:

isComposingReceived

Is composing notification event prototype.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
room external:LinphoneChatRoom involved in the conversation.
Source:

logCollectionUploadProgressIndication

event prototype for reporting log collection upload progress indication.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore LinphoneCore object
offset number Percentage of the file size of the log collection already uploaded.
total number -
Source:

logCollectionUploadStateChanged

event prototype for reporting log collection upload state change.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore LinphoneCore object
state linphone.CoreLogCollectionUploadState The state of the log collection upload
info string Additional information: error message in case of error state, URL of uploaded file in case of success.
Source:

messageReceived

Chat message event prototype
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
room external:LinphoneChatRoom involved in this conversation. Can be be created by the framework in case
message external:LinphoneChatMessage incoming message
Source:

networkReachable

event prototype for reporting network change either automatically detected or notified by
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
reachable boolean true if network is reachable.
Source:

newSubscriptionRequested

Reports that a new subscription request has been received and wait for a decision. Status on this subscription request is notified by
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object
lf external:LinphoneFriend corresponding to the subscriber
url string of the subscriber Callback prototype
Source:

notifyPresenceReceived

Report status change for a friend previously
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore object .
lf external:LinphoneFriend Updated
Source:

notifyReceived

event prototype for notifying the application about notification received from the network.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
lev external:LinphoneEvent -
notifiedEvent string -
body external:LinphoneContent -
Source:

publishStateChanged

event prototype for notifying the application about changes of publish states.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
lev external:LinphoneEvent -
state linphone.PublishState -
Source:

referReceived

event prototype
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
referTo string -
Source:

registrationStateChanged

Registration state notification event prototype
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
cfg external:LinphoneProxyConfig -
cstate linphone.RegistrationState -
message string -
Source:

subscriptionStateChanged

event prototype for notifying the application about changes of subscription states, including arrival of new subscriptions.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore -
lev external:LinphoneEvent -
state linphone.SubscriptionState -
Source:

transferStateChanged

event for notifying progresses of transfers.
Type:
  • object
Properties:
Name Type Description
lc external:LinphoneCore the LinphoneCore
transfered external:LinphoneCall the call that was transfered
newCallState linphone.CallState the state of the call to transfer target at the far end.
Source: