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:sbalan...@mydomain.com")
modparam("dispatcher", "ds_ping_interval", 30)
modparam("dispatcher", "ds_probing_threshhold", 3)
modparam("dispatcher", "ds_ping_reply_codes", "class=2;code=403;code=488;class=3")
modparam("dispatcher", "ds_probing_mode", 1)
"""

Calling the logging block happens right at beginning, so not possible 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) = "INTERNAL";
        $avp(s:authUser) = $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 first xlog correctly):
"""
Aug 15 12:36:07 PrxyDev /usr/sbin/kamailio[2973]: ERROR: <script>: Request coming from SCloud Aug 15 12:36:07 PrxyDev /usr/sbin/kamailio[2973]: ERROR: <script>: Checking grp_internal, having: <null>
"""

Thanks again,
DanB




On 08/15/2012 11:41 AM, Daniel-Constantin Mierla wrote:
Hello,

there was no change in dispatcher module related to this function since
3.3.0. The value of the group id is set to the variable specified by the
parameter setid_pvar:

http://kamailio.org/docs/modules/stable/modules_k/dispatcher.html#id2495800

Very likely you are using the wrong variable which you set as grp_avp
parameter, based your config snippets.

Cheers,
Daniel

On 8/15/12 11:30 AM, DanB wrote:
Hey Guys,

Something I noticed after upgrading Kamailio from 3.3.0 to 3.3.1.

Having the following code:
"""
if ds_is_from_list() {
  xlog("Request coming from SCloud");
  xlog("Checking grp_internal, having: $avp(s:dsgrp)");
}
"""

will produce the following output to syslog (dsgrp null instead of
group id):
"""
Aug 15 11:24:28 PrxyDev /usr/sbin/kamailio[2818]: ERROR: <script>:
Request coming from SCloud
Aug 15 11:24:28 PrxyDev /usr/sbin/kamailio[2818]: ERROR: <script>:
Checking grp_internal, having: <null>
"""
I have in dispatcher set:
modparam("dispatcher", "grp_avp", "$avp(dsgrp)")
and I am loading the rules from file.

I should mention that this block was working fine before upgrade.

Am I doing something wrong?

Thanks in advance!
DanB


_______________________________________________
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 - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Seattle, USA, Sep 23-26, 2012 - 
http://asipto.com/u/katu
Kamailio Practical Workshop, Netherlands, Sep 10-12, 2012 - 
http://asipto.com/u/kpw


_______________________________________________
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

Reply via email to