API

Fields

Channel.call

Call of the channel

Channel.server

Server of the channel. When server is removed all channels are deleted.

Methods

Channel.on_ami_new_channel(event)

AMI NewChannel event is processed to create a new channel in Odoo.

Channel.on_ami_update_channel_state(event)

AMI Newstate event. Write call status and ansered time, create channel message and call event log records. Processed when channel’s state changes.

Channel.on_ami_hangup(event)

AMI Hangup event. Returns tuple (channel.id, message)

Servers

Channels

Res Users

ResUser.asterisk_plus_notify(message, title='PBX', uid=None, sticky=False, warning=False)

Send a notification to logged in Odoo user.

Parameters
  • message (str) – Notification message.

  • title (str) – Notification title. If not specified: PBX.

  • uid (int) – Odoo user UID to send notification to. If not specified: calling user UID.

  • sticky (boolean) – Make a notiication message sticky (shown until closed). Default: False.

  • warning (boolean) – Make a warning notification type. Default: False.

Returns

Always True.

PBX User

PbxUser.has_asterisk_plus_group()

Used from actions.js to check if Odoo user is enabled to use Asterisk applications in order to start a bus listener.