OpenSIPS Workshop. Federated SIP with OpenSIPS and RTPEngine

Similar documents
INTERFACE SPECIFICATION SIP Trunking. 8x8 SIP Trunking. Interface Specification. Version 2.0

ENSC 833-3: NETWORK PROTOCOLS AND PERFORMANCE. Implement Session Initiation Protocol (SIP) User Agent Prototype

ICE: the ultimate way of beating NAT in SIP

Understanding SIP exchanges by experimentation

Session Initiation Protocol (SIP) Overview

Technical specifications for connecting SIP PBX to the Business Trunk service by Slovak Telekom without registration, with static routing.

SIP Reliable Provisional Response on CUBE and CUCM Configuration Example

Grandstream Networks, Inc. DNS SRV Guide

How to set FAX on asterisk

TSM350G Midterm Exam MY NAME IS March 12, 2007

Application Scenario 1: Direct Call UA UA

SIP Trunk design and deployment in Enterprise UC networks

Domain-Based Routing Support on the Cisco UBE

ControlONE Technical Guide

Session Initiation Protocol (SIP) Overview

FreeSWITCH IP PBX with Secure Twilio Elastic SIP Trunking

Just how vulnerable is your phone system? by Sandro Gauci

Tech-invite. RFC 3261's SIP Examples. biloxi.com Registrar. Bob's SIP phone

Application Notes for Configuring Avaya IP Office 8.1 with Etisalat SIP Trunk service Issue 1.0

Reserving N and N+1 Ports with PCP

RFC 3665 Basic Call Flow Examples

Technical specifications for connecting SIP PBX to the Business Trunk service by Slovak Telekom.

PCP NAT64 Experiments

Configuring SIP MWI Features

GSM VoIP Gateway Series

Application Notes for IntelePeer CoreCloud SIP Trunking Service with Avaya IP Office Release Issue 1.0

SIP Protocol Debugging Service

SIP Compliance APPENDIX

SOHO 3G Gateway Series

Avaya IP Office 4.1 SIP Customer Configuration Guide For use with AT&T IP Flexible Reach. Issue th April 2008

a. Draw a network diagram, showing how a telephone in the US would make calls to a telephone on Deception Island. (15 points).

SIP Trunking & Peering Operation Guide

Using Genband E911 on Yealink IP Phones

Compliance with RFC 3261

Extensions to Session Initiation Protocol (SIP) and Peer-to-Peer SIP

Extensions to SIP and P2PSIP

Signaling trace on GSM/CDMA VoIP Gateway

Mid-call Re-INVITE/UPDATE Consumption

Chapter 3: IP Multimedia Subsystems and Application-Level Signaling

SIP System Features. SIP Timer Values. Rules for Configuring the SIP Timers CHAPTER

SIP System Features. Differentiated Services Codepoint CHAPTER

Journal of Information, Control and Management Systems, Vol. X, (200X), No.X SIP OVER NAT. Pavel Segeč

SIP Server Deployment Guide. SRV address support in Contact and Record-Route headers

SAMSUNG SCM Compact SIP Interoperability Guide v2.0 Mar 2016

Implementation Profile for Interoperable Bridging Systems Interfaces (Phase 1)

Voice over IP (VoIP)

SIPPING Working Group A. Johnston, Ed. Internet-Draft Avaya Intended status: BCP R. Sparks Expires: January 12, 2009 Estacado Systems C. Cunningham S.

Information About SIP Compliance with RFC 3261

RFC 3666 SIP PSTN Call Flows 2 SIP to PSTN Dialing

Configuring Triggers. Viewing and Deleting Triggers

SIP Core SIP Technology Enhancements

Application Notes for Configuring SIP Trunking between Global Crossing SIP Trunking Service and an Avaya IP Office Telephony Solution Issue 1.

HT801/HT802 Firmware Release Note IMPORTANT UPGRADING NOTE

Application Notes for Windstream SIP Trunking Service using Broadsoft Platform with Avaya IP Office Issue 1.0

SIP System Features. SIP Timer Values. Rules for Configuring the SIP Timers CHAPTER

Configure Jabber to Use Custom Audio and Video Port Range on CUCM

Session Initiation Protocol (SIP) Basic Description Guide

Multimedia Communication

Technical specifications for connecting SIP PBX to the Business Trunk service by Slovak Telekom with registration of pilot account.

