[SR-Users] Adding dialogs to a profile in a failure_route

Alex Balashov abalashov at evaristesys.com
Mon Apr 28 19:49:29 CEST 2014


Hi,

Am I not allowed to call dlg_manage() and add a dialog to a profile 
inside a request_route that is called out of a failure_route?

The sequence of events is like this:

1. INVITE ---------------->
2. <---------- 302 redirect
3. ACK ------------------->
4. INVITE (new branch) --->

It's in #4 that I add the dialog to a profile and call dlg_manage(). 
There's a slight ambiguity because I am calling in a request_route, but 
the request_route is really called from a failure_route that catches the 
302. It contains common logic that is used in both #1 and #4. So, the 
message being processed is 302, but the execution context is request_route.

The docs say that dlg_manage() can be used in a request_route, and that 
set_dlg_profile() can be called from request/branch/reply/failure 
routes. But, I suppose it's logical that dlg_manage() ought to operate 
on the initial dialog-opening request. However, since the 302 is part of 
the same transaction as the initial INVITE, I would think that's okay. 
Is it?

Anyway, I get these messages a lot:

Apr 28 17:41:04 p01 /usr/local/sbin/kamailio[8581]: CRITICAL: dialog 
[dlg_profile.c:444]: set_dlg_profile(): BUG - dialog not found in a non 
REQUEST route (1)
Apr 28 17:41:04 p02 /usr/local/sbin/kamailio[8581]: ERROR: dialog 
[dialog.c:800]: w_set_dlg_profile(): failed to set profile

At no point am I actually calling set_dlg_profile() outside of a 
request_route, but the request_route might be called from a failure_route.

So, the question is, am I doing something wrong? What's the best way to 
accommodate this scenario? I don't know if I want to track the dialog or 
add it to a profile until after I get the 302.

Thanks,

-- 
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/



More information about the sr-users mailing list