An IMS Analysis Challenge – Find the answers to the questions through analysis of PCAPs.
Category Archives: Kamailio
RTPengine – Installation & Configuration (Ubuntu 20.04 / 22.04)
Installing RTPengine on Ubuntu releases
HOMER API in Python
Interacting with Homer SIP capture vai the API
Failures in cobbling together a USSD Gateway
Adventures in setting up a non-working USSD Gateway for IMS
Kamailio Bytes: Adding Prometheus + Grafana to Kamailio
Adding Prometheus support to Kamailio and rendering stats in Grafana
Kamailio Diameter Routing Agent Support
Using Kamailio with a Diameter Routing Agent
Kamailio I-CSCF – SRV Lookup Behaviour
Recently I had a strange issue I thought I’d share. Using Kamailio as an Interrogating-CSCF, Kamailio was getting the S-CSCF details from the User-Authorization-Answer’s “Server-Name” (602) AVP. The value was set to: sip:scscf.mnc001.mcc001.3gppnetwork.org:5060 But the I-CSCF was only looking up A-Records for scscf.mnc001.mcc001.3gppnetwork.org, not using DNS-SRV. The problem? The Server-Name I had configured as a … Continue reading Kamailio I-CSCF – SRV Lookup Behaviour
Kamailio Bytes – Extracting SDP Parameters with Kamailio
Extracting SDP Parameters with Kamailio
Kamailio, IMS & DNS Headches
A quick post on a lesson that took me a while to learn with DNS, Kamailio and IMS.
FreeSWITCH, Kamailio & IMS Extensions
Recently I’ve been doing some work with FreeSWITCH as an IMS Conference Factory, I’ve written a bit about it before in this post on using FreeSWITCH with the AMR codec.
Pretty early on in my testing I faced a problem with subsequent in-dialog responses, like re-INVITEs used for holding the calls.
Every subsequent message, was getting a “420 Bad Extension” response from FreeSWITCH.


So what didn’t it like and why was FreeSWITCH generating 420 Bad Extension Responses to these subsequent messages?
Well, the “Extensions” FreeSWITCH is referring to are not extensions in the Telephony sense – as in related to the Dialplan, like an Extension Number to identify a user, but rather the Extensions (as in expansions) to the SIP Protocol introduced for IMS.
The re-INVITE contains a Require header with sec-agree which is a SIP Extension introduced for IMS, which FreeSWITCH does not have support for, and the re-INVITE says is required to support the call (Not true in this case).
Using a Kamailio based S-CSCF means it is easy to strip these Headers before forwarding the requests onto the Application Server, which is what I’ve done, and bingo, no more errors!
The Surprisingly Complicated World of SMS: Apple iPhone MT SMS
Quirks and gotchas of working with SMS on IMS on iPhones.
Kamailio Bytes – Working with Redis
Using Redis with Kamailio
FreeSWITCH as an IMS Application Server
Using FreeSWITCH as an IMS Application Server
Handling multiple SIP headers with the same name in Kamailio
Some tricks to handle if you’ve got multiple headers all with the same name in Kamailio
Kamailio Bytes – Using Rtimer to run Jobs
Using the Rtimer module and UAC to be annoying, or very useful.
ENUM in Practice with Kamailio
Using ENUM to resolve E.164 numbers into SIP URIs using Kamailio.
A very unstable Diameter Routing Agent (DRA) with Kamailio
I’d been trying for some time to get Kamailio acting as a Diameter Routing Agent with mixed success, and eventually got it working, after a few changes to the codebase of the ims_diameter_server module. It is rather unstable, in that if it fails to dispatch to a Diameter peer, the whole thing comes crumbling down, … Continue reading A very unstable Diameter Routing Agent (DRA) with Kamailio
Using Docker to develop SIP solutions with Kamailio
Using Docker to spin up environments to test Kamailio in
Kamailio Bytes – OnReply Route
So far with most of our discussions about Kamailio we’ve talked about routing the initial SIP request (INVITE, REGISTER, SUBSCRIBE, etc), but SIP is not a one-message protocol, there’s a whole series of SIP messages that go into a SIP Dialog. Sure the call may start with an INVITE, but there’s the 180 RINGING, the … Continue reading Kamailio Bytes – OnReply Route
Kamailio Bytes – Gotchas with Kamailio as an Asterisk Load Balancer
Things to keep in mind before using Kamailio as a Load Balancer for Asterisk