Documentation ¶
Overview ¶
Package digium facilitates serialization of configuration data for Digium phones.
Index ¶
Constants ¶
const ( MainPanel = "main" SidePanel = "side" )
Digium display panel names used for Smart BLF instructions.
Variables ¶
var D60 = Model{ Name: "D60", MainPanel: Panel{Width: 480, Height: 272, Fields: 1, Color: true}, }
D60 holds the specifications of the D60 model of phone.
var D62 = Model{ Name: "D62", MainPanel: Panel{Width: 480, Height: 272, Fields: 1, Color: true}, }
D62 holds the specifications of the D62 model of phone.
var D65 = Model{ Name: "D65", MainPanel: Panel{Width: 480, Height: 272, Fields: 5, Color: true}, }
D65 holds the specifications of the D65 model of phone.
var D70 = Model{ Name: "D70", MainPanel: Panel{Width: 320, Height: 160, Fields: 6}, SidePanel: Panel{Width: 113, Height: 357, Fields: 10}, }
D70 holds the specifications of the D70 model of phone.
var D80 = Model{ Name: "D80", MainPanel: Panel{Width: 800, Height: 1280, Fields: 20, Color: true}, }
D80 holds the specifications of the D80 model of phone.
Models is a lookup of Digium phone models by name.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { XMLName xml.Name `xml:"config"` SmartBLF SmartBLF `xml:"smart_blf,omitempty"` }
Config is a Digium configuration that can be serialized as XML.
type Contact ¶
type Contact struct { XMLName xml.Name `xml:"contact"` ServerUUID string `xml:"server_uuid,attr,omitempty"` ID string `xml:"id,attr,omitempty"` Prefix string `xml:"prefix,attr,omitempty"` FirstName string `xml:"first_name,attr"` SecondName string `xml:"second_name,attr,omitempty"` LastName string `xml:"last_name,attr,omitempty"` Suffix string `xml:"suffix,attr,omitempty"` Type string `xml:"contact_type,attr"` Organization string `xml:"organization,attr,omitempty"` JobTitle string `xml:"job_title,attr,omitempty"` Location string `xml:"location,attr,omitempty"` Notes string `xml:"notes,attr,omitempty"` AccountID string `xml:"account_id,attr,omitempty"` SubscriptionURI string `xml:"subscribe_to,attr,omitempty"` PictureURL string `xml:"picture,attr,omitempty"` PickupAction string `xml:"pickup_action,attr,omitempty"` Emails []ContactEmail `xml:"emails"` Actions []ContactAction `xml:"actions>action"` }
Contact is a Digium contact entry that can be serialized as XML.
type ContactAction ¶
type ContactAction struct { XMLName xml.Name `xml:"action"` ID string `xml:"id,attr"` Dial string `xml:"dial,attr,omitempty"` DialPrefix string `xml:"dial_prefix,attr,omitempty"` Label string `xml:"label,attr"` Name string `xml:"name,attr"` Headers []ContactHeader `xml:"headers"` }
ContactAction is an action that can be taken for a Digium contact.
type ContactEmail ¶
type ContactEmail struct { XMLName xml.Name `xml:"email"` Address string `xml:"address,attr"` Label string `xml:"label,attr"` Primary bool `xml:"primary,attr"` }
ContactEmail is an email address within a Digium contact entry.
type ContactGroup ¶
type ContactGroup struct { XMLName xml.Name `xml:"contacts"` Name string `xml:"group_name,attr"` ID string `xml:"id,attr"` Contacts []Contact }
ContactGroup is a Digium contact group.
type ContactHeader ¶
type ContactHeader struct { XMLName xml.Name `xml:"header"` Key string `xml:"key,attr"` Value string `xml:"value,attr"` }
ContactHeader is a header for a Digium contact action.
type DisplayRule ¶
type DisplayRule struct { XMLName xml.Name `xml:"display_rule"` ID string `xml:"id,attr,omitempty"` ActionID string `xml:"action_id,attr,omitempty"` PhoneState string `xml:"phone_state,attr,omitempty"` TargetStatus string `xml:"target_status,attr,omitempty"` Show bool `xml:"show,attr"` }
DisplayRule is a Digium display rule that can be serialized as XML.
type DisplayRuleList ¶
type DisplayRuleList struct { XMLName xml.Name `xml:"display_rules"` Rules []DisplayRule }
DisplayRuleList is an ordered list of Digium display rules that can be serialized as XML.
type Field ¶
type Field struct { XMLName xml.Name `xml:"blf_item"` Location string `xml:"location,attr"` Index int `xml:"index,attr"` Paging astval.OneZeroNone `xml:"paging,attr,omitempty"` ContactID string `xml:"contact_id,attr,omitempty"` AppID string `xml:"app_id,attr,omitempty"` Blank bool `xml:"blank,attr,omitempty"` Behaviors []FieldBehavior `xml:"behaviors,omitempty"` Indicators []FieldIndicator `xml:"indicators,omitempty"` }
Field is a Digium busy lamp field entry that can be serialized as XML.
type FieldBehavior ¶
type FieldBehavior struct { XMLName xml.Name `xml:"behavior"` PhoneState string `xml:"phone_state,attr,omitempty"` TargetStatus string `xml:"target_status,attr,omitempty"` PressAction string `xml:"press_action,attr,omitempty"` PressFunction string `xml:"press_function,attr,omitempty"` LongPressAction string `xml:"long_press_action,attr,omitempty"` LongPressFunction string `xml:"long_press_function,attr,omitempty"` }
FieldBehavior is a behavior entry for a Digium busy lamp field that can be serialized as XML.
type FieldIndicator ¶
type FieldIndicator struct { XMLName xml.Name `xml:"indicator"` TargetStatus string `xml:"target_status,attr,omitempty"` Ring bool `xml:"ring,attr,omitempty"` RingtoneID string `xml:"ringtone_id,attr,omitempty"` LEDColor string `xml:"led_color,attr,omitempty"` LEDState string `xml:"led_state,attr,omitempty"` ForegroundColor string `xml:"line_label_fgcolor,attr,omitempty"` // D6x phones only BackgroundColor string `xml:"line_label_bgcolor,attr,omitempty"` // D6x phones only }
FieldIndicator is an indicator entry for a Digium busy lamp field that can be serialized as XML.
type FieldList ¶
type FieldList []Field
FieldList is an ordered list of Digium busy lamp field entries that can be serialized as XML.
func (FieldList) MarshalXML ¶
MarshalXML marshals the field list as XML.
func (*FieldList) UnmarshalXML ¶
UnmarshalXML marshals the field list as XML.
type Panel ¶
type Panel struct { Width int // Display width in pixels Height int // Display height in pixels Color bool // Does it have a color display? Fields int // The number of busy lamp fields present on the display }
Panel describes the properties of a display panel on a model of Digium phone.
type Phonebook ¶
type Phonebook struct { XMLName xml.Name `xml:"phonebooks"` Groups []ContactGroup }
Phonebook is a Digium phonebook containing contact groups.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package contactbuilder converts astorg types into digium contacts.
|
Package contactbuilder converts astorg types into digium contacts. |
Package fieldbuilder converts astorg types into digium busy lamp fields.
|
Package fieldbuilder converts astorg types into digium busy lamp fields. |