Versions in this module Expand all Collapse all v0 v0.1.0 Jun 23, 2026 Changes in this version + func PasswordGrant(ctx context.Context, oauthBase, user, pass string) (string, error) + type Client struct + func Dial(ctx context.Context, opts Options) (*Client, error) + func (c *Client) ActiveCall() *bcv1.CallState + func (c *Client) AddConferenceMember(agentID, number string) error + func (c *Client) Answer(callID string) error + func (c *Client) Cache() *StateCache + func (c *Client) Close() error + func (c *Client) EndConference() error + func (c *Client) FlagRecording(callID string) error + func (c *Client) GetHistory(ctx context.Context, max, page int32) ([]*bcv1.CallRecord, error) + func (c *Client) GetPhonebook(ctx context.Context, max, page int32, query string) ([]*bcv1.PhonebookEntry, error) + func (c *Client) GetSmsThread(ctx context.Context, conversationID string, max, page int32) ([]*bcv1.SmsMessage, error) + func (c *Client) Hangup(callID string) error + func (c *Client) Hold(callID string, on bool) error + func (c *Client) HoldConferenceMember(memberID string, on bool) error + func (c *Client) KickConferenceMember(memberID string) error + func (c *Client) LeaveConference() error + func (c *Client) MarkConversationRead(conversationID string) error + func (c *Client) Mute(callID string, on bool) error + func (c *Client) MuteConferenceMember(memberID string, on bool) error + func (c *Client) PlaceCall(to, displayAsTo, displayAsFrom string, record bool) error + func (c *Client) Register(capabilities ...string) error + func (c *Client) ResetLineStatus() error + func (c *Client) SendDigits(callID, digits string) error + func (c *Client) SendSms(to, text, from string, session map[string]string) error + func (c *Client) SetAgentNumber(number string) error + func (c *Client) SetConversationOpen(conversationID string, open bool) error + func (c *Client) SetDisplayAs(number string) error + func (c *Client) SetPresence(name string) error + func (c *Client) SetRecordingTags(callID string, tags []string) error + func (c *Client) SetWebrtc(on bool) error + func (c *Client) StartConference(hold bool) error + func (c *Client) StartRecording(callID string) error + func (c *Client) Stats() (sent, received int64) + func (c *Client) StopRecording(callID string) error + func (c *Client) Subscribe(fn func(*bcv1.AgentView)) + func (c *Client) Transfer(callID, to, agentID, applicationID string, warm bool) error + func (c *Client) View() *bcv1.AgentView + func (c *Client) WrapUpCancel() error + func (c *Client) WrapUpExtend(seconds int32) error + type Media interface + Answer func(ctx context.Context, offer string) (answer string, err error) + Close func() error + Stats func() (sent, received int64) + func SyntheticMediaFactory(callID string) (Media, error) + type MediaFactory func(callID string) (Media, error) + type Options struct + Addr string + AutoAnswer bool + Media MediaFactory + OnError func(*bcv1.Error) + OnGap func() + Token string + type StateCache struct + func (sc *StateCache) Apply(u *bcv1.StateUpdate) (gap bool) + func (sc *StateCache) Subscribe(fn func(*bcv1.AgentView)) + func (sc *StateCache) View() *bcv1.AgentView