Skip to content

maxsivanov/tls-sip-probe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TLS-SIP probe

This package can be used for:

  • Testing SIP server availability
  • Guess username/password pair is correct

The package is suitable for testing SIP-TLS servers with self-signed certificates. Certificate checks are disabled so be careful.

To be honest there are several approaches to do so.

But I found them to be cumbersome for such an easy task to probe SIP server.

SIP-TLS supports only digest auth according to RFC 2069 without "quality of protection" (qop) extensions introduced in RFC 2617.

It was tested against Asterisk, so is might be not working against other servers.

Install

npm i tls-sip-probe --save

Example

var sip = require("tls-sip-probe");

/**
 * sip.connect(
 *     host, 
 *     port (0 for default), 
 *     user, 
 *     password
 * );
 */

sip.connect("127.0.0.1", 0, "1000", "password", function (err, result) {
	if (!err) {
		if (result === sip.results.OK) {
   			console.log("OK");
   		}
   		if (result === sip.results.FORBIDDEN) {
   			console.log("INCORRECT USER/PASSWORD");
   		}
   }
});

About

Tests SIP-TLS server availability trying to REGISTER into it. Vanilla javascript for node.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published