Little correction:
 str met = {"BYE", 3};
need to change it to
str met = {"INFO", 4};

☺


From: [email protected] 
[mailto:[email protected]] On Behalf Of Alex Massover
Sent: Wednesday, September 15, 2010 11:54 AM
To: OpenSIPS devel mailling list
Subject: Re: [OpenSIPS-Devel] Sending INFO from MI

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;

298

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

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

301         return -1;

302         }

303

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



314

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};

 to

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: [email protected] 
[mailto:[email protected]] 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

Hi,

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.


This mail was received via Mail-SeCure System.

This mail was sent via Mail-SeCure System.
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to