Repository navigation
WebRTC Support (Preview)
This release expands the new WebRTC support in gophone, adding configurable ICE, STUN, and connection policies to both dial and answer, built on diago library with new WebRTC support for VOIP
Examples
Dial using a STUN server:
gophone webrtc dial \
-webrtc_ice_server stun:stun.l.google.com:19302 \
sip:echo@example.comAnswer with TCP ICE candidates:
gophone webrtc answer \
-webrtc_tcp_candidates_addr 0.0.0.0:8443 \
-l 0.0.0.0:5060-webrtc_tcp_candidates_addr is a shortcut that selects tcp4, configures the TCP mux address, and enables active TCP candidates.
gophone webrtc dial -h
Usage: dial SIPURI
SIPURI format:
exten
sip:user@ip
Flags:
-answertime duration
Hangup after this timeout. Default 1 hour (default 1h0m0s)
-audio_formats string
Audio Formats to as mime types (default "pcmu,pcma")
-dialtime duration
Dial timeout (default 32s)
-dns_srv
Prefer DNS SRV lookup
-f Do not wait CANCEL
-l string
My listen ip
-listen
Server and Listen (Bind) to interface. Default false
-media string
Can be log|audio|mic|speaker|file=<wav>. Split in and out with in: or out: prefix. Audio/mic/speaker sends/recv audio on devices. Default is just logging RTP/RTCP stats (default "log")
-password string
Password for digest auth
-rewrite_contact
Use source to send request
-sipheader value
Custom sip headers to add on INVITE. Can be multiple defined
-t string
SIP Transport (default "ws")
-ua string
User agent of phone (default "sipgo")
-ua_host string
UA hostname which will apply on 'From' header
-username string
Username for digest auth
-webrtc_ice_candidate_type value
ICE candidate type to gather: host|srflx|relay. Can be repeated or comma separated
-webrtc_ice_disconnected_timeout duration
ICE disconnected timeout; 0 uses the Diago default
-webrtc_ice_failed_timeout duration
ICE failed timeout; 0 uses the Diago default
-webrtc_ice_include_loopback
Include loopback addresses in ICE candidates
-webrtc_ice_interface value
Network interface to allow for ICE gathering. Can be repeated or comma separated
-webrtc_ice_ip value
Local ICE candidate IP or CIDR to allow. Can be repeated or comma separated
-webrtc_ice_ip_family value
ICE IP family to gather: ipv4|ipv6. Can be repeated or comma separated
-webrtc_ice_keepalive_interval duration
ICE keepalive interval; 0 uses the Diago default
-webrtc_ice_port_max uint
Maximum UDP port for ICE candidates; set together with -webrtc_ice_port_min
-webrtc_ice_port_min uint
Minimum UDP port for ICE candidates; set together with -webrtc_ice_port_max
-webrtc_ice_remote_ip value
Remote ICE candidate IP or CIDR to allow. Can be repeated or comma separated
-webrtc_ice_server value
ICE server URL, for example stun:stun.l.google.com:19302. Can be repeated or comma separated
-webrtc_network_type value
Deprecated alias for -webrtc_ice_ip_family; accepts udp4|udp6
Interactive STDIN mode:
dtmf=digit Sends DTMF
wait=duration Sleeps some time
hangup Hangups call
gophone webrtc answer -h
Usage of answer:
-answertime duration
Answer time which follows with hangup/BYE (default 5m0s)
-audio_formats string
Audio Formats to as mime types (default "pcmu,pcma")
-code int
Answer status code (default 200)
-l string
My listen ip. NOTE: UDP gophone does not reuse listener unless host and port are provided
-media string
Can be log|audio|mic|speaker|file=<wav>|stdin. Split in and out with in: or out: prefix. Audio/mic/speaker sends/recv audio on devices. stdin supports only wav. Default is just logging RTP/RTCP stats (default "log")
-password string
Password for digest auth
-reason string
Answer reason (default "OK")
-record string
Start recording on this file. Recording is stored as WAV stereo
-register string
Register sip addr in format <host>:<port>
-rewrite_contact
Use source to send request (default true)
-ringtime duration
Answer ring timeout
-sip_header value
Custom sip headers to add on INVITE. Can be multiple defined
-sipheader value
DEPRECATED! Alias for sip_header
-t string
SIP Transport (default "ws")
-transcribe
Transcribe audio
-transcribe_lang string
Transcribe language
-transfer string
Transfer uri
-transfer_delay string
Transfer delay (default "0s")
-transfer_type string
blind|attended Default: blind (default "blind")
-ua string
User agent of phone (default "sipgo")
-ua_host string
UA hostname which will aply on From header (default "localhost")
-username string
Username for digest auth
-webrtc_ice_candidate_type value
ICE candidate type to gather: host|srflx|relay. Can be repeated or comma separated
-webrtc_ice_disconnected_timeout duration
ICE disconnected timeout; 0 uses the Diago default
-webrtc_ice_failed_timeout duration
ICE failed timeout; 0 uses the Diago default
-webrtc_ice_include_loopback
Include loopback addresses in ICE candidates
-webrtc_ice_interface value
Network interface to allow for ICE gathering. Can be repeated or comma separated
-webrtc_ice_ip value
Local ICE candidate IP or CIDR to allow. Can be repeated or comma separated
-webrtc_ice_ip_family value
ICE IP family to gather: ipv4|ipv6. Can be repeated or comma separated
-webrtc_ice_keepalive_interval duration
ICE keepalive interval; 0 uses the Diago default
-webrtc_ice_port_max uint
Maximum UDP port for ICE candidates; set together with -webrtc_ice_port_min
-webrtc_ice_port_min uint
Minimum UDP port for ICE candidates; set together with -webrtc_ice_port_max
-webrtc_ice_remote_ip value
Remote ICE candidate IP or CIDR to allow. Can be repeated or comma separated
-webrtc_ice_server value
ICE server URL, for example stun:stun.l.google.com:19302. Can be repeated or comma separated
-webrtc_network_type value
Deprecated alias for -webrtc_ice_ip_family; accepts udp4|udp6
Browser based built in with logs of everything what is happening. (May not be released)
gophone webrtc browser -server ws://127.0.0.1:15060
