Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hemantsonu20/sip-parser-antlr

A sip uri parser written using Antlr
https://github.com/hemantsonu20/sip-parser-antlr

antlr java java-8 maven sip sip-parser sip-uri

Last synced: about 2 months ago
JSON representation

A sip uri parser written using Antlr

Awesome Lists containing this project

README

        

# sip-parser-antlr

## Overview
A sip uri parser written with using [antlr](http://www.antlr.org/)

The grammar of the sip uri is based on the [RFC-3261](https://www.ietf.org/rfc/rfc3261.txt) with some minor exceptions.

A typical sip-uri takes up the form
```
sip:[email protected]:80;uriparam1=urivalue1;uriparam2?headerkey1=headerValue1
```

The library parses this sip uri and returns a java class [SipUriInfo](src/main/java/com/github/sip/SipUriInfo.java).
It has following fields.

```java
private boolean isSips;
private String userInfo;
private String host;
private int port = -1;
private Map uriParameters;
private Map headers;
```

## Examples
```java
// to parse sip uri
SipUriInfo info = SipUtils.parseSipUri("sip:[email protected]:80;uriparam1=urivalue1;uriparam2?headerkey1=headerValue1");

// to parse sips uri
SipUriInfo info = SipUtils.parseSipsUri("sips:[email protected]:80;uriparam1=urivalue1;uriparam2?headerkey1=headerValue1");
```
For more examples see [TestSipUtils](src/test/java/com/github/sip/TestSipUtils.java)

## Maven Artifact
```xml

com.github.hemantsonu20
sip-parser-antlr
1.0.0

```

## Latest Published Version
1.0.0 published on July 13th 2016

## License
[Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0)