[SR-Users] Dispatcher Attributes field

alex pappas rebel.pappas at gmail.com
Mon Jan 3 17:13:05 CET 2011


Dear all,

I'm trying with the Dispatcher module to terminate a call to three different
gateways serially.  For each gw I use the attribute field to get the
attribute and add it as a prefix to the RU.
The problem is that the $avp(dsattrs) is returning always the first value of
the first gw that is using.

example:

destination sip:100.12.12.12:5060 attrs 111
destination sip:100.12.12.11:5060 attrs 222
destination sip:100.12.12.10:5060 attrs 333


In this example the rU will always be 111+number. I tried also to initiate
the avp in the Failure route by giving null value but still does not change
the result.


In Request route:

 if(ds_select_domain("$avp(s:disp_dstgrp)", "4"))
                {
                        $avp(s:term_prefix) = $avp(dsattrs); # avp for CDR
purpose

                                $rU = $avp(dsattrs) + $rU;
                        t_on_failure("FAIL_NATIONAL");
                        t_relay();
                        exit;

}

In Failure route:


 if(!ds_next_domain())
                {
                        t_reply("503", "Service Unavailable");
                        exit;
                } else {

                               $rU = $avp(dsattrs) + $rU;


                        t_on_failure("FAIL_THIS");
                        append_branch();
                        if(!t_relay()) {
                                t_reply("503","Service Unavailable");
                                exit;
                        }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110103/b839a98f/attachment.htm>


More information about the sr-users mailing list