Socket
Socket
Sign inDemoInstall

parse-sip-uri

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    parse-sip-uri

Parses SIP URL and returns user portion only


Version published
Weekly downloads
20
Maintainers
1
Install size
2.47 kB
Created
Weekly downloads
 

Readme

Source

parse-sip-uri

This package parses a SIP URI. Ex. sip:+12345678900@somedomain.com;transport=tcp

Description

In some projects, it's necessary to derive information from a SIP URI. While it's easy enough to do this within the code, I wanted a package to use instead of continually rewritting the same lines.

The function returns an object with the parsed data.

Getting Started

Dependencies

No dependencies

Installing

npm i parse-sip-uri

Executing program


const obj = parseSipUri("sip:1234512345@domain.com");

console.log(obj);

{
  Protocol: 'sip',
  User: '1234512345',
  Domain: 'domain.com',
  TransportProtocol: 'udp',
  E164Number: '+11234512345',
  encodedURIComponentNumber: '%2B11234512345'
}

Help

Authors

Contributors names and contact info

Michael Herman - michael@thehermans.org

Version History

  • 1.0
    • Initial Release
  • 1.1
    • Changed to return object instead of single value

FAQs

Last updated on 17 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc