helper

package
v0.0.0-...-d1b5710 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2021 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	SipCallIdentityHeader = "sip_h_X-Tiniyo-Phone"
	ExportVars            = "'tiniyo_accid\\,tiniyo_rate\\,tiniyo_pulse\\,parent_call_uuid\\,parent_call_sid'"
	DefaultCodecs         = "'PCMU,PCMA'"
	DefaultCallerIdType   = "pid"
	InstantRingback       = "true"
	RingBack              = "'%(2000\\,4000\\,440\\,480)'"
)

Variables

This section is empty.

Functions

func ConvertMapToDialString

func ConvertMapToDialString(dialVars map[string]string) (string, bool)

generating the dial string from vars

func CreateToken

func CreateToken(jwtInfos JwtTokenInfos) (string, error)

func DtmfSanity

func DtmfSanity(number string) string

func GenDialString

func GenDialString(cr *models.CallRequest) string

creating map of dial vars

func Get

func Get(callSid string, restData map[string]interface{}, urls string) (int, []byte, error)

func IsSipCall

func IsSipCall(dest string) bool

func IsValidCallReason

func IsValidCallReason(reason string) bool

func IsValidRecordValue

func IsValidRecordValue(record string) bool

func IsValidRecordingStatusCallbackEvent

func IsValidRecordingStatusCallbackEvent(event string) bool

func IsValidRecordingTrack

func IsValidRecordingTrack(track string) bool

func IsValidRingTone

func IsValidRingTone(ringtone string) bool

func IsValidTimeLimit

func IsValidTimeLimit(timeLimit string) bool

func IsValidTimeOut

func IsValidTimeOut(timeout string) bool

func IsValidTrim

func IsValidTrim(trim string) bool

func NumberSanity

func NumberSanity(number string) string

We will keep all phone number related utility here

func Post

func Post(callSid string, restData map[string]interface{}, urls string) (int, []byte, error)

func RemovePlus

func RemovePlus(number string) string

Types

type JwtTokenInfo

type JwtTokenInfo struct {
	Ip       string
	Username string
	Password string
}

type JwtTokenInfos

type JwtTokenInfos []JwtTokenInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL