feat: Add SIP Request Ping and Registration Options Feature#7073
feat: Add SIP Request Ping and Registration Options Feature#7073robertcoroianu wants to merge 24 commits intolouislam:masterfrom
Conversation
Remove SIP Notification provider Replace console.log method with log.
There was a problem hiding this comment.
Pull request overview
Adds a new SIP monitor type with UI/configuration fields and server-side SIP OPTIONS/REGISTER logic (including digest auth nc/cnonce handling).
Changes:
- Adds
sipas a selectable monitor type and introduces SIP-specific configuration fields in the edit UI. - Implements SIP OPTIONS/REGISTER requests (including digest auth) in the server utilities and adds a new SIP monitor-type handler.
- Persists SIP monitor settings via new DB columns and adds required dependencies.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/pages/EditMonitor.vue | Adds SIP monitor option and SIP-specific form sections/defaults. |
| src/lang/en.json | Introduces new i18n strings for SIP UI. |
| server/util-server.js | Adds SIP request helpers and digest auth construction (nc/cnonce). |
| server/uptime-kuma-server.js | Registers the new SIP monitor type key and import. |
| server/server.js | Persists SIP fields from incoming monitor config. |
| server/monitor-types/sip.js | New monitor type implementation for SIP checks and status handling. |
| server/model/monitor.js | Exposes SIP fields in monitor JSON + helper boolean parsing. |
| package.json | Adds sip and uuid dependencies. |
| db/knex_migrations/2026-03-01-0000-add-sip-fields.js | Adds SIP-related monitor columns. |
| db/knex_migrations/2026-03-01-0001-sip-auth.js | Adds SIP basic-auth credential columns. |
| sipUrl: this.sipUrl, | ||
| sipPort: this.sipPort, | ||
| sipProtocol: this.sipProtocol, | ||
| sipMethod: this.sipMethod, | ||
| sipMaintainence: this.isSipMaintainence(), | ||
| sipAuthMethod: this.sipAuthMethod, |
There was a problem hiding this comment.
The model is exposing SIP fields from this.sipUrl/sipPort/sipProtocol/..., but the migration defines sip_url/sip_port/sip_protocol/.... If the underlying BeanModel stores DB fields under their column names, these will likely be undefined on reads. Update these getters to reference the actual stored fields (or rename columns to match).
| sipUrl: this.sipUrl, | |
| sipPort: this.sipPort, | |
| sipProtocol: this.sipProtocol, | |
| sipMethod: this.sipMethod, | |
| sipMaintainence: this.isSipMaintainence(), | |
| sipAuthMethod: this.sipAuthMethod, | |
| sipUrl: this.sip_url, | |
| sipPort: this.sip_port, | |
| sipProtocol: this.sip_protocol, | |
| sipMethod: this.sip_method, | |
| sipMaintainence: this.isSipMaintainence(), | |
| sipAuthMethod: this.sip_auth_method, |
409f04b to
230c919
Compare
CommanderStorm
left a comment
There was a problem hiding this comment.
I have a few code comments below and copilot also has some.
Also, CI is not green 😉
| table.text("sip_basic_auth_user").defaultTo(null); | ||
| table.text("sip_basic_auth_pass").defaultTo(null); |
There was a problem hiding this comment.
I think we already have a username and password collum. Please reuse those
0d3f783 to
fb94ce6
Compare
Fix package-lock
Replace hostname and port fields with defaults Move sip methods from util-server Remove commented code Remove process-503-as-maintenance
c7b0920 to
a2d772e
Compare
|
I think you forgot to push some changes since you resolved #7073 (comment) but I don't think it is. |
Hi, sorry I forgot to delete the migration. Other have exam me I have kids 😅. I will fix it tonight |
|
I think Both files called |
769f727 to
d520e70
Compare
7a29427 to
f3ab240
Compare
| // Determine hash function based on server's algorithm | ||
| let hashFn; | ||
| if (algorithm.toLowerCase() === "sha-256" || algorithm.toLowerCase() === "sha256") { | ||
| hashFn = (data) => crypto.createHash("sha256").update(data).digest("hex"); |
Check failure
Code scanning / CodeQL
Use of password hash with insufficient computational effort High
| hashFn = (data) => crypto.createHash("sha256").update(data).digest("hex"); | ||
| } else { | ||
| // Default to MD5 (standard SIP digest auth per RFC 2617/3261) | ||
| hashFn = (data) => crypto.createHash("md5").update(data).digest("hex"); |
Check failure
Code scanning / CodeQL
Use of password hash with insufficient computational effort High
| hashFn = (data) => crypto.createHash("sha256").update(data).digest("hex"); | ||
| } else { | ||
| // Default to MD5 (standard SIP digest auth per RFC 2617/3261) | ||
| hashFn = (data) => crypto.createHash("md5").update(data).digest("hex"); |
Check failure
Code scanning / CodeQL
Use of a broken or weak cryptographic algorithm High
53b9bb6 to
8622006
Compare
Can you review again? Thank you |
I've made the change, and I refactored a bit |
|
Why are there sip options and a sip monitor? |
I guess you forget to remove |
6c5f532 to
81c469f
Compare
Hi, The SIP Options feature is a separate implementation that periodically sends PING (OPTIONS) requests to the server to verify its availability. As mentioned in the description: "In order to use the SIP Options Ping monitor, you need to install Uptime Kuma without Docker and also install the Sipsak client on your server." Additionally, this implementation can also use the REGISTER method. This allows you to verify that a user can successfully authenticate with the SIP server using a username and password, not just confirm that the server is responding. I know it's a bit confusing, but "REGISTER" in SIP is a bit simillar with "Authentication" process. https://pgkrishna.medium.com/sip-understanding-register-method-and-authentication-process-a008f884ff18 |
Yes, I will try to pay more attention to my commits |
So can we migrate the existing sip-options users into this system if this is a pure superset? |
I think for a period of time, at least, to go with both because maybe some people use it |
|
If this is a superset, please migrate the existing monitor. |
Understood, I will take a look at how to do it, but this week I'm quite busy. I will return when it is ready. Thank you |
Summary
This is a PR based on a previous one: #5382
Changes
Please follow this checklist to avoid unnecessary back and forth (click to expand)
I understand that I am responsible for and able to explain every line of code I submit.
Screenshots for Visual Changes
There are no visual modifications other then the previous PR Add SIP Request Ping and Registration Options Feature #5382