Hello,

On 1/4/11 5:13 PM, alex pappas wrote:
Hi all,

The $avp(dsattrs) it works fine. It was a misconfiguration.
thanks for reporting back.

Does anyone knows if is possible to retrieve from Dispatcher the description field from each GW and add that to an avp pair?

Isn't the attribute field enough for such needs? The description field in db was intended to map on comments from the text file, just to help admins understand what is about that address.

Cheers,
Daniel


Thanks

Alex





On Mon, Jan 3, 2011 at 6:13 PM, alex pappas <rebel.pappas@gmail.com> wrote:
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;
                        }

_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
Kamailio (OpenSER) Advanced Training
Jan 24-26, 2011, Irvine, CA, USA
http://www.asipto.com