Department of Computer Science. Burapha University 6 SIP (I)

RFC 3666 SIP PSTN Call Flows 2 SIP to PSTN Dialing

Figure 1: Incoming and Outgoing messages where SIP Profiles can be applied

Application Notes for Configuring SIP Trunking between Bandwidth.com SIP Trunking Solution and an Avaya IP Office Telephony Solution Issue 1.

N-Squared Software SIP Specialized Resource Platform SIP-SDP-RTP Protocol Conformance Statement. Version 2.3

Application Notes for Configuring SIP Trunking between Cincinnati Bell Any Distance evantage and Avaya IP Office Issue 1.0

Analysing Protocol Implementations

Internet Streaming Media. Reji Mathew NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2006

SIP Devices Configuration

Configuring Multi-Tenants on SIP Trunks

SIP Devices Configuration

Application Notes for Configuring SIP Trunking between TelePacific SmartVoice SIP Connect and an Avaya IP Office Telephony Solution 1.

Internet Engineering Task Force. draft-ietf-sip-srv-04.txt dynamicsoft,columbia U. January 24, 2002 Expires: July SIP: Locating SIP Servers

SIP Session Initiation Protocol

Overview of SIP. Information About SIP. SIP Capabilities. This chapter provides an overview of the Session Initiation Protocol (SIP).

TSIN02 - Internetworking

MRCP Version 1. A.1 Overview

Figure 1: Incoming and Outgoing messages where SIP Profiles can be applied

Common Components. Cisco Unified Border Element (SP Edition) Configuration Profile Examples 5 OL

Abstract. Avaya Solution & Interoperability Test Lab

ALE Application Partner Program Inter-Working Report

Internet Streaming Media. Reji Mathew NICTA & CSE UNSW COMP9519 Multimedia Systems S2 2007

Technical User Guide. Baseband IP Voice handover interface specification

HT801/HT802 Firmware Release Note IMPORTANT UPGRADING NOTE

SIP Trunk design and deployment in Enterprise UC networks

RFC 3666 SIP PSTN Call Flows 2 SIP to PSTN Dialing

TLS for SIP and RTP. OpenWest Conference May 9, Corey zmonkey.org. v Corey Edwards, CC-BY-SA

DNS SRV Usage. All Mediatrix Units

Tech-invite RFC SIP PSTN Call Flows 3 PSTN to SIP Dialing. 3.1 Successful PSTN to SIP call

Abstract. Avaya Solution & Interoperability Test Lab

SIP INFO Method for DTMF Tone Generation

Voice over IP Consortium

SIP Transparency. Supported Features CHAPTER

Application Notes for Configuring SIP Trunking between McLeodUSA SIP Trunking Solution and an Avaya IP Office Telephony Solution Issue 1.

Session Initiation Protocol (SIP)

SIP Trunk design and deployment in Enterprise UC networks

This guide provides detailed information on how to configure and use server redundancy on Yealink IP phones.

SIP Tutorial. Leonid Consulting V1.4. Copyright Leonid Consulting, LLC (2007) All rights reserved.

HT812/HT814 Firmware Release Note IMPORTANT UPGRADING NOTE

IP Office Platform R11.0

Internet Engineering Task Force. dynamicsoft H.Schulzrinne Columbia U. draft-ietf-sip-srv-05.txt February 21, 2002 Expires: August 2002

Transcription:

OpenSIPS Workshop Federated SIP with OpenSIPS and RTPEngine

Who are you people? Eric Tamme Principal Engineer OnSIP Hosted PBX Hosted SIP Platform Developers of See: sipjs.com, or https://github.com/onsip/sip.js

Quick Outline VM Setup What is Federated SIP Federated SIP Proxy (RFC3263) REGEX based outbound translations Registrar Server Side NAT handling Media Relay

Get the code! Project Github page https://github.com/etamme/federated-sip Create a new Centos7, or Debian8 VM Preferably create a VM with a public IP address (Digital Ocean) Install git yum -y install git OR apt-get -y install git From your VM Clone the repo https://github.com/etamme/federated-sip.git

VM Setup cd federated-sip Run the install script as root scripts/centos7_install.sh OR scripts/debian8_install.sh DO NOT enter a domain or user, just press ENTER when prompted

