Browse code

dialog(k): run event route after setting cfg dlg vars

- in this way they (e.g., $DLG_lifetime) should be accessible in event
route

Daniel-Constantin Mierla authored on 18/10/2012 07:54:53
Showing 1 changed files
... ...
@@ -1186,12 +1186,13 @@ void dlg_onroute(struct sip_msg* req, str *route_params, void *param)
1186 1186
 	}
1187 1187
 
1188 1188
 	next_state_dlg( dlg, event, &old_state, &new_state, &unref);
1189
-	dlg_run_event_route(dlg, req, old_state, new_state);
1190 1189
 
1191 1190
 	CURR_DLG_ID = req->id;
1192 1191
 	CURR_DLG_LIFETIME = (unsigned int)(time(0))-dlg->start_ts;
1193 1192
 	CURR_DLG_STATUS = new_state;
1194 1193
 
1194
+	dlg_run_event_route(dlg, req, old_state, new_state);
1195
+
1195 1196
 	/* delay deletion of dialog until transaction has died off in order
1196 1197
 	 * to absorb in-air messages */
1197 1198
 	if (new_state==DLG_STATE_DELETED && old_state!=DLG_STATE_DELETED) {