package checker import ( "time" sdk "git.happydns.org/checker-sdk-go/checker" ) // Version is reported in CheckerDefinition.Version. Overridden at build // time by main / plugin. var Version = "built-in" func (p *sipProvider) Definition() *sdk.CheckerDefinition { return &sdk.CheckerDefinition{ ID: "sip", Name: "SIP / VoIP server", Version: Version, Availability: sdk.CheckerAvailability{ ApplyToService: true, LimitToServices: []string{"abstract.SIP"}, }, HasHTMLReport: true, ObservationKeys: []sdk.ObservationKey{ObservationKeySIP}, Options: sdk.CheckerOptionsDocumentation{ RunOpts: []sdk.CheckerOptionDocumentation{ { Id: "domain", Type: "string", Label: "SIP domain", AutoFill: sdk.AutoFillDomainName, Required: true, }, { Id: "timeout", Type: "number", Label: "Per-endpoint timeout (seconds)", Default: 5, }, }, AdminOpts: []sdk.CheckerOptionDocumentation{ { Id: "probeUDP", Type: "bool", Label: "Probe _sip._udp", Default: true, Description: "Disable if the checker host cannot send UDP.", }, { Id: "probeTCP", Type: "bool", Label: "Probe _sip._tcp", Default: true, }, { Id: "probeTLS", Type: "bool", Label: "Probe _sips._tcp (TLS)", Default: true, }, }, }, Rules: Rules(), Interval: &sdk.CheckIntervalSpec{ Min: 5 * time.Minute, Max: 7 * 24 * time.Hour, Default: 6 * time.Hour, }, } }