What is the install script doing Installing dependencies Cloning repos OpenSIPS RTPEngine Sqlite3-pcre Compiling projects Creating opensips database Building opensips config from federated-sip Starting rtpengine and opensips Adding a user and domain

What is the federated-sip project? Reference implementation for OpenSIPS Federated SIP proxy General purpose: registrar, server side nat handling Multi protocol: UDP, TCP, TLS, WS WSS? RTP interop: RTP, SRTP, DTLS-SRTP My personal SIP service

What is federated SIP signalling? Core RFC3263 support locating sip servers Section 4: in all cases, the problem boils down to resolution of a SIP or SIPS URI in DNS to determine the IP address, port, and transport of the host to which the request is to be sent.

General process NAPTR query to get transports in SRV records SRV query to get A records for given transports and ports A record lookup to get IP If no NAPTR records are found, the client constructs SRV queries for those transport protocols it supports, and does a query for each.

gotchas If there is a port, only do an A record lookup transport parameter on uri SHOULD be used not MUST Host portion is an IP, but no transport SHOULD use UDP for SIP and TCP for SIPS

Locating SIP servers

Locating SIP servers: NAPTR

NAPTR Records federate.io NAPTR 10 100 "S" "SIP+D2U" "" _sip._udp.federate.io. federate.io NAPTR 20 100 "S" "SIP+D2T" "" _sip._tcp.federate.io. Priority Weight Flags: Service: Replacement S: SRV A: A A6: AAAA U: Absolute URI SIP+D2U: sip udp SIP+D2T: sip tcp SIPS+D2T: sip tcp SIP+D2W: sip ws SIPS+D2W: sip ws

Locating SIP servers: SRV

Locating SIP servers: A

Thats it! *for initial requests RFC3263 specifies that the same host must be used throughout the duration of the transaction. Responses route back following Via headers

Sequential request routing Initial requests are only half the picture Record Route # record route all requests b/c it doesn't hurt, and some # UA are buggy and throw away route sets if (!is_method("register")) { record_route(); } Loose Route # sequential requests should take the path built up from record-routing if (loose_route()) { xlog("l_info","$var(prefix) loose routing\n"); }

Real world example

U 2015/07/28 16:53:09.568040 199.7.175.103:5060 -> 50.198.204.238:5066 INVITE sip:eric.tamme@10.1.10.26:5066;transport=udp;aor=eric.tamme%40junctionnetworks.com SIP/2.0. Record-Route: <sip:199.7.175.103;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.604bdf12;ns=1;pr=1>. Record-Route: <sip:199.7.173.102;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.c7bb8835>. Record-Route: <sip:107.170.192.145;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.ce8aab34>. Via: SIP/2.0/UDP 199.7.175.103:5060;branch=z9hG4bK0f9d.dd184a3.0. Via: SIP/2.0/UDP 199.7.173.102:5060;branch=z9hG4bK0f9d.889da69.2. Via: SIP/2.0/UDP 107.170.192.145:5060;branch=z9hG4bK0f9d.136affc1.0. Via: SIP/2.0/UDP 10.1.10.29:38718;branch=z9hG4bKPjsqf0FITZ1BWPyZvUjJdy2sqiX5bgBk38. Max-Forwards: 67. From: "Eric Tamme" <sip:eric@uphreak.com>;tag=dsskm2peh-iftdatjmf4yuyapue8yyrv. To: sip:eric.tamme@junctionnetworks.com. Contact: "Eric Tamme" <sip:eric@50.198.204.238:38718;nat=yes>. Call-ID: TDwXjq9RQS7PZXFQlFAYcHh4noLcjbfa. CSeq: 26703 INVITE. Allow: INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Supported: replaces, timer, norefersub. Session-Expires: 1800. Min-SE: 90. User-Agent: Bria Android 3.2.4. Content-Type: application/sdp. Content-Length: 361.. v=0. o=- 3647091188 3647091188 IN IP4 107.170.192.145. s=cpc_med. c=in IP4 199.7.175.93. t=0 0. m=audio 62320 RTP/AVP 111 9 0 101. a=rtpmap:111 OPUS/48000/2. a=fmtp:111 maxplaybackrate=32000;useinbandfec=1. a=rtpmap:9 G722/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-16. a=ptime:20. a=sendrecv. a=rtcp:62321 IN IP4 199.7.175.93.

