Asterisk, Instant Messaging and Presence, how?



Similar documents
ASTERISK. Goal. Prerequisites. Asterisk IP PBX Configuration

Micronet VoIP Solution with Asterisk

Figure The scenario

SIP Essentials Training

Grandstream Networks, Inc. GXP2130/2140/2160 Auto-configuration Plug and Play

Asterisk Cluster with MySQL Replication. JR Richardson Engineering for the Masses

For internal circulation of BSNL only

Skype connect and Asterisk

Session Initiation Protocol (SIP) 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

How To Configure. VoIP Survival. with. Broadsoft Remote Survival

ScopTEL TM IP PBX Software. ITSP SIP Trunking Configuration

3.1 SESSION INITIATION PROTOCOL (SIP) OVERVIEW

Applications between Asotel VoIP and Asterisk

NAT TCP SIP ALG Support

Configuring the Cisco SPA8800 IP Telephony Gateway in an Asterisk Environment

FOSDEM 2007 Brussels, Belgium. Daniel Pocock B.CompSc(Melbourne)

How to make free phone calls and influence people by the grugq

Three-Way Calling using the Conferencing-URI

Request for Comments: August 2006

Formación en Tecnologías Avanzadas

Session Initiation Protocol

Session Initiation Protocol (SIP)

MOHAMED EL-SHAER Teaching Assistant. Room TASK Exercises Thu., Nov. 17, 2014 CONTENT

Mediatrix 3000 with Asterisk June 22, 2011

Voice over IP (SIP) Milan Milinković

SIPTAPI A TAPI service provider for SIP klaus.darilion@ipcom.at

Jive Connects for Openfire

MyIC setup and configuration (with sample configuration for Alcatel Lucent test environment)

TECHNICAL SUPPORT NOTE. 3-Way Call Conferencing with Broadsoft - TA900 Series

SIP : Session Initiation Protocol

SIP ALG - Session Initiated Protocol Applications- Level Gateway

LABORATORIUM 1 Setup and basic configuration of Asterisk BPX on Linux

NTP VoIP Platform: A SIP VoIP Platform and Its Services

Session Initiation Protocol and Services

proudly presents Homer-Shooting The secret Art of Troubleshooting VoIP in Real-Time with Homer & SIPGrep

How To Understand The Purpose Of A Sip Aware Firewall/Alg (Sip) With An Alg (Sip) And An Algen (S Ip) (Alg) (Siph) (Network) (Ip) (Lib

CommuniGate Pro Real-Time Features. CommuniGate Pro Internet Communications VoIP, , Collaboration, IM

Voice over IP Fundamentals

Guideline for SIP Trunk Setup

An outline of the security threats that face SIP based VoIP and other real-time applications

Manual. ABTO Software

Developing rich VoIP SIP applications with SIPSIMPLE SDK

AGILE SIP TRUNK IP-PBX Connection Manual (Asterisk)

SIP: Protocol Overview

Practical Guide. How to setup VoIP Infrastructure using AsteriskNOW

Asterisk Xenified. Saúl Ibarra Corretgé

OpenSIPS For Asterisk Users

SIP Basics. CSG VoIP Workshop. Dennis Baron January 5, Dennis Baron, January 5, 2005 Page 1. np119

1 SIP Carriers. 1.1 Tele Warnings Vendor Contact Versions Verified Interaction Center 2015 R2 Patch

spiderstar VoIP Interface Version 4.0 User manual

Using Polycom KIRK Wireless Server 300 or 6000 with Asterisk

Internet Voice, Video and Telepresence Harvard University, CSCI E-139. Lecture #5

Vulnerabilities in SOHO VoIP Gateways

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

internet technologies and standards

TSIN02 - Internetworking

VoIP some threats, security attacks and security mechanisms. Lars Strand RiskNet Open Workshop Oslo, 24. June 2009

Voice & Video. Conference Calls 4/43

EE4607 Session Initiation Protocol

Developing and Integrating Java Based SIP Client at Srce

Configuration Notes 290

Session Initiation Protocol (SIP)

Access to This Tutorial. What is XMPP. Ozgur Ozturk's Introduction to XMPP 1

AT&T SIP Trunk Compatibility Testing for Asterisk

Mobicents 2.0 The Open Source Communication Platform. DERUELLE Jean JBoss, by Red Hat 138

Cisco CME Features and Functionality

Voice over IP & Other Multimedia Protocols. SIP: Session Initiation Protocol. IETF service vision. Advanced Networking

Setup the Asterisk server with the Internet Gate

Session Initiation Protocol (SIP) Chapter 5

PortGo 6.0 for Wndows User Guide

1 SIP Carriers. 1.1 Tele Warnings Vendor Contact Versions Verified SIP Carrier status as of Jan 1,

NGN NNI Signalling Profile

Chapter 10 Session Initiation Protocol. Prof. Yuh-Shyan Chen Department of Computer Science and Information Engineering National Taipei University

Multimedia & Protocols in the Internet - Introduction to SIP

Transbox. User Manual

Analysis of a VoIP Attack

Part II. Prof. Ai-Chun Pang Graduate Institute of Networking and Multimedia, Dept. of Comp. Sci. and Info. Engr., National Taiwan University

SIP and ENUM. Overview DENIC. Introduction to SIP. Addresses and Address Resolution in SIP ENUM & SIP

Rich Communications with Kamailio & IMS

IP-Telephony SIP & MEGACO

A Comparative Study of Signalling Protocols Used In VoIP

A Guide to Connecting to FreePBX

NTP VoIP Platform: A SIP VoIP Platform and Its Services 1

Technical Configuration Notes

FOR COMPANIES THAT WANT TO EXPAND AND IMPROVE THEIR TELEPHONE SYSTEM

Cisco Unified Communications Manager SIP Trunk Configuration Guide

CREATE A CUSTOMER... 2 SIP TRUNK ACCOUNTS...

TECHNICAL CHALLENGES OF VoIP BYPASS

Radius/LDAP authentication in open-source IP PBX

Note: As of Feb 25, 2010 Priority Telecom has not completed FXS verification of fax capabilities. This will be updated as soon as verified.

SIP and VoIP 1 / 44. SIP and VoIP

Session Initiation Protocol (SIP) The Emerging System in IP Telephony

Managing SIP traffic with Zeus Traffic Manager

SHORT DESCRIPTION OF THE PROJECT...3 INTRODUCTION...4 MOTIVATION...4 Session Initiation Protocol (SIP)...5 Java Media Framework (JMF)...

SETTING UP AN INSTANT MESSAGING SERVER

Maxis BizVoice For iphone User Guide. Version 1.0

Transcription:

Asterisk, Instant Messaging and Presence, how? Saúl Ibarra Corretgé <saghul@gmail.com> http://www.saghul.net http://www.sipdoc.net saghul http://www.irontec.com

About me saghul VoIP enthusiast, playing around with Asterisk since 2k5 GNU/Linux lover likes everything Software Libre Co-founder of http://sipdoc.net Highly involved in spanish VoIP comunities 2

This presentation http://www.saghul.net/blog/downloads/astricon2k9/ http://www.slideshare.net/saghul/ Slides Complete configuration files Database example data 3

Index 1. Asterisk and presence status 2. SIP SIMPLE or XMPP? 3. The XMPP solution 1. OpenFire setup 4. The SIMPLE solution 1. Kamailio + Asterisk setup 5. Conclusions 4

What we do have now Asterisk SIP support (chan_sip) In-dialog MESSAGE :-( SUBSCRIBE and NOTIFY support For Event: dialog What about Event: Presence? :-( No PUBLISH support :-( Asterisk XMPP support res_jabber JabberSend, JABBER_RECEIVE, JABBER_STATUS chan_gtalk, chan_jingle Am I missing something? 5

Do we need presence and IM? I want to talk to you, not to your phone Are you available? For an audio conference? Just for IM? For whom? Where are you? Mobile Office Home... We need to know if a user is available and what his status is 6

What we need A presence server Users may publish their status Users may subscribe to other users status Instant Messaging between users Is it possible only with Asterisk? NO 7

SIMPLE or XMPP? 8

SIMPLE vs XMPP Did SIMPLE reinvent the wheel? Large companies started adopting SIMPLE (Microsoft, ) Propietary extensions :-( XMPP does not provide voice capabilities Well, there is Jingle... If SIP is the VoIP protocol: why not use it also for presence and IM? 9

The XMPP solution

The XMPP solution Integrate Asterisk with a XMPP server 11

OpenFire Open Source Java based Multiplatform Asterisk integration plugin SIP softphone plugin Gateways to multiple mi services: MSN, Yahoo, Easy installation! 12

OpenFire (II) Download deb package dpkg -i openfire_3.6.4_all.deb 13

OpenFire (III) Web based configuration Clustering architecture Connection to the Asterisk Manager Interface Multiple connections Mapping between Asterisk SIP users and OpenFire XMPP users Multiplatform Java client: Spark Flash based web client: SparkWeb 14

OpenFire (IV) 15

OpenFire (V) When a user is talking OpenFire puts it On the phone 16

OpenFire (VI) 17

OpenFire (VI) What we get Instant Messaging Presence Gateways to other mi services Text conferencing Problems Duplicated users (we could partially fix it with LDAP) Need to handle 2 protocols Not many softphones support SIP and XMPP Do any hardphones support XMPP? 18

The SIP solution

A complex protocol SIMPLE IETF working group Presence RFCs 3856, 3857, 3858, 3863, 4479, 4480, 4482,... XCAP 4825, 4826, 4827, 5025, Instant Messaging 3428, 3994, 4975, SIMPLE is NOT simple! 20

The SIP solution Integrate Asterisk and Kamailio to provide IM and presence. Users are registered to Kamailio. INVITE requests are routed through the Asterisk server. Asterisk RealTime user integration with Kamailio's subscriber table. PUBLISH, SUBSCRIBE and MESSAGE requests are handled by Kamailio. 21

Registration REGISTER Store location Asterisk does nothing! 22

Kamailio Asterisk RealTime integration Asterisk peers are Kamailio's subscribers. MySQL view so that Asterisk 'sees' the users as his own. Peers IP Kamailio IP. Calls between users go through Kamailio and Asterisk. We need to call to alphanumeric users DB Alias 23

Kamailio Asterisk RealTime integration (2) CREATE VIEW sip_peers AS SELECT subscriber.username AS name, subscriber.username AS defaultuser, 'friend' AS type, NULL AS secret, subscriber.domain AS host, concat(subscriber.rpid,' ','<',subscriber.username,'>') AS callerid, 'from-users' AS context, subscriber.username AS mailbox, 'yes' AS nat, 'no' AS qualify, 'info' AS dtmfmode, subscriber.username AS fromuser, 24

Kamailio Asterisk RealTime integration (3) NULL AS authuser, subscriber.domain AS fromdomain, NULL AS insecure, 'no' AS canreinvite, NULL AS disallow, 'all' AS allow, NULL AS restrictcid, subscriber.domain AS defaultip, subscriber.domain AS ipaddr, subscriber.domain AS outboundproxy, '5060' AS port, NULL AS regseconds FROM kamailio_1.subscriber; 25

Invitation 2. Find numeric Alias 3. Add X-Subscriber header 5. Dial to the X- Subscriber user Alice 1. INVITE (Bob) 4. INVITE (2001) 6. INVITE (Bob) Bob 8. INVITE (Bob) 7. Lookup user location 26

Invitation (2) # Route all INVITE requests to Asterisk if (is_method("invite")) { # Remove X-Subscriber header so that no one sees it... remove_hf("x-subscriber"); } # We don't have to route the requests coming FROM Asterisk # back to Asterisk. We would make a loop! if (!($si == "AST_IP" && $sp == "AST_PORT")) { route(asterisk_users_route); } 27

Invitation (3) # Send INVITE requests to the Asterisk server route[asterisk_users_route] { # Call to the numeric alias avp_db_query("select alias_username FROM dbaliases WHERE username = '$ru' AND domain = '$avp(avp_origdomain)'limit 1", "$avp(avp_numalias) ); if (is_avp_set("$avp(avp_numalias)")) { } # Save the subscriber in a header so we can use it in Asterisk append_hf("x-subscriber: $ru\r\n"); $ru = $avp(s:numalias); } $rd = "AST_IP"; $rp = "AST_PORT"; route(relay_route); 28

Invitation (4) [from-users] exten => _X.,1,NoOp() exten => _X.,n,Set(SUBSCRIBER=${SIP_HEADER(X-Subscriber)}) exten => _X.,n,GotoIf($[${LEN(${SUBSCRIBER})} = 0]?hang) exten => _X.,n,Dial(SIP/${SUBSCRIBER}) exten => _X.,n(hang),Hangup 29

SIMPLE presence 1. SUBSCRIBE (Bob) 2. handle_subscribe Alice 5. NOTIFY Bob 3. PUBLISH 4. handle_publish Asterisk does nothing! 30

# Handle presence requests if(is_method("publish SUBSCRIBE")) { route(presence_route); } SIMPLE presence (2) # Handle presence route[presence_route] { if (is_method("publish")) { handle_publish(); t_release(); } else if (is_method("subscribe")) { handle_subscribe(); t_release(); } exit; } 31

Messaging 1. MESSAGE (Bob) 2. Lookup location Alice Bob 3. MESSAGE Asterisk does nothing! 32

NAT handling We just need to fix the NAT in signalling. Our Asterisk 'peers' are configured with nat=yes COMEDIA mode Audio will go through Asterisk 33

Further improvements... 34

Further improvements... (2) What about mixing both? OpenFire's Asterisk plugin still works! (regardless of the integration with Kamailio) 35

SIMPLE or XMPP? 36

Thanks! BYE sip:astricon@astricon.net SIP/2.0 Via: SIP/2.0/UDP guest.astricon.net:5060;branch=z9hg4bknashds7 Max-Forwards: 70 From: saghul <sip:saghul@sipdoc.net>;tag=8321234356 To: AstriCon <sip:astricon@astricon.net>;tag=9fxced76sl Call-ID: 3848276298220188511@astricon.net CSeq: 1 BYE Content-Length: 0 Thanks for watching! 37

Any questions?

License http://creativecommons.org/licenses/by-sa/3.0/ All images are property of their respective authors. 39