[SR-Users] set_dlg_profile() in failure_route

侯旭光 marquis.hxg at gmail.com
Fri Mar 4 10:55:13 CET 2011


I did trace the dialog in the initial REQUEST

my script:
...
modparam("dialog","dlg_flag","4")
...
route{

 if (is_method("INVITE")){
       dlg_setflag("2");
       dlg_manage();
       ...
       if(avp_db_load("$ruri/username","$avp(s:busyforward)"))
       {
           setflag(26);
           t_on_failure(FAIL_ONE);
       }
       ...
}
failure_route[FAIL_ONE]{
       ...
       if(isflagset(26)&&t_check_status("486"))
       {
           $ru=$avp(s:busyforward);
           append_branch();
           dlg_setflag("2");
           avp_delete("$avp(s:busyforward)");
           resetflag("26");
           lookup("location");
           route(RELAY);
       }
       ...
}
route[RELAY]{
       if(!t_relay()){
            sl_reply_error();
       }
}
#----------------------------------------------------------------------#

Is anything wrong?

2011/3/3 Timo Reimann <timo.reimann at 1und1.de>:
> Hi,
>
>
> On 03.03.2011 14:47, 侯旭光 wrote:
>> set_dlg_profile() function carshed in failure_route when I need do the
>> call-forwarding.
>>
>> When in busy-call-forward or no-answer-forward mode ,it'll run into
>> the failure_route.But at the time , the route_type of the dialog is
>> FAILURE_ROUTE and the get_current_dialog() return NULL,
>>
>> then the set_dlg_profile() function won't work.
>>
>> How can I set dialog profile in the busy or no-answer call-forwarding ?
>>
>> CRITIAL dialog [dlg_profile.c]:  BUG - dialog not found in non REQUEST route
>> ERROR dialog [dialog.c]      :  failed to set  profile
>
> I think you did not track the dialog in the first place, i.e., when the
> initial request associated to the dialog you seek to profile was processed.
>
> Are you using dlg_flag, and if so, have you enabled it in REQUEST_ROUTE?
> If you want to track dialogs on demand instead, try calling dlg_manage()
> prior to calling set_dlg_profile(). I'm not sure if this is the most
> elegant approach for your use case but it might at least work.
>
>
> Cheers,
>
> --Timo
>



More information about the sr-users mailing list