Documentation ¶
Overview ¶
MIT License
Copyright (c) 2018 Justus Rossmeier ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- func SetAudioPath(opt string) func(*Baresip) error
- func SetConfigPath(opt string) func(*Baresip) error
- func SetCtrlTCPAddr(opt string) func(*Baresip) error
- func SetDebug(opt bool) func(*Baresip) error
- func SetUserAgent(opt string) func(*Baresip) error
- func SetWsAddr(opt string) func(*Baresip) error
- type Baresip
- func (b *Baresip) Close()
- func (b *Baresip) Cmd(command, params, token string) error
- func (b *Baresip) CmdAccept() error
- func (b *Baresip) CmdAcceptdir(s string) error
- func (b *Baresip) CmdAnswermode(s string) error
- func (b *Baresip) CmdAuplay(s string) error
- func (b *Baresip) CmdAusrc(s string) error
- func (b *Baresip) CmdAutocmdinfo() error
- func (b *Baresip) CmdAutodial(s string) error
- func (b *Baresip) CmdAutodialadd(s string) error
- func (b *Baresip) CmdAutodialdel(s string) error
- func (b *Baresip) CmdAutodialdelay(n int) error
- func (b *Baresip) CmdAutohangup() error
- func (b *Baresip) CmdAutohangupdelay(n int) error
- func (b *Baresip) CmdAutohangupgap(s string) error
- func (b *Baresip) CmdCallstat() error
- func (b *Baresip) CmdContact_next() error
- func (b *Baresip) CmdContact_prev() error
- func (b *Baresip) CmdDial(s string) error
- func (b *Baresip) CmdDialcontact() error
- func (b *Baresip) CmdDialdir(s string) error
- func (b *Baresip) CmdHangup() error
- func (b *Baresip) CmdHangupID(callID string) error
- func (b *Baresip) CmdHangupall(s string) error
- func (b *Baresip) CmdInsmod(s string) error
- func (b *Baresip) CmdListcalls() error
- func (b *Baresip) CmdQuit() error
- func (b *Baresip) CmdReginfo() error
- func (b *Baresip) CmdRmmod(s string) error
- func (b *Baresip) CmdSetadelay(n int) error
- func (b *Baresip) CmdUadel(s string) error
- func (b *Baresip) CmdUadelall() error
- func (b *Baresip) CmdUafind(s string) error
- func (b *Baresip) CmdUanew(s string) error
- func (b *Baresip) CmdUareg(s string) error
- func (b *Baresip) CmdWs(raw []byte) error
- func (b *Baresip) GetEventChan() <-chan EventMsg
- func (b *Baresip) GetResponseChan() <-chan ResponseMsg
- func (b *Baresip) Run() error
- func (b *Baresip) SetOption(options ...func(*Baresip) error) error
- type CommandMsg
- type EventMsg
- type ResponseMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAudioPath ¶
SetAudioPath sets the audio path.
func SetConfigPath ¶
SetConfigPath sets the config path.
func SetCtrlTCPAddr ¶
SetCtrlTCPAddr sets the ctrl_tcp modules address.
func SetUserAgent ¶
SetUserAgent sets the UserAgent.
Types ¶
type Baresip ¶
type Baresip struct {
// contains filtered or unexported fields
}
func (*Baresip) CmdAcceptdir ¶
CmdAcceptdir will accept incoming call with audio and videodirection.
func (*Baresip) CmdAnswermode ¶
CmdAnswermode will set answer mode
func (*Baresip) CmdAutocmdinfo ¶
func (*Baresip) CmdAutodial ¶
CmdAutodial will dial number automatically
func (*Baresip) CmdAutodialadd ¶
func (*Baresip) CmdAutodialdel ¶
func (*Baresip) CmdAutodialdelay ¶
CmdAutodialdelay will set delay before auto dial [ms]
func (*Baresip) CmdAutohangup ¶
CmdAutohangup will hangup call automatically
func (*Baresip) CmdAutohangupdelay ¶
CmdAutohangupdelay will set delay before hangup [ms]
func (*Baresip) CmdAutohangupgap ¶
func (*Baresip) CmdCallstat ¶
CmdCallstat will show call status
func (*Baresip) CmdContact_next ¶
CmdContact_next will set next contact
func (*Baresip) CmdContact_prev ¶
CmdContact_prev will set previous contact
func (*Baresip) CmdDialcontact ¶
CmdDialcontact will dial current contact
func (*Baresip) CmdDialdir ¶
CmdDialdir will dial with audio and videodirection
func (*Baresip) CmdHangupID ¶
CmdHangupID will hangup call with Call-ID
func (*Baresip) CmdHangupall ¶
CmdHangupall will hangup all calls with direction
func (*Baresip) CmdListcalls ¶
CmdListcalls will list active calls
func (*Baresip) CmdReginfo ¶
CmdReginfo will list registration info
func (*Baresip) CmdSetadelay ¶
CmdSetadelay will set answer delay for outgoing call
func (*Baresip) CmdUadelall ¶
CmdUadelall will delete all User-Agents
func (*Baresip) GetEventChan ¶
GetEventChan returns the receive-only EventMsg channel for reading data.
func (*Baresip) GetResponseChan ¶
func (b *Baresip) GetResponseChan() <-chan ResponseMsg
GetResponseChan returns the receive-only ResponseMsg channel for reading data.
type CommandMsg ¶
type CommandMsg struct { Command string `json:"command,omitempty"` Params string `json:"params,omitempty"` Token string `json:"token,omitempty"` }
CommandMsg struct for ctrl_tcp
type EventMsg ¶
type EventMsg struct { Event bool `json:"event,omitempty"` Type string `json:"type,omitempty"` Class string `json:"class,omitempty"` AccountAOR string `json:"accountaor,omitempty"` Direction string `json:"direction,omitempty"` PeerURI string `json:"peeruri,omitempty"` PeerDisplayname string `json:"peerdisplayname,omitempty"` ID string `json:"id,omitempty"` RemoteAudioDir string `json:"remoteaudiodir,omitempty"` Param string `json:"param,omitempty"` RawJSON []byte `json:"-"` }
EventMsg