Migration from OpenSIPS to Kamailio

Status
Not open for further replies.

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
I am considering moving my SIP trunking platform from OpenSIPS over to Kamailio. The routing script formats are very similar but the syntax is subtly different in a few areas.

Can anyone point me in the right direction for resources on migration or does anyone have any up to date examples of Kamailio routing scripts that I can study. My current OpenSIPS routing script runs to about 2800 lines so it is quite complex, and given that I have not needed to edit it for a good few years I am a little rusty on the subject.

Any help, greatly appreciated.
 

bcmike

Active Member
Jun 7, 2018
337
58
28
54
I know you probably have a complex use case and want to roll your own, but if you want to get something up quick you might want to check out DSipRouter: https://dsiprouter.org/

It's a Kamailio GUI and they have a Fusion integration as well.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
@Adrian Fretwell I think its going to be just a case of manually going through the script. I've actually gone the other way ie from Kamailio to Opensips.

Why are you going to Kamailio by the way?
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
@bcmike Thank You, I did look at dsiprouter years sgo, but I do need the full flexibility of using my own routing script.

@DigitalDaz I have used OpenSIPS for many years. I have just been working on upgrading my routing script from OpenSIPS v2.4 to OpenSIPS v3.2. But I have run into a problem, so thought it worthwhile to also look at Kamailio.

My script uses the OpenSIPS Fraud Detection module (https://opensips.org/docs/modules/3.2.x/fraud_detection.html). It has worked very well over the last five years, but in V3.2 it just crashes OpenSIPS and I have not yet managed to work out why. I have posted some questions into the OpenSIPS mailing list but have not had any response.

I spent most of yesterday looking at Kamailio and yes, most of the job will be a simple lift and shift with only minor syntax changes, but Kamailio does not have a Fraud Detection module, so that makes it less attractive for me, and potentially creates a lot more work.

@DigitalDaz I'm curious as to why you have gone the other way. PM me if you do not want to say why in public.
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
I just like OpenSIPs and use it with a company I consult for.

Also, it has the built in cgrates and freeswitch modules.

I'll take a look at the antifraud module, I wasn't aware of it or what it does. I do my own anti fraud using lookups basically on max connection fee and max cost per minute. It serves me well.
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
@Adrian Fretwell
Hi for topic record, it seems Opensips developers fixed your problem. you confirm ?
Indeed. The OpenSIPS developers we very helpful and we had a patch within a few hours of getting the issue recognised.

I set up an OpenSIPS development environment my self and started looking into the issue. I was able to provide a debug trace that identified the function raising the SIGFPE exception. It's many years since I ran C code in GDB. Debugging a multi threaded application is not for the novice, especially where the symbols you wish to break on are not yet known to the debugger because they reside in a module that has not yet been loaded!

As with many things in life, if we demonstrate a willingness to try and help ourselves, then others feel more like joining in to help also.

It was refreshing to be able to get help without needing some kind of membership. We have made a donation.
 
Last edited:

pbxcom

New Member
Sep 15, 2021
13
0
1
Indeed. The OpenSIPS developers we very helpful and we had a patch within a few hours of getting the issue recognised.

As with many things in life, if we demonstrate a willingness to try and help ourselves, then others feel more like joining in to help also.

It was refreshing to be able to get help without needing some kind of membership. We have made a donation.
Hi @Adrian Fretwell , having read the above, I take it the transition to Kamailio was canceled then?

You and @DigitalDaz seem to be veterans so I would appreciate your input. As I was searching the forum for posts on Kamailio thinking it was the better pick due to "faster development, more innovation"[1] , I stumbled upon this thread and wonder if I should learn OpenSIPs instead.

My use case for time being is simple; pretty much like @DigitalDaz laid out in the script (mainly to dispatch to wireguard-connected Fusion instances as a means to circumvent CG-NAT).

I see it as a long-term investment so picking the right one to learn and adapt syntax-wise (since I'm just starting now) would be ideal. Let me know.

Cheers

[1]: https://blog.2600hz.com/our-other-border-brother-kamailio
 

Adrian Fretwell

Well-Known Member
Aug 13, 2017
1,498
413
83
The syntax for both OpenSIPS and Kamailio are very similar if you learn one, you will be comfortable with the other.

Yes, I decided not to transition to Kamailio, I have used OpenSIPS for many years and it has proved to be a very flexible and stable SIP proxy. You have much more control over how you detect and correct NAT issues with OpenSIPS that you do with FreeSWITCH, but generally FreeSWITCH does a pretty good job with NAT.
 
  • Like
Reactions: pbxcom
Status
Not open for further replies.