Core Module

Most-Voip API - VoipLib Class

class most.voip.api.VoipLib(backend=None)[source]

It is the core class of the Library, that allows you to:

  • initialize the Voip Library
  • create an account and register it on a remote Sip Server
  • make a call
  • listen for incoming calls and answer
answer_call()[source]

Answer the current incoming call.

destroy_lib()[source]

Destroy the Voip Lib and free all allocated resources.

get_account()[source]

Get informations about the local account

Returns:an most.voip.interfaces.IAccount object containing informations about the local sip account
get_call()[source]

Get the current ICall instance

Returns:an most.voip.interfaces.ICall object containing informations about the current call
get_server()[source]

Get informations about the remote sip server

Returns:an most.voip.interfaces.IServer object containing informations about the remote sip server
hangup_call()[source]

Hangup the currently active call

hold_call()[source]

Put the currently active call on hold status

init_lib(params, notification_cb)[source]

Initialize the voip library

Parameters:
  • params – a dictionary containing all initialization parameters
  • notification_cb – a callback method called by the library for all event notificationa (status changes, errors, events and so on)
Returns:

True if the initialization request completes without errors, False otherwise

make_call(extension)[source]

Make a call to the specified extension

Parameters:extension – the extension to dial
register_account()[source]

Register the account specified into the params dictionary passed to the init_lib() method

unhold_call()[source]

Put the currently active call on active status

unregister_account()[source]

Unregister the account specified in the params dictionary passed to the init_lib() method