# Integration of OpenSIPS and Asterisk

**URL:** <https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164>\
**Category:** Asterisk SIP\
**Created:** [March 29, 2019, 1:45pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164 "2019-03-29T13:45:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [March 29, 2019, 1:45pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/1 "2019-03-29T13:45:14Z")

</div>

Hello everyone, I hope that you are passing a good time,  
well I want to do a small lab : integration of Asterisk and OpenSIPS for Load balance Voip Traffic calls purposes, I have already installed Opensips v2.4 in my debian machine and Asterisk v 13,

but i really dont know how to start to configure and Load balance the calls and route them,  
I will appreciate your help or suggestions or anything,

Thank you for your help in advance !

---

<div class="post-metadata">

**Author:** ![meightee](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/meightee/32/2794_2.png) [@meightee](https://community.asterisk.org/u/meightee)\
**Post date:** [March 29, 2019, 1:53pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/2 "2019-03-29T13:53:49Z")

</div>

Well, think you should start at the opensips forum… as you want to use that as a loadbalancer…

Means you have to configure the opensips proxy.

Just as a tip, have a look at [http://kb.asipto.com](http://kb.asipto.com), its not opensips but kamailio information, but those two are a lot alike…

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [March 29, 2019, 1:58pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/3 "2019-03-29T13:58:58Z")

</div>

Thank you for your answer,  
I liked the Kamailio Website , is there any forum or website for OpenSIPS also ?

---

<div class="post-metadata">

**Author:** ![meightee](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/meightee/32/2794_2.png) [@meightee](https://community.asterisk.org/u/meightee)\
**Post date:** [March 29, 2019, 1:59pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/4 "2019-03-29T13:59:57Z")

</div>

Dont know I use kamailio, not opensips… Just google and the oracle will answer…

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [March 29, 2019, 2:08pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/5 "2019-03-29T14:08:03Z")

</div>

I have been searching for like 2 weeks in the web, I didn’t find something interesting and detailed about the OpenSIPS and Asterisk integration( Only installation etc …), the documentation also is limited, I can say that kamailio is providing more resources than OpenSIPS.

---

<div class="post-metadata">

**Author:** ![meightee](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/meightee/32/2794_2.png) [@meightee](https://community.asterisk.org/u/meightee)\
**Post date:** [March 29, 2019, 2:18pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/6 "2019-03-29T14:18:19Z")

</div>

Well, this I just found on the opensips website:

[https://www.opensips.org/Documentation/Tutorials-LoadBalancing](https://www.opensips.org/Documentation/Tutorials-LoadBalancing)

It explains how to configure opensips so you can loadbalance to yate in this case, but can just as easily be Asterisk, Freeswitch of something else…

Its not light reading material, but it tells you how to configure loadbalancing…

No one said its easy… good luck.

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [March 29, 2019, 2:29pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/7 "2019-03-29T14:29:25Z")

</div>

I have already seen that, but no details, didn’t work for me, i’d like really to find more details i’m beginner with OpenSIPS,

Anyway thank you !

---

<div class="post-metadata">

**Author:** ![meightee](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/meightee/32/2794_2.png) [@meightee](https://community.asterisk.org/u/meightee)\
**Post date:** [March 29, 2019, 2:33pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/8 "2019-03-29T14:33:07Z")

</div>

Then I would try Kamailio, with the information you can find on [kb.asipto.com](http://kb.asipto.com) you should be able to build a loadbalancer.

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [March 29, 2019, 2:38pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/9 "2019-03-29T14:38:33Z")

</div>

I’m with you I agree with this

---

<div class="post-metadata">

**Author:** ![Mani3274](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mani3274](https://community.asterisk.org/u/Mani3274)\
**Post date:** [April 1, 2019, 9:51am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/10 "2019-04-01T09:51:05Z")

</div>

Hi adam-daymoun,  
We have tested multiple options for LB.  
Between openSIPS & Kamilio, openSIPS has better documentation.  
In openSIPS, you have to write everything in one script file.

The OpenSIPs configuration script has three main logical parts :

1. global parameters
2. modules section
3. routing logic

You can follow the below link for basic implementation, easy to understand routing logic.

[https://www.opensips.org/Documentation/Tutorials-OpenSIPSAsteriskIntegration-1-8](https://www.opensips.org/Documentation/Tutorials-OpenSIPSAsteriskIntegration-1-8)

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [April 1, 2019, 10:27am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/11 "2019-04-01T10:27:28Z")

</div>

Thank you mani for your answer,  
I’m trying to do so, but it still fails for me, maybe because i’m using a newer versions of OpenSIPS,

that work for you ?

---

<div class="post-metadata">

**Author:** ![Mani3274](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mani3274](https://community.asterisk.org/u/Mani3274)\
**Post date:** [April 1, 2019, 12:42pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/12 "2019-04-01T12:42:09Z")

</div>

Yes, we have a POC script, I will share it with you in couple of days.

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [April 1, 2019, 1:58pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/13 "2019-04-01T13:58:56Z")

</div>

Thank you so much, i will be so happy for this

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [April 1, 2019, 2:01pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/14 "2019-04-01T14:01:53Z")

</div>

can you give me your email, contact or anything, to keep in touch with you, i’m working on OpenSIPS project in the time being !

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [April 3, 2019, 9:52pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/16 "2019-04-03T21:52:21Z")

</div>

Ok mani, I appreciate your help

---

<div class="post-metadata">

**Author:** ![BlazeStudios](https://avatars.discourse-cdn.com/v4/letter/b/e0b2c6/32.png) [@BlazeStudios](https://community.asterisk.org/u/BlazeStudios)\
**Post date:** [April 12, 2019, 12:23pm UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/17 "2019-04-12T12:23:09Z")

</div>

> [@Mani3274](#):
>
> In openSIPS, you have to write everything in one script file.
> 
> The OpenSIPs configuration script has three main logical parts :
> 
> 1. global parameters
> 2. modules section
> 3. routing logic

This is exactly how it works in Kamailio because OpenSIPs is the fork of OpenSER and when they forked OpenSER it was a case of how they wanted to move forward so it became Kamailio (OperSER) and OpenSIPs (the forked project of OpenSER). So they both follow the exact same logic, syntax and structure. In fact they share a lot of the same core modules.

---

<div class="post-metadata">

**Author:** ![adam-daymoun](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@adam-daymoun](https://community.asterisk.org/u/adam-daymoun)\
**Post date:** [April 13, 2019, 9:39am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/18 "2019-04-13T09:39:22Z")

</div>

I want to configure Kamailio server so that traffic will be forwarded to other 2 asterisk servers equally  
i have already read about the dispatcher module  
i think there is a list i should edit to add the 2 SIP addresses,  
for the dispatcher list, should i create one ? or it’s already there ?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![BlazeStudios](https://avatars.discourse-cdn.com/v4/letter/b/e0b2c6/32.png) [@BlazeStudios](https://community.asterisk.org/u/BlazeStudios)\
**Post date:** [April 13, 2019, 11:57am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/19 "2019-04-13T11:57:16Z")

</div>

Honestly, this is the wrong place to be asking to for help on how Kamailio works. If you want to learn Kamailio please refer to their site and resources for these questions.

---

<div class="post-metadata">

**Author:** ![Mani3274](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mani3274](https://community.asterisk.org/u/Mani3274)\
**Post date:** [April 15, 2019, 5:43am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/20 "2019-04-15T05:43:07Z")

</div>

Hi Blaze,

I know openSIPS and Kamilio got started from same base project. For us when we are evaluating both, we felt openSIPS has better documentation & tutorials, which will be helpful for someone who is new to load balancing VoIP solutions.

---

<div class="post-metadata">

**Author:** ![Simplesunny](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/simplesunny/32/3721_2.png) [@Simplesunny](https://community.asterisk.org/u/Simplesunny)\
**Post date:** [September 27, 2019, 6:02am UTC](https://community.asterisk.org/t/integration-of-opensips-and-asterisk/79164/21 "2019-09-27T06:02:30Z")

</div>

> [@Mani3274](#):
>
> know openSIPS and Kamilio got started from same base project. For us when we are evaluating both, we felt openSIPS has better documentation & tutorials, which will be helpful for someone who is new to load balancing VoIP solutions.

Hi @Mani3274 So finally have you done with OpenSips or Kamailio?
