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

liuf liuf at ffcs.cn
Tue Mar 9 03:25:08 CET 2010


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->flags&bye_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.



More information about the Users mailing list