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. js setInterval和clearInterval 的使用

    setInterval(函数名, 时间);   函数名:不需要加括号:  时间:单位是毫秒: 例子: var inter= setInterval(searchTasksByCnd, 10 * 100 ...

  2. 查看Safari和钥匙串中的密码

    Safari Safari的同步书签功能很棒,还可以看到其他设备没关掉的网页.为了省时间,一些经常进的网站,比如博客,邮箱等,我都会选择让Safari保存密码,还使用iCloud同步!因为一直很放心苹 ...

  3. CoreAnimation5-图层时间和缓冲

    图层时间 动画的发生是需要持续一段时间的,所以计时对整个概念来说至关重要.在这一章中,我们来看看CAMediaTiming,看看Core Animation是如何跟踪时间的. CAMediaTimin ...

  4. 前端开发bower包管理器

    Bower 是 twitter 推出的一款包管理工具,基于nodejs的模块化思想,他可以很好的帮助你帮你解决js的依赖管理,比如jquery angular bootstrap 等等. 可以很方便的 ...

  5. vs2013 使用vs调试器,发现调试器显示的数据错误。查看内存,发现内存是正确的。

    有可能只是调试器的问题,程序可以正常运行的! 网上没找到此种情况解释.感觉有可能是那里堆被破坏了.

  6. linux 的一个防火墙策略

    #警告:在运行脚本后,勿必单独运行 iptables -F#因为脚本包含的默认规则为“禁止所有访问”#当其它规则被清除后,系统表现为无法访问状态,需要重启系统恢复#iptables -L 查看当前已应 ...

  7. ubuntu 安装apache2,mysql,php5,phpmyadmin等软件

    1.安装apache2  sudo apt-get install apache2  输入Y回车  apache2 安装完成  检测:在浏览器输入localhost 出现It works则成功. 2. ...

  8. SpringMVC源码阅读(三)

    先理一下Bean的初始化路线 org.springframework.beans.factory.support.AbstractBeanDefinitionReader public int loa ...

  9. bzoj 2705: [SDOI2012]Longge的问题 歐拉函數

    2705: [SDOI2012]Longge的问题 Time Limit: 3 Sec  Memory Limit: 128 MBSubmit: 1035  Solved: 669[Submit][S ...

  10. 解决Tomcat无法加载css和js等静态资源文件

    解决思路有两个 一是,你使用了Apache服务器,html不交给Tomcat处理,所以你找不到Html等静态资源,所以你先停掉阿帕奇,然后只用Tomcat猫试试. 二是,像我一样,使用了Jetty开发 ...