Real world example RR RR RR

U 2015/07/28 16:53:12.128224 50.198.204.238:1024 -> 199.7.175.103:5060 SIP/2.0 200 OK. Via: SIP/2.0/UDP 199.7.175.103:5060;branch=z9hG4bK0f9d.ed184a3.0. Via: SIP/2.0/UDP 199.7.173.102:5060;branch=z9hG4bK0f9d.889da69.0. Via: SIP/2.0/UDP 107.170.192.145:5060;branch=z9hG4bK0f9d.136affc1.0. Via: SIP/2.0/UDP 10.1.10.29:38718;;branch=z9hG4bKPjsqf0FITZ1BWPyZvUjJdy2sqiX5bgBk38. Record-Route: <sip:199.7.175.103;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.704bdf12;ns=1;pr=1>. Record-Route: <sip:199.7.173.102;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.c7bb8835>. Record-Route: <sip:107.170.192.145;lr;ftag=dsskm2peh-iftdatjmf4yuyapue8yyrv;did=5d5.ce8aab34>. From: "Eric Tamme" <sip:eric@uphreak.com>;tag=dsskm2peh-iftdatjmf4yuyapue8yyrv. To: <sip:eric.tamme@junctionnetworks.com>;tag=1839602824. Call-ID: TDwXjq9RQS7PZXFQlFAYcHh4noLcjbfa. CSeq: 26703 INVITE. Contact: <sip:eric.tamme@10.1.10.20:5060>. Supported: replaces, path, timer, eventlist. User-Agent: Grandstream GXV3275 1.0.3.30. Session-Expires: 1800;refresher=uac. Require: timer. Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE. Content-Type: application/sdp. Content-Length: 237.. v=0. o=eric.tamme 8000 8000 IN IP4 10.1.10.20. s=sip Call. c=in IP4 10.1.10.20. t=0 0. m=audio 5004 RTP/AVP 9 0 101. a=sendrecv. a=rtpmap:9 G722/8000. a=ptime:20. a=rtpmap:0 PCMU/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15.

Sequential request routing U 2015/07/28 13:01:39.279860 50.198.204.238:38718 -> 107.170.192.145:5060 BYE sip:eric.tamme*50.198.204.238!1024_n@199.7.175.103;gr SIP/2.0. Via: SIP/2.0/UDP 10.1.10.29:38718;rport;branch=z9hG4bKPjkTV7NVDDzF74SoHi8y3V6gel2trc.Mb7. Max-Forwards: 70. From: "Eric Tamme" <sip:eric@uphreak.com>;tag=yizu0f5vpglxblunhdyfwxd4m5mkacor. To: sip:eric.tamme@junctionnetworks.com;tag=1878718727. Call-ID: TDwXjq9RQS7PZXFQlFAYcHh4noLcjbfa. CSeq: 17180 BYE. Route: <sip:107.170.192.145;lr;ftag=yizu0f5vpglxblunhdyfwxd4m5mkacor;did=869.5a9ffc25>. Route: <sip:199.7.173.102;lr;ftag=yizu0f5vpglxblunhdyfwxd4m5mkacor;did=869.0b81b316>. Route: <sip:199.7.175.103;lr;ftag=yizu0f5vpglxblunhdyfwxd4m5mkacor;did=869.9a2f9f17;ns=1;pr=1>. User-Agent: Bria Android 3.2.4. Content-Length: 0..

REGEX based translations Match on REGEX user portion From domain From user User agent Translate Strip digits Add prefix Replace user Replace domain Replace port Strip port Add header Multiple matches with priority weights

Example translation insert into translations ( id,from_domain,match_regex, tran_user, tran_domain ) Values ( 1, 'proxy123.uphreak.com', '^1000$','eric', 'workshop.uphreak.com' );

Example translation insert into translations ( id,from_domain,match_regex, tran_domain, tran_strip ) Values ( 1, 'proxy123.uphreak.com', '^\+18[0678]{2}[0-9]{7}$', 'tf.arctele.com', 1 );

Code review Server side nat handling + Registrar RTPEngine media relaying and interop

Thank You OpenSIPS Team, and community Jarrod Baumann for federated-sip contributions Please checkout and use: https://github.com/etamme/federated-sip more users == better Contact sip:eric.tamme@onsip.com email:eric.tamme@onsip.com