From miconda@gmail.com Wed Aug 15 12:53:32 2012 From: Daniel-Constantin Mierla To: sr-users@lists.kamailio.org Subject: Re: [SR-Users] Dispatcher: ds_is_from_list does not longer populate grp_avp Date: Wed, 15 Aug 2012 12:53:24 +0200 Message-ID: <502B7FA4.1010809@gmail.com> In-Reply-To: <502B7BDA.4090802@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1260891003==" --===============1260891003== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, grp_avp is set only when calling the destination/domain select functions. You have to set the parameter setid_pvar: http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html#id2495800 And use the variable you set for this parameter after ds_is_from_list(). So, there are two parameters, grp_avp and setid_pvar. Cheers, Daniel On 8/15/12 12:37 PM, DanB wrote: > Hey Daniel, > > Thanks for so fast feedback. I have doublecked again the config: > > If it helps, here are my complete settings: > """ > # ----- dispatcher params ----- > modparam("dispatcher", "list_file", "/etc/sbalancer/dispatcher.list") > modparam("dispatcher", "flags", 2) > modparam("dispatcher", "dst_avp", "$avp(dsdst)") > modparam("dispatcher", "grp_avp", "$avp(dsgrp)") > modparam("dispatcher", "cnt_avp", "$avp(dscnt)") > modparam("dispatcher", "attrs_avp", "$avp(dsattrs)") > modparam("dispatcher", "hash_pvar", "$avp(dshash)") > modparam("dispatcher", "ds_ping_from", "sip:SBalancer(a)mydomain.com") > modparam("dispatcher", "ds_ping_interval", 30) > modparam("dispatcher", "ds_probing_threshhold", 3) > modparam("dispatcher", "ds_ping_reply_codes",=20 > "class=3D2;code=3D403;code=3D488;class=3D3") > modparam("dispatcher", "ds_probing_mode", 1) > """ > > Calling the logging block happens right at beginning, so not possible=20 > to overwrite the avp. > """ > request_route { > #check antiflood before anything > route(ANTIFLOOD); > > # Detect if requests are from internal network > if ds_is_from_list() { > xlog("Request coming from SCloud"); > $avp(s:authType) =3D "INTERNAL"; > $avp(s:authUser) =3D $hdr(X-AuthUser); > xlog("Checking grp_internal, having: $avp(dsgrp)"); > } > """ > > Result the same ( I am sure ds_is_from_list matches since I get the=20 > first xlog correctly): > """ > Aug 15 12:36:07 PrxyDev /usr/sbin/kamailio[2973]: ERROR: