Xmpp integration with Asterisk
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的更多相关文章
- XMPP and Asterisk integration
http://www.mundoopensource.com.br/en_page_xmpp_asterisk_pratical_example/ www.mundoopensource.com.br ...
- Github上的原文XMPP环境搭建步骤,英语能力差不多的可以看看
Getting started using XMPPFramework on iOS Here is a post on StackOverflow describing how to install ...
- xmpp muc 群聊协议 4
7. Occupant Use Cases The main actor in a multi-user chat environment is the occupant, who can be sa ...
- [转] Spring Integration 系统集成
[From] http://blog.csdn.net/w_x_z_/article/details/53316618 pring Ingegration 提供了基于Spring的EIP(Enterp ...
- 转 asterisk app命令中文翻译
常规指令 Authenticate:鉴别用户 VMAuthenticate:根据“voicemail.conf”鉴别用户 Curl:接受外接URLs的修复.支持POSTing DUNDiLookup: ...
- xmpp之配置Xcode(1)
介绍 ios上的XMPPFramework你能够在Xcode/iPhoneXMPP 目录找到,它只是实现了XMPP的一小部分功能. 下面主要介绍在开发XMPPFramework ios应用之前的配置工 ...
- 在 Laravel 中使用图片处理库 Integration/Image
系统需求 PHP >= 5.3 Fileinfo Extension GD Library (>=2.0) … or … Imagick PHP extension (>=6.5.7 ...
- 技术笔记:XMPP之openfire+spark+smack
在即时通信这个领域目前只找到一个XMPP协议,在其协议基础上还是有许多成熟的产品,而且是开源的.所以还是想在这个领域多多了解一下. XMPP协议:具体的概念我就不写了,毕竟这东西网上到处是.简单的说就 ...
- 按照Enterprise Integration Pattern搭建服务系统
在前一篇文章中,我们已经对Enterprise Integration Pattern中所包含的各个组成进行了简单地介绍.限于篇幅(20页Word以内),我并没有深入地讨论各个组成.但是如果要真正地按 ...
随机推荐
- oracle数据库的导出与导入
导出:exp devtest10/dev10@172.16.7.39:1521/WSRZ file=d:\WSRZ.dmp log=d:\WSRZ.log full=y 导入:imp testdb/t ...
- ENC28J60 + M430G2553,用uip搭建http服务器,解决“在XP系统下可以访问,在Win7下不能访问”的问题
近日,用ENC28J60,在M430G2553上搭建一个简单的HTTP服务器,结果发现在XP系统下可以访问,在Win7下不能访问,非常奇葩的问题. 通过抓包,如下图,计算机(IP地址为192.168. ...
- 最小生成树之 prim算法和kruskal算法(以 hdu 1863为例)
最小生成树的性质 MST性质:设G = (V,E)是连通带权图,U是V的真子集.如果(u,v)∈E,且u∈U,v∈V-U,且在所有这样的边中, (u,v)的权c[u][v]最小,那么一定存在G的一棵最 ...
- 忘记Mysql的root密码怎么办?
解决方法: 1.打开cmd,用net start命令查看是否开启了mysql服务,如果开启,用net stop mysql 命令关闭mysql 2.进入mysql的安装目录下的bin目录,例如:E:\ ...
- Mysql中explain命令查看语句执行概况
Mysql中可以使用explain命令查看查询语句的执行方式,使用方法举例:explain + 查询语句 例如:explain select * from user_info 几个重要的字段说明: t ...
- mongo数据库使用小结
db.userId5555.aggregate({$unwind:"$tcjl"},{$match:{"_id":"0e549864-2a56-43c ...
- 关于js的callback回调函数的理解
回调函数的处理逻辑理解:所谓的回调函数处理逻辑,其实就是先将回调函数的代码 冻结(或者理解为闲置),接着将这个回调函数的代码放到回调函数管理器的队列里面. 待回调函数被触发调用的时候,对应的回调函数的 ...
- php函数应用场景
截取文件后缀: $slen = strlen($suffix); substr($this->uri_string, -$slen) === $suffix 原理:截取倒数多少长度字符 判断多维 ...
- 使用php发送电子邮件(phpmailer)
在项目开发过程中,经常会用到通过程序发送电子邮件,例如:注册用户通过邮件激活,通过邮件找回密码,发送报表等.这里介绍几种通过PHP发送电子邮件的 方式(1)通过mail()函数发送邮件(2)使用fso ...
- PHP函数补完:preg_match()
preg_match — 进行正则表达式匹配. 语法:int preg_match ( string $pattern , string $subject [, array $matches [, i ...