Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-11 Thread Bogdan-Andrei Iancu
Hi Liu,

Ok - the bug is fixed now :)

Regards,
Bogdan

liuf wrote:
 Yes, you are right. They're the same.

 Had this bug been fixed yet? It seems still open now.


 Best Regards, 
 Liu Fan
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-10 Thread Bogdan-Andrei Iancu
Hi,

I guess what you are describing is the same as this bug report:

https://sourceforge.net/tracker/?func=detailaid=2941492group_id=232389atid=1086410

Am I right ?

Regards,
Bogdan

liuf wrote:
 I'm sorry. My real question is about where to set dialog pointer to the new
 transaction of sequential request, so that opensips can retrieve the correct
 dialog pointer in the correspond reply.

 My actions as below, please help me check:

 1. I used fetch_dlg_value function in onreply_route, when opensips received
 100/200 reply of INVITE, I can get dialog stored value, but in 200 reply of
 BYE, I can't get any data.

 2. First, I found opensips had not get dialog pointer in w_fetch_dlg_value
 function.

 3. In get_current_dialog function, if 200 reply, ONREPLY_ROUTE,
 trans-dialog_ctx will be return.

 4. I found dialog_ctx seem only can be set in function dlg_onreq when
 opensips received BYE.

 5. According my addtion debug info, I found when opensips received BYE,
 dlg_onreq will be exec.

 6. I guess when opensips received sequential request (BYE), it will create
 new transaction, then set current dialog pointer to this new transaction in
 dlg_onreq function. Then when reply of these requests (200) be received,
 current dialog pointer can be get via get_current_dialog function.

 7. So I consider in function dlg_onreq, move t-dialog_ctx =
 (void*)current_dlg_pointer; to the position that before if (
 current_dlg_pointer-flags  DLG_FLAG_ISINIT ).

 ===
 void dlg_onreq(struct cell* t, int type, struct tmcb_params *param)
 {
 /* is the dialog already created? */
 if (current_dlg_pointer!=NULL) {

 t-dialog_ctx = (void*)current_dlg_pointer;

 /* new, un-initialized dialog ? */
 if ( current_dlg_pointer-flags  DLG_FLAG_ISINIT )
 return;

 /* dialog was previously created by create_dialog()
- just do the last settings */
 run_create_callbacks( current_dlg_pointer, param-req);
 ..
 === 
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-10 Thread liuf

Yes, you are right. They're the same.

Had this bug been fixed yet? It seems still open now.


Best Regards, 
Liu Fan
-- 
View this message in context: 
http://n2.nabble.com/dialog-Can-t-fetch-data-in-200-reply-route-of-BYE-tp4699883p4713459.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-09 Thread Bogdan-Andrei Iancu
Hi Liuf,

dlg_onreq() function is intended to be called/used only for initial 
requests (for the INVITEs creating a dialog).

So, this function is not intended to be used for BYE request - the BYE 
is handled via the dlg_onroute() function which is used for all 
sequential requests.

If you find any issues is some parts of the code, please let me know and 
I will take care.

Regards,
Bogdan

liuf wrote:
 When I used fetch_dlg_value to get data in 200 reply route of BYE, it always
 empty.

 I read some source about dialog module, I had discovered some possible
 mistakes in function dlg_onreq() (file dlg_handles.c)(svn rev
 6658)(2010-03-08)

 When opensips receive 'BYE', current_dlg_pointer must be not null, and
 current_dlg_pointer had been initiated, so this function will be return
 before 't-dialog_ctx = (void*)current_dlg_pointer;' be exec. So in 200
 reply of BYE, can't get dialog pointer.

 I'm not sure this problem really exits? Would you please confirm it?

 function dlg_onreq() (svn rev 6658 2010-03-08)
 ==
 void dlg_onreq(struct cell* t, int type, struct tmcb_params *param)
 {
   /* is the dialog already created? */
   if (current_dlg_pointer!=NULL) {
   /* new, un-initialized dialog ? */
   if ( current_dlg_pointer-flags  DLG_FLAG_ISINIT )
   return;

   /* dialog was previously created by create_dialog() 
  - just do the last settings */
   run_create_callbacks( current_dlg_pointer, param-req);

   current_dlg_pointer-lifetime = get_dlg_timeout(param-req);

   if (param-req-flagsbye_on_timeout_flag)
   current_dlg_pointer-flags |= DLG_FLAG_BYEONTIMEOUT;

   t-dialog_ctx = (void*)current_dlg_pointer;

   /* dialog is fully initialized */
   current_dlg_pointer-flags |= DLG_FLAG_ISINIT;
   } else {
  ..
 
   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-09 Thread liuf

My actions as below, please help me check:

1. I used fetch_dlg_value function in onreply_route, when opensips received
100/200 reply of INVITE, I can get dialog stored value, but in 200 reply of
BYE, I can't get any data.

2. First, I found opensips had not get dialog pointer in w_fetch_dlg_value
function. 

3. In get_current_dialog function, if 200 reply, ONREPLY_ROUTE,
trans-dialog_ctx will be return. 

4. I found dialog_ctx seem only can be set in function dlg_onreq when
opensips received BYE. 

5. According my addtion debug info, I found when opensips received BYE,
dlg_onreq will be exec. 

6. I guess when opensips received sequential request (BYE), it will create
new transaction, then set current dialog pointer to this new transaction in
dlg_onreq function. Then when reply of these requests (200) be received,
current dialog pointer can be get via get_current_dialog function.

7. So I consider in function dlg_onreq, move t-dialog_ctx =
(void*)current_dlg_pointer; to the position that before if (
current_dlg_pointer-flags  DLG_FLAG_ISINIT ).

===
void dlg_onreq(struct cell* t, int type, struct tmcb_params *param)
{
/* is the dialog already created? */
if (current_dlg_pointer!=NULL) {

t-dialog_ctx = (void*)current_dlg_pointer;

/* new, un-initialized dialog ? */
if ( current_dlg_pointer-flags  DLG_FLAG_ISINIT )
return;

/* dialog was previously created by create_dialog() 
   - just do the last settings */
run_create_callbacks( current_dlg_pointer, param-req);
..
===
-- 
View this message in context: 
http://n2.nabble.com/dialog-Can-t-fetch-data-in-200-reply-route-of-BYE-tp4699883p4701106.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-09 Thread liuf

I'm sorry. My real question is about where to set dialog pointer to the new
transaction of sequential request, so that opensips can retrieve the correct
dialog pointer in the correspond reply.

My actions as below, please help me check:

1. I used fetch_dlg_value function in onreply_route, when opensips received
100/200 reply of INVITE, I can get dialog stored value, but in 200 reply of
BYE, I can't get any data.

2. First, I found opensips had not get dialog pointer in w_fetch_dlg_value
function.

3. In get_current_dialog function, if 200 reply, ONREPLY_ROUTE,
trans-dialog_ctx will be return.

4. I found dialog_ctx seem only can be set in function dlg_onreq when
opensips received BYE.

5. According my addtion debug info, I found when opensips received BYE,
dlg_onreq will be exec.

6. I guess when opensips received sequential request (BYE), it will create
new transaction, then set current dialog pointer to this new transaction in
dlg_onreq function. Then when reply of these requests (200) be received,
current dialog pointer can be get via get_current_dialog function.

7. So I consider in function dlg_onreq, move t-dialog_ctx =
(void*)current_dlg_pointer; to the position that before if (
current_dlg_pointer-flags  DLG_FLAG_ISINIT ).

===
void dlg_onreq(struct cell* t, int type, struct tmcb_params *param)
{
/* is the dialog already created? */
if (current_dlg_pointer!=NULL) {

t-dialog_ctx = (void*)current_dlg_pointer;

/* new, un-initialized dialog ? */
if ( current_dlg_pointer-flags  DLG_FLAG_ISINIT )
return;

/* dialog was previously created by create_dialog()
   - just do the last settings */
run_create_callbacks( current_dlg_pointer, param-req);
..
=== 
-- 
View this message in context: 
http://n2.nabble.com/dialog-Can-t-fetch-data-in-200-reply-route-of-BYE-tp4699883p4706379.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE

2010-03-08 Thread liuf

When I used fetch_dlg_value to get data in 200 reply route of BYE, it always
empty.

I read some source about dialog module, I had discovered some possible
mistakes in function dlg_onreq() (file dlg_handles.c)(svn rev
6658)(2010-03-08)

When opensips receive 'BYE', current_dlg_pointer must be not null, and
current_dlg_pointer had been initiated, so this function will be return
before 't-dialog_ctx = (void*)current_dlg_pointer;' be exec. So in 200
reply of BYE, can't get dialog pointer.

I'm not sure this problem really exits? Would you please confirm it?

function dlg_onreq() (svn rev 6658 2010-03-08)
==
void dlg_onreq(struct cell* t, int type, struct tmcb_params *param)
{
/* is the dialog already created? */
if (current_dlg_pointer!=NULL) {
/* new, un-initialized dialog ? */
if ( current_dlg_pointer-flags  DLG_FLAG_ISINIT )
return;

/* dialog was previously created by create_dialog() 
   - just do the last settings */
run_create_callbacks( current_dlg_pointer, param-req);

current_dlg_pointer-lifetime = get_dlg_timeout(param-req);

if (param-req-flagsbye_on_timeout_flag)
current_dlg_pointer-flags |= DLG_FLAG_BYEONTIMEOUT;

t-dialog_ctx = (void*)current_dlg_pointer;

/* dialog is fully initialized */
current_dlg_pointer-flags |= DLG_FLAG_ISINIT;
} else {
 ..

-- 
View this message in context: 
http://n2.nabble.com/dialog-Can-t-fetch-data-in-200-reply-route-of-BYE-tp4699883p4699883.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users