http://gnu-linux.org/xmpp-integration-with-asterisk.html

Xmpp stands for eXtensible Messaging and Presence Protocol, Its a widely used communication protocol. In this blog I will use Openfire an opensource xmpp server.
Asterisk is opensource telephony switching exchange service for linux. In this blog I am using FreePBX install on centos 6.5.
In this blog I assume that user has already install openfire and
asterisk server on linux machines. So I will start with creating a user
in openfire and intregate my opefire server with asterisk server and in
finally we will able to call from sip phone to xmpp client.

Step 1: Creating user in xmpp server

Login to openfire server. You will find the welcome screen as in image below and then click on user/session tab

Now provide the user information and click on create user as in image below.

Step 2: Starting Spark xmpp client

Download spark client on your linux machine.

wget http://www.igniterealtime.org/downloadServlet?filename=spark/spark_2_7_0.tar.gz

untar the file and run spark executable file

tar -xvzf spark_2_7_0.tar.gz
cd spark*
./spark

You will find the spark client starts as in image below.
provide user id, password which you created in openfire server and give server ip.

Now again go to your openfire server and click on session tab you will find status of the user online

Step 3:Enable SIP plugin to openfire

Download the SIP jar file

wget http://www.igniterealtime.org/projects/openfire/plugins/sip.jar

click on Plugins tab and upload your sip.jar file. after some time you will find phone tab inside the server tab

Note
The plugin work with openfire version 3.9.3

Step 4: Configure SIP user on asterisk
Now we need to configure sip.conf and extension.conf file to switch the call between asterisk and xmpp client.

sip configuration settings copy paste below code in your sip.conf,
more detail about this you will find in asterisk configuration blog.

[100]
username=100
type=friend
secret=123
record_out=never
record_in=never
qualify=no
port=5060
nat=never
host=dynamic
dtmfmode=rfc2833
call-limit=4
canreinivite=no
disallow=all
allow=all

extension.conf configuration

exten => 100,1,Dial(SIP/100,20)

Now restart your asterisk server

service asterisk restart

The above settings allow sip client to established call to xmpp client which is spark.

Step 5: Configure SIP phone on openfire

On your openfire interface go to Phone tab and then click on add new phone mapping and provide the detail as in image below.

SIP PHONE settings

XMPP username => user name of your openfire user.
SIP username => user name on your asterisk server which we configure in sip.conf
Authorization username => same as SIP username
PASSWORD => password of your SIP user.
SERVER => IP of asterisk server

click on create and you will find the page as below.

successful SIP mapping

Now all the configuration is done, finally you have to login to your spark and sip phone.

Step 6:
Make a call from SIP phone

I am using twinkle as my SIP phone now as a dial the extension number
100 which is of my xmpp client . I get a incoming call. check the image
below

incoming call from SIP phone

In the image you will find a box saying incoming call from the SIP user.

Once you accept the call it will get connected .

call accepted

So we successfully integrated XMPP (Openfire) with SIP (Asterisk).

In easy 6 step we have done this.

Xmpp integration with Asterisk的更多相关文章

  1. XMPP and Asterisk integration

    http://www.mundoopensource.com.br/en_page_xmpp_asterisk_pratical_example/ www.mundoopensource.com.br ...

  2. Github上的原文XMPP环境搭建步骤,英语能力差不多的可以看看

    Getting started using XMPPFramework on iOS Here is a post on StackOverflow describing how to install ...

  3. xmpp muc 群聊协议 4

    7. Occupant Use Cases The main actor in a multi-user chat environment is the occupant, who can be sa ...

  4. [转] Spring Integration 系统集成

    [From] http://blog.csdn.net/w_x_z_/article/details/53316618 pring Ingegration 提供了基于Spring的EIP(Enterp ...

  5. 转 asterisk app命令中文翻译

    常规指令 Authenticate:鉴别用户 VMAuthenticate:根据“voicemail.conf”鉴别用户 Curl:接受外接URLs的修复.支持POSTing DUNDiLookup: ...

  6. xmpp之配置Xcode(1)

    介绍 ios上的XMPPFramework你能够在Xcode/iPhoneXMPP 目录找到,它只是实现了XMPP的一小部分功能. 下面主要介绍在开发XMPPFramework ios应用之前的配置工 ...

  7. 在 Laravel 中使用图片处理库 Integration/Image

    系统需求 PHP >= 5.3 Fileinfo Extension GD Library (>=2.0) … or … Imagick PHP extension (>=6.5.7 ...

  8. 技术笔记:XMPP之openfire+spark+smack

    在即时通信这个领域目前只找到一个XMPP协议,在其协议基础上还是有许多成熟的产品,而且是开源的.所以还是想在这个领域多多了解一下. XMPP协议:具体的概念我就不写了,毕竟这东西网上到处是.简单的说就 ...

  9. 按照Enterprise Integration Pattern搭建服务系统

    在前一篇文章中,我们已经对Enterprise Integration Pattern中所包含的各个组成进行了简单地介绍.限于篇幅(20页Word以内),我并没有深入地讨论各个组成.但是如果要真正地按 ...

随机推荐

  1. raw socket遇上windows

    最近很长一段时间内又捡起了大学时丢下的网络协议,开始回顾网络协议编程,于是linux系统成了首选,它让我感到了无比的自由,可以很通透的游走于协议的各层. 最初写了个ARP欺骗程序,很成功的欺骗了win ...

  2. 1 Winform 异步更新控件

    刚才看到有人问为了winfrom中,在大数据绑定的时候出现画面假死的状态,为了解决这个问题希望通过再开一个线程来给控件绑定数据,可是画面还是会假死.现在看到的方法有1.掩耳盗铃法(Control.Ch ...

  3. 自己学习过程中关于以后有可能用到的技术的备份,微信广告滑屏组件 iSlider

    转载: iSlider 是个非常平滑的滑块,支持移动端 WebApp,HTML5App 和混合型的 App. iSlider是移动端的滑动组件的最佳解决方案.他和普通的web 端的滑动插件有很大不同, ...

  4. Problem 1010 - 素数环问题

    #include<iostream> #include<string> #include<algorithm> #include<vector> #in ...

  5. 笔记一:Python的PyDev插件在eclipse上面安装(新的插件地址 location)

    注:部分内容参考网上的,若有侵权,请作者联系我,马上进行删改 安装PyDev: 首先需要去Eclipse官网下载:http://www.eclipse.org/,Eclipse需要JDK支持,如果Ec ...

  6. 能用存储过程的DBHelper类

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...

  7. jQuery的延迟对象

    之前看别人的demo,发现在延迟对象被resolve时要执行的代码,有时会写在deferred.then方法里执行,有时会写在deferred.done方法里执行. 这让对延迟对象一知半解的我非常困惑 ...

  8. For Aisha(阿伊莎)

    相见时难别亦难,东风无力百花残.by:昂思多,20160524 跟你在一起,没有拘束感,完全就像是在跟亲人对话. 很喜欢这种感觉 虽然才认识不到10天,却就像是认识了好几年的老朋友 真的喜欢叫你“阿伊 ...

  9. CMD 模块定义规范

    在 Sea.js 中,所有 JavaScript 模块都遵循 CMD(Common Module Definition) 模块定义规范.该规范明确了模块的基本书写格式和基本交互规则. 在 CMD 规范 ...

  10. 【技术贴】解决127.0.0.1和http://localhost均被拦截跳转到另一个网页

    很艰难的历程. 今天安装一个OA系统,要用到http://127.0.0.1输入完成之后,可以进入安装界面,but,我输入完了之后,自动跳到了129129垃圾网站,艹,我真TM服了,我把本地连接网线都 ...