[OpenSIPS-Users] [dialog] Can't fetch data in 200 reply route of BYE
liuf
liuf at ffcs.cn
Wed Mar 10 02:09:53 CET 2010
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.
More information about the Users
mailing list