Asterisk

Configure Mapping between Openfire XMPP users and Asterisk SIP users

In this small guide, we’ll try to Map sip users configured in Asterisk sip.conf file with XMPP users configured inΒ Openfire XMPPΒ server.If you’re reading thus article,you’ll need to have installed and configuredΒ Asterisk ServerΒ with Extensions.conf and sip.conf files working.I also assume that you’ve added xmpp users to yourΒ OpenfireΒ server. This tutorials can be of help if you’re getting started.

Original content from computingforgeeks.com - post 47

Installation of Asterisk PBX:

nstallation of Openfire XMPP Chat Server:

Once you’ve a list of users on both Openfire and Asterisk, you can start the mapping.

Setup Pre-requisites

You must addΒ sipΒ andΒ Asterisk IMΒ plugins for Openfire. Do this on your Openfire server if you haven’t.

cd /opt/openfire/plugins/
wget http://www.igniterealtime.org/projects/openfire/plugins/sip.jar
wget https://github.com/igniterealtime/asterisk-im/releases/download/release-2.0.0/asterisk-im.jar

Have extensions.conf,sip.conf files configured. See my files below.Β Extensions.conf file

[company]
exten=>_.,1,Dial(SIP/${EXTEN},10,r)
same=>n,VoiceMail(${EXTEN}@company-voicemail,u)
same=>n,VoiceMail(${EXTEN}@company-voicemail,b)
same=>n,Hangup()

Voicemail.conf

[company-voicemail]
101=>1234,mutai,[email protected]
102=>1234,denis,[email protected]
103=>1234,gene,[email protected]

;1234 : Password used to access voicemailΒ Sip.conf

[101]
type=friend
secret=jose
username=jose
host=dynamic
context=company
disallow=all
allow=h264
allow=ulaw
qualify=yes
canreinvite=no
mailbox=101@company-voicemail
callerid=jose

[102]
type=friend
secret=denis
username=denis
host=dynamic
context=company
disallow=all
allow=ulaw
allow=h264
qualify=yes
canreinvite=no
mailbox=102@company-voicemail
callerid=denis 

[103]
type=friend
secret=gene
username=gene
host=dynamic
context=company
disallow=all
allow=ulaw
allow=h264
qualify=yes
canreinvite=no
mailbox=103@company-voicemail
callerid=denis

Openfire usersΒ 

openfire users

Now it’s time to do the mapping. Head over to Server menu, then Phone, then Add newΒ  XMPP username :Β  Openfire account username

  • SIP usernameΒ : Username in Asterisk’s sip.conf file
  • Authorization UsernameΒ : Just same as SIP username
  • Display Phone Number :
  • PasswordΒ : Sip user’s password.
  • ServerΒ : Ip address of Asterisk Media server
  • Outbound ProxyΒ : Sip proxy if any
  • Voice Mail Number: Number used to access voicemail.

Add all information above. If you want to add number to access voicemail, do it as shown below.

I will make *100 number dialed to access voicemail.

[voicemail]
exten => *100,1,NoOp(Access voicemail retrieval.)
same => n,VoiceMailMain(@company-voicemail)

Then include this context in the original context.It will look like this.

[company]
include =>voicemail
exten=>_.,1,Dial(SIP/${EXTEN},10,r)
same=>n,VoiceMail(${EXTEN}@company-voicemail,u)
same=>n,VoiceMail(${EXTEN}@company-voicemail,b)
same=>n,Hangup()

Now with all configurations completed. Download XMPP Client and configure it, i recommend any of the following:

Android:Β Chatsecure,Β Conversations,Β Xabber,Β yaxim
iOS:Β ChatSecure
Web-based: Jappix

I will demonstrate on Adding account using Jitsi XMPP client. Install it on your platform, Linux, Windows, Mac,Android or iOS.

Launch Jitsi. Then click on File > Add new account, on Network select either XMPP or SIP. Add the two of them.

add xmpp jitsi

Sip ID user addition.

jitsi sip add account

From there you can easily place calls and chat using the platform you just created. Hope this article was of help to you. If you encounter any error, post it in Comment section and i won’t hesitate to reply.

Keep reading

Installing FreePBX 17 with Asterisk 22 LTS on Ubuntu 24.04 / 22.04 VOIP Installing FreePBX 17 with Asterisk 22 LTS on Ubuntu 24.04 / 22.04 Install Asterisk PBX on Ubuntu 24.04 / 26.04 LTS VOIP Install Asterisk PBX on Ubuntu 24.04 / 26.04 LTS Install Asterisk PBX on Ubuntu 24.04 / Debian 13 Ubuntu Install Asterisk PBX on Ubuntu 24.04 / Debian 13 Best SIP Desk Phones for FreePBX: Yealink vs Grandstream vs Poly Networking Best SIP Desk Phones for FreePBX: Yealink vs Grandstream vs Poly Install and Configure 3CX PBX on Debian 12 VOIP Install and Configure 3CX PBX on Debian 12 How to Install FreePBX 16 on CentOS 7 / RHEL 7 Asterisk How to Install FreePBX 16 on CentOS 7 / RHEL 7

Leave a Comment

Press ESC to close