[WG-IMS] Diameter Server Support

Liviu Chircu liviu at opensips.org
Thu Jan 25 16:07:51 UTC 2024


Hi all,

One of the first items on the list of expanding the IMS capabilities of 
OpenSIPS is to add support for *processing* *Diameter requests*, not 
just originating them.  Such requests could be a requirement in a 
variety of scenarios, including but not limited to:

* Diameter request (event) when a device loses connection
* Service profile updates sent by the HSS in the form of a Diameter 
request -- Push Profile Request (PPR) 
<https://www.rfc-editor.org/rfc/rfc4740.html#page-41> command, 
especially useful when REGISTER'ing over very long durations (typical in 
IMS)
* Diameter request for terminating a registration -- Registration 
Termination Request (RTR) 
<https://www.rfc-editor.org/rfc/rfc4740.html#page-39> command
* several others

Regarding the implementation, we have already brainstormed the 
/opensips.cfg/ interaction, which will be as follows:

* config: since we're going to be using the freeDiameter library, any 
Diameter commands supported by the OpenSIPS server and their respective 
AVPs are to be extensively defined in the freeDiameter configuration 
file, pre-startup
* runtime: an event route named "*E_DM_<command>*", if any, shall be 
triggered on each Diameter request.  Available parameters:
   - *$param(sess_id)* -- containing the session's unique ID (think of 
it as a transaction ID), which will be needed when building the reply.  
Ideally, this variable is only for informational/logging purposes, with 
the reply being naturally constructed to include the correct Session ID 
by OpenSIPS
   - *$param(app_id)* -- the Diameter Application ID
   - *$param(cmd_code)* -- the Diameter Command Code
   - *$param(avps_json)* -- all AVPs in the request
* runtime: script writers will process the request data, then build a 
*JSON with the AVPs* to be included in the reply
* runtime: finally, the JSON is passed to a new *dm_send_reply()* 
function, similar to the existing dm_send_request() 
<https://opensips.org/docs/modules/3.4.x/aaa_diameter.html#func_dm_send_request>.

Both receival and sending of Diameter messages will be done by the 
existing freeDiameter process, forked by aaa_diameter 
<https://opensips.org/docs/modules/3.4.x/aaa_diameter.html>. OpenSIPS 
workers will interact with this process asynchronously both when 
receiving requests from the Server Thread (to be serialized & passed 
over via a SHM pointer), as well as when directing replies to be 
originated by the freeDiameter Client Thread (similar interaction, via a 
SHM'ized JSON string).

While the development is ongoing, do let us know if there is any special 
request in terms of the above that may have been missed, or maybe w.r.t. 
your interactions with the freeDiameter library in general: are you 
happy with it?  What are some goods/bads around it?

Best regards,

-- 
Liviu Chircu
www.twitter.com/liviuchircu  |www.opensips-solutions.com
OpenSIPS Summit 2024 May 14-17 Valencia |www.opensips.org/events
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/wg-ims/attachments/20240125/596e9d9b/attachment.html>


More information about the Wg-ims mailing list