[OpenSIPS-Devel] Sending INFO from MI

Alex Massover alex at jajah.com
Wed Sep 15 11:53:47 CEST 2010

What I need to do is:

a)      Export MI function (let's leave it aside for now, not supposed to complex)

b)      Create dlg_send_info function based on dlg_end_dlg , something like:

293         int dlg_send_info(struct dlg_cell *dlg, str *extra_hdrs, int direction)

294         {

295         str str_hdr = {NULL,0};

296         int i,res = 0;

297         int callee;


299         if ((build_extra_hdr(dlg, extra_hdrs, &str_hdr)) != 0){

300         LM_ERR("failed to create extra headers\n");

301         return -1;

302         }


304         callee = callee_idx(dlg);

// implement 'direction' switch here

305         if ( send_leg_info( dlg, DLG_CALLER_LEG, callee, &str_hdr)!=0) {

306         res--;

307         }

308          if (send_leg_info( dlg, callee, DLG_CALLER_LEG, &str_hdr)!=0 ) {

309         res--;

310         }

// end of 'direction' switch


315         pkg_free(str_hdr.s);

316         return res;

317         }

c)       Create send_leg_info based on send_leg_buy, with following changes:

a.       Change

 str met = {"BYE", 3};


str met = {"INFO", 3};  // what is 3 btw?

b.      Remove callback:
267          bye_reply_cb, /* callback function*/
267          NULL, /* callback function*/

c.       Some minor fixes

And it supposed to work. Am I right or I totally miss something?

From: devel-bounces at lists.opensips.org [mailto:devel-bounces at lists.opensips.org] On Behalf Of Alex Massover
Sent: Wednesday, September 15, 2010 11:17 AM
To: OpenSIPS devel mailling list
Subject: [OpenSIPS-Devel] Sending INFO from MI


I need to pass events generated by the external application during the call. I'm thinking about to implement this with INFO.

The idea is to add sending INFO functionality to the dialog module. In analogy with 'dlg_end_dlg' MI function exported by dialog module, I want to add 'dlg_send_info' function. That will receive 2 parameters:

a)      Direction (caller, callee, both) – to what side to send INFO

b)      Headers to add to INFO
and eventually generate INFO request.

What I'm trying to understand is how complex is to add such functionality. Is the dialog module ready for such extension (I'll look at how 'dlg_end_dlg' is implemented and do similar) or it will require more advanced understanding and major changes to the module design?

Best Regards,
Alex Massover
Telephony Group Manager
R&D Department
Jajah Inc.

This mail was sent via Mail-SeCure System.

This mail was received via Mail-SeCure System.

This mail was sent via Mail-SeCure System.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/devel/attachments/20100915/7e5edccd/attachment-0001.htm 

More information about the Devel mailing list