[Serusers] exec_dset() in failure_route

Alexander Mayrhofer axelm at nic.at
Thu Oct 2 11:18:54 CEST 2003


On (01.10.03 22:05), Jan Janak wrote:
> Hello,
> 
> are you sure that the script (find-voicemail.pl) returns any URIs when
> executed ? The error message means that no branches have been added.
> 

I've found a (plain ugly) workaround to the problem. 

It seems to me that in failure_route(), a call to exec_dset() 
_does_ replace the destination set,
but does _not_ reset the branches status values. 

Example:

destination set before exec_dset() in failure_route[]: 
* sip:user at ip (SER internal branch status: 487)

destination set after exec_dset():
* sip:voicemailxxx at ip (SER internal branch status: still 487?)

So, it seems to me that the status value is still set to the old value, and
therefore that "new" branch is not being considered for relaying anymore, even
if it has a new destination.

So, my workaround (which obviously works only when the user has
registered exactly one location) is to return a dummy uri as first
destination, and the voicemail uri as the second one, like:

After exec_dset:
* sip:dummy at nowhere (status: 487)
* sip:vvoicemailxxx at ip (status: -)

which seems to do it as a workaround right now. I don't expect that to
be the final solution, imho the  final solution would be to reset status
values of _all_ branches if exec_dset is being called from within a
failure route. 

Another option would be to modify exec_dset's behaviour to not replace
but rather extend the destination set if called from within a failure_route().

Can anyone comment if modifying exec_dset() to reset branch status
values is the way to go [isn't the fact that it does _not_ happen 
probably a bug?] ?

comments?

cheers

axelm




More information about the sr-users mailing list