misc_radius/functions.c

Go to the documentation of this file.
00001 /*
00002  * functions.c  Implementation of exported functions
00003  *
00004  * Copyright (C) 2004 FhG Fokus
00005  * Copyright (C) 2008 Juha Heinanen <jh@tutpro.com>
00006  *
00007  * This file is part of Kamailio, a free SIP server.
00008  *
00009  * Kamailio is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version
00013  *
00014  * Kamailio is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License 
00020  * along with this program; if not, write to the Free Software 
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  */
00024 
00025 #include "../../mod_fix.h"
00026 #include "../../ut.h"
00027 #include "../../dprint.h"
00028 #include "../../usr_avp.h"
00029 #include "../../radius.h"
00030 #include "../../parser/parse_uri.h"
00031 #include "misc_radius.h"
00032 #include "extra.h"
00033 
00034 /* Array for extra attribute values */
00035 static str val_arr[MAX_EXTRA];
00036 
00037 /* Extract one reply item value to AVP flags, name and value */
00038 static inline int extract_avp(VALUE_PAIR* vp, unsigned short *flags,
00039                int_str *name, int_str *value)
00040 {
00041    static str names, values;
00042    unsigned int r;
00043    char *p;
00044    char *end;
00045 
00046    /* empty? */
00047    if (vp->lvalue==0 || vp->strvalue==0)
00048       goto error;
00049 
00050    p = vp->strvalue;
00051    end = vp->strvalue + vp->lvalue;
00052 
00053    /* get name */
00054    if (*p!='#') {
00055       /* name AVP */
00056       *flags |= AVP_NAME_STR;
00057       names.s = p;
00058    } else {
00059       names.s = ++p;
00060    }
00061 
00062    names.len = 0;
00063    while( p<end && *p!=':' && *p!='#')
00064       p++;
00065    if (names.s==p || p==end) {
00066       LM_ERR("empty AVP name\n");
00067       goto error;
00068    }
00069    names.len = p - names.s;
00070 
00071    /* get value */
00072    if (*p!='#') {
00073       /* string value */
00074       *flags |= AVP_VAL_STR;
00075    }
00076    values.s = ++p;
00077    values.len = end-values.s;
00078    if (values.len==0) {
00079       LM_ERR("empty AVP value\n");
00080       goto error;
00081    }
00082 
00083    if ( !((*flags)&AVP_NAME_STR) ) {
00084       /* convert name to id*/
00085       if (str2int(&names,&r)!=0 ) {
00086          LM_ERR("invalid AVP ID '%.*s'\n", names.len,names.s);
00087          goto error;
00088       }
00089       name->n = (int)r;
00090    } else {
00091       name->s = names;
00092    }
00093 
00094    if ( !((*flags)&AVP_VAL_STR) ) {
00095       /* convert value to integer */
00096       if (str2int(&values,&r)!=0 ) {
00097          LM_ERR("invalid AVP numrical value '%.*s'\n", values.len,values.s);
00098          goto error;
00099       }
00100       value->n = (int)r;
00101    } else {
00102       value->s = values;
00103    }
00104 
00105    return 0;
00106 error:
00107    return -1;
00108 }
00109 
00110 
00111 /* Generate AVPs from Radius reply items */
00112 static void generate_avps(struct attr *attrs, VALUE_PAIR* received)
00113 {
00114     int_str name, val;
00115     unsigned short flags;
00116     VALUE_PAIR *vp;
00117 
00118     vp = received;
00119 
00120     for( ; (vp=rc_avpair_get(vp,attrs[SA_SIP_AVP].v,0)) ; vp=vp->next) {
00121    flags = 0;
00122    if (extract_avp( vp, &flags, &name, &val)!=0 )
00123        continue;
00124    if (add_avp( flags, name, val) < 0) {
00125        LM_ERR("unable to create a new AVP\n");
00126    } else {
00127        LM_DBG("AVP '%.*s'/%d='%.*s'/%d has been added\n",
00128          (flags&AVP_NAME_STR)?name.s.len:4,
00129          (flags&AVP_NAME_STR)?name.s.s:"null",
00130          (flags&AVP_NAME_STR)?0:name.n,
00131          (flags&AVP_VAL_STR)?val.s.len:4,
00132          (flags&AVP_VAL_STR)?val.s.s:"null",
00133          (flags&AVP_VAL_STR)?0:val.n );
00134    }
00135     }
00136     
00137     return;
00138 }
00139 
00140 /* Macro to add extra attribute */
00141 #define ADD_EXTRA_AVPAIR(_attrs, _attr, _val, _len)         \
00142     do {                      \
00143    if ((_len) != 0) {                  \
00144        if ((_len) == -1) {                \
00145       if (_attrs[_attr].t != PW_TYPE_INTEGER) {    \
00146           LM_ERR("attribute %d is not of type integer\n",   \
00147             _attrs[_attr].v);          \
00148           goto error;                  \
00149       }                    \
00150        }                      \
00151        if (!rc_avpair_add( rh, &send, _attrs[_attr].v, _val, _len, 0)) { \
00152       LM_ERR("failed to add %s, %d\n", _attrs[_attr].n, _attr); \
00153       goto error;                \
00154        }                      \
00155    }                       \
00156     }while(0)
00157 
00158 
00159 /*
00160  * Loads from Radius caller's AVPs based on pvar argument.
00161  * Returns 1 if Radius request succeeded and -1 otherwise.
00162  */
00163 int radius_load_caller_avps(struct sip_msg* _m, char* _caller, char* _s2)
00164 {
00165     str user;
00166     VALUE_PAIR *send, *received;
00167     UINT4 service;
00168     static char msg[4096];
00169     int extra_cnt, offset, i, res;
00170 
00171     if ((_caller == NULL) ||
00172    (fixup_get_svalue(_m, (gparam_p)_caller, &user) != 0)) {
00173    LM_ERR("invalid caller parameter");
00174    return -1;
00175     }
00176 
00177     send = received = 0;
00178 
00179     if (!rc_avpair_add(rh, &send, caller_attrs[SA_USER_NAME].v,
00180              user.s, user.len, 0)) {
00181    LM_ERR("in adding SA_USER_NAME\n");
00182    return -1;
00183     }
00184 
00185     service = caller_vals[RV_SIP_CALLER_AVPS].v;
00186     if (!rc_avpair_add(rh, &send, caller_attrs[SA_SERVICE_TYPE].v,
00187              &service, -1, 0)) {
00188    LM_ERR("error adding SA_SERVICE_TYPE <%u>\n", service);
00189    goto error;
00190     }
00191 
00192     /* Add extra attributes */
00193     extra_cnt = extra2strar(caller_extra, _m, val_arr);
00194     if (extra_cnt == -1) {
00195    LM_ERR("in getting values of caller extra attributes\n");
00196    goto error;
00197     }
00198     offset = SA_STATIC_MAX;
00199     for (i = 0; i < extra_cnt; i++) {
00200    if (val_arr[i].len == -1) {
00201        /* Add integer attribute */
00202        ADD_EXTRA_AVPAIR(caller_attrs, offset+i,
00203               &(val_arr[i].s), val_arr[i].len );
00204    } else {
00205        /* Add string attribute */
00206        ADD_EXTRA_AVPAIR(caller_attrs, offset+i,
00207               val_arr[i].s, val_arr[i].len );
00208    }
00209     }
00210 
00211     if ((res = rc_auth(rh, 0, send, &received, msg)) == OK_RC) {
00212    LM_DBG("success\n");
00213    rc_avpair_free(send);
00214    generate_avps(caller_attrs, received);
00215    rc_avpair_free(received);
00216    return 1;
00217     } else {
00218    rc_avpair_free(send);
00219    rc_avpair_free(received);
00220 #ifdef REJECT_RC
00221    if (res == REJECT_RC) {
00222        LM_DBG("rejected\n");
00223        return -1;
00224    } else {
00225        LM_ERR("failure\n");
00226        return -2;
00227    }
00228 #else
00229    LM_DBG("failure\n");
00230    return -1;
00231 #endif
00232     }
00233 
00234  error:
00235     rc_avpair_free(send);
00236     return -1;
00237 }
00238 
00239 
00240 /*
00241  * Loads from Radius callee's AVPs based on pvar argument.
00242  * Returns 1 if Radius request succeeded and -1 otherwise.
00243  */
00244 int radius_load_callee_avps(struct sip_msg* _m, char* _callee, char* _s2)
00245 {
00246     str user;
00247     VALUE_PAIR *send, *received;
00248     UINT4 service;
00249     static char msg[4096];
00250     int extra_cnt, offset, i, res;
00251 
00252     send = received = 0;
00253 
00254     if ((_callee == NULL) ||
00255    (fixup_get_svalue(_m, (gparam_p)_callee, &user) != 0)) {
00256    LM_ERR("invalid callee parameter");
00257    return -1;
00258     }
00259 
00260     if (!rc_avpair_add(rh, &send, callee_attrs[SA_USER_NAME].v,
00261              user.s, user.len, 0)) {
00262    LM_ERR("in adding SA_USER_NAME\n");
00263    return -1;
00264     }
00265 
00266     service = callee_vals[EV_SIP_CALLEE_AVPS].v;
00267     if (!rc_avpair_add(rh, &send, callee_attrs[SA_SERVICE_TYPE].v,
00268              &service, -1, 0)) {
00269    LM_ERR("in adding SA_SERVICE_TYPE <%u>\n", service);
00270    goto error;
00271     }
00272 
00273     /* Add extra attributes */
00274     extra_cnt = extra2strar(callee_extra, _m, val_arr);
00275     if (extra_cnt == -1) {
00276    LM_ERR("in getting values of callee extra attributes\n");
00277    goto error;
00278     }
00279     offset = SA_STATIC_MAX;
00280     for (i = 0; i < extra_cnt; i++) {
00281    if (val_arr[i].len == -1) {
00282        /* Add integer attribute */
00283        ADD_EXTRA_AVPAIR(callee_attrs, offset+i,
00284               &(val_arr[i].s), val_arr[i].len );
00285    } else {
00286        /* Add string attribute */
00287        ADD_EXTRA_AVPAIR(callee_attrs, offset+i,
00288               val_arr[i].s, val_arr[i].len );
00289    }
00290     }
00291 
00292     if ((res = rc_auth(rh, 0, send, &received, msg)) == OK_RC) {
00293    LM_DBG("success\n");
00294    rc_avpair_free(send);
00295    generate_avps(callee_attrs, received);
00296    rc_avpair_free(received);
00297    return 1;
00298     } else {
00299    rc_avpair_free(send);
00300    rc_avpair_free(received);
00301 #ifdef REJECT_RC
00302    if (res == REJECT_RC) {
00303        LM_DBG("rejected\n");
00304        return -1;
00305    } else {
00306        LM_ERR("failure\n");
00307        return -2;
00308    }
00309 #else
00310    LM_DBG("failure\n");
00311    return -1;
00312 #endif
00313     }
00314 
00315  error:
00316     rc_avpair_free(send);
00317     return -1;
00318 }
00319 
00320 
00321 /*
00322  * Check from Radius if a user belongs to a group. User-Name is given in
00323  * first string argment that may contain pseudo variables.  SIP-Group is
00324  * given in second string variable that may not contain pseudo variables.
00325  * Service-Type is Group-Check.
00326  */
00327 int radius_is_user_in(struct sip_msg* _m, char* _user, char* _group)
00328 {
00329     str user, *group;
00330     VALUE_PAIR *send, *received;
00331     UINT4 service;
00332     static char msg[4096];
00333     int extra_cnt, offset, i, res;
00334 
00335     send = received = 0;
00336 
00337     if ((_user == NULL) ||
00338    (fixup_get_svalue(_m, (gparam_p)_user, &user) != 0)) {
00339    LM_ERR("invalid user parameter");
00340    return -1;
00341     }
00342 
00343     if (!rc_avpair_add(rh, &send, group_attrs[SA_USER_NAME].v,
00344              user.s, user.len, 0)) {
00345    LM_ERR("in adding SA_USER_NAME\n");
00346    return -1;
00347     }
00348 
00349     group = (str*)_group;
00350     if ((group == NULL) || (group->len == 0)) {
00351    LM_ERR("invalid group parameter");
00352    goto error;
00353     }
00354     if (!rc_avpair_add(rh, &send, group_attrs[SA_SIP_GROUP].v,
00355              group->s, group->len, 0)) {
00356    LM_ERR("in adding SA_SIP_GROUP\n");
00357    goto error;
00358     }
00359 
00360     service = group_vals[GV_GROUP_CHECK].v;
00361     if (!rc_avpair_add(rh, &send, group_attrs[SA_SERVICE_TYPE].v,
00362              &service, -1, 0)) {
00363    LM_ERR("in adding SA_SERVICE_TYPE <%u>\n", service);
00364    goto error;
00365     }
00366 
00367     /* Add extra attributes */
00368     extra_cnt = extra2strar(group_extra, _m, val_arr);
00369     if (extra_cnt == -1) {
00370    LM_ERR("in getting values of group extra attributes\n");
00371    goto error;
00372     }
00373     offset = SA_STATIC_MAX;
00374     for (i = 0; i < extra_cnt; i++) {
00375    if (val_arr[i].len == -1) {
00376        /* Add integer attribute */
00377        ADD_EXTRA_AVPAIR(group_attrs, offset+i,
00378               &(val_arr[i].s), val_arr[i].len );
00379    } else {
00380        /* Add string attribute */
00381        ADD_EXTRA_AVPAIR(group_attrs, offset+i,
00382               val_arr[i].s, val_arr[i].len );
00383    }
00384     }
00385 
00386     if ((res = rc_auth(rh, 0, send, &received, msg)) == OK_RC) {
00387    LM_DBG("success\n");
00388    rc_avpair_free(send);
00389    generate_avps(group_attrs, received);
00390    rc_avpair_free(received);
00391    return 1;
00392     } else {
00393    rc_avpair_free(send);
00394    rc_avpair_free(received);
00395 #ifdef REJECT_RC
00396    if (res == REJECT_RC) {
00397        LM_DBG("rejected\n");
00398        return -1;
00399    } else {
00400        LM_ERR("failure\n");
00401        return -2;
00402    }
00403 #else
00404    LM_DBG("failure\n");
00405    return -1;
00406 #endif
00407     }
00408 
00409  error:
00410     rc_avpair_free(send);
00411     return -1;
00412 }
00413 
00414 /*
00415  * Check from Radius if URI, whose user and host parts are given as
00416  * arguments, exists.  If so, loads AVPs based on reply items returned
00417  * from Radius.  If use_sip_uri_host module parameter has non-zero value,
00418  * user is send in SA_USER_NAME attribute and host in SA_SIP_URI_HOST
00419  * attribute.  If is has zero value, user@host is send in SA_USER_NAME
00420  * attribute.
00421  */
00422 int radius_does_uri_user_host_exist(struct sip_msg* _m, str user, str host)
00423 {
00424     char* at, *user_host;
00425     VALUE_PAIR *send, *received;
00426     UINT4 service;
00427     static char msg[4096];
00428     int extra_cnt, offset, i, res;
00429 
00430     send = received = 0;
00431     user_host = 0;
00432 
00433     if (!use_sip_uri_host) {
00434 
00435    /* Send user@host in SA_USER_NAME attr */
00436    user_host = (char*)pkg_malloc(user.len + host.len + 2);
00437    if (!user_host) {
00438        LM_ERR("no more pkg memory\n");
00439        return -1;
00440    }
00441    at = user_host;
00442    memcpy(at, user.s, user.len);
00443    at += user.len;
00444    *at = '@';
00445    at++;
00446    memcpy(at , host.s, host.len);
00447    at += host.len;
00448    *at = '\0';
00449    if (!rc_avpair_add(rh, &send, uri_attrs[SA_USER_NAME].v, user_host,
00450             -1, 0)) {
00451        LM_ERR("in adding SA_USER_NAME\n");
00452        pkg_free(user_host);
00453        return -1;
00454    }
00455 
00456     } else {
00457 
00458    /* Send user in SA_USER_NAME attribute and host in SA_SIP_URI_HOST
00459           attribute */
00460    if (!rc_avpair_add(rh, &send, uri_attrs[SA_USER_NAME].v,
00461             user.s, user.len, 0)) {
00462        LM_ERR("adding User-Name failed\n");
00463        return -1;
00464    }
00465    if (!rc_avpair_add(rh, &send, uri_attrs[SA_SIP_URI_HOST].v,
00466             host.s, host.len, 0)) {
00467        LM_ERR("adding SIP-URI-Host failed\n");
00468        goto error;
00469    }
00470     }
00471 
00472     service = uri_vals[UV_CALL_CHECK].v;
00473     if (!rc_avpair_add(rh, &send, uri_attrs[SA_SERVICE_TYPE].v,
00474              &service, -1, 0)) {
00475    LM_ERR("in adding SA_SERVICE_TYPE <%u>\n", service);
00476    goto error;
00477     }
00478 
00479     /* Add extra attributes */
00480     extra_cnt = extra2strar(uri_extra, _m, val_arr);
00481     if (extra_cnt == -1) {
00482    LM_ERR("in getting values of group extra attributes\n");
00483    goto error;
00484     }
00485     offset = SA_STATIC_MAX;
00486     for (i = 0; i < extra_cnt; i++) {
00487    if (val_arr[i].len == -1) {
00488        /* Add integer attribute */
00489        ADD_EXTRA_AVPAIR(uri_attrs, offset+i,
00490               &(val_arr[i].s), val_arr[i].len );
00491    } else {
00492        /* Add string attribute */
00493        ADD_EXTRA_AVPAIR(uri_attrs, offset+i,
00494               val_arr[i].s, val_arr[i].len );
00495    }
00496     }
00497 
00498     if ((res = rc_auth(rh, 0, send, &received, msg)) == OK_RC) {
00499    LM_DBG("success\n");
00500    if (user_host) pkg_free(user_host);
00501    rc_avpair_free(send);
00502    generate_avps(uri_attrs, received);
00503    rc_avpair_free(received);
00504    return 1;
00505     } else {
00506    if (user_host) pkg_free(user_host);
00507    rc_avpair_free(send);
00508    rc_avpair_free(received);
00509 #ifdef REJECT_RC
00510    if (res == REJECT_RC) {
00511        LM_DBG("rejected\n");
00512        return -1;
00513    } else {
00514        LM_ERR("failure\n");
00515        return -2;
00516    }
00517 #else
00518    LM_DBG("failure\n");
00519    return -1;
00520 #endif
00521     }
00522 
00523  error:
00524     rc_avpair_free(send);
00525     if (user_host) pkg_free(user_host);
00526     return -1;
00527 }
00528 
00529 
00530 /*
00531  * Check from Radius if Request URI belongs to a local user.
00532  * If so, loads AVPs based on reply items returned from Radius.
00533  */
00534 int radius_does_uri_exist_0(struct sip_msg* _m, char* _s1, char* _s2)
00535 {
00536 
00537     if (parse_sip_msg_uri(_m) < 0) {
00538    LM_ERR("parsing Request-URI failed\n");
00539    return -1;
00540     }
00541 
00542     return radius_does_uri_user_host_exist(_m, _m->parsed_uri.user,
00543                   _m->parsed_uri.host);
00544 }
00545 
00546 
00547 /*
00548  * Check from Radius if URI given in pvar argument belongs to a local user.
00549  * If so, loads AVPs based on reply items returned from Radius.
00550  */
00551 int radius_does_uri_exist_1(struct sip_msg* _m, char* _sp, char* _s2)
00552 {
00553     pv_spec_t *sp;
00554     pv_value_t pv_val;
00555     struct sip_uri parsed_uri;
00556 
00557     sp = (pv_spec_t *)_sp;
00558 
00559     if (sp && (pv_get_spec_value(_m, sp, &pv_val) == 0)) {
00560    if (pv_val.flags & PV_VAL_STR) {
00561        if (pv_val.rs.len == 0 || pv_val.rs.s == NULL) {
00562       LM_ERR("pvar argument is empty\n");
00563       return -1;
00564        }
00565    } else {
00566        LM_ERR("pvar value is not string\n");
00567        return -1;
00568    }
00569     } else {
00570    LM_ERR("cannot get pvar value\n");
00571    return -1;
00572     }
00573 
00574     if (parse_uri(pv_val.rs.s, pv_val.rs.len, &parsed_uri) < 0) {
00575    LM_ERR("parsing of URI in pvar failed\n");
00576    return -1;
00577     }
00578 
00579     return radius_does_uri_user_host_exist(_m, parsed_uri.user,
00580                   parsed_uri.host);
00581 }
00582 
00583 
00584 /*
00585  * Check from Radius if URI user given as argument belongs to a local user.
00586  * If so, loads AVPs based on reply items returned from Radius.
00587  */
00588 int radius_does_uri_user_exist(struct sip_msg* _m, str user)
00589 {
00590     static char msg[4096];
00591     VALUE_PAIR *send, *received;
00592     UINT4 service;
00593     int res, extra_cnt, offset, i;
00594     
00595     send = received = 0;
00596     
00597     if (!rc_avpair_add(rh, &send, uri_attrs[SA_USER_NAME].v,
00598              user.s, user.len, 0)) {
00599    LM_ERR("in adding SA_USER_NAME\n");
00600    return -1;
00601     }
00602     
00603     service = uri_vals[UV_CALL_CHECK].v;
00604     if (!rc_avpair_add(rh, &send, uri_attrs[SA_SERVICE_TYPE].v,
00605              &service, -1, 0)) {
00606    LM_ERR("in adding SA_SERVICE_TYPE <%u>\n", service);
00607    goto error;
00608     }
00609 
00610     /* Add extra attributes */
00611     extra_cnt = extra2strar(uri_extra, _m, val_arr);
00612     if (extra_cnt == -1) {
00613    LM_ERR("in getting values of group extra attributes\n");
00614    goto error;
00615     }
00616     offset = SA_STATIC_MAX;
00617     for (i = 0; i < extra_cnt; i++) {
00618    if (val_arr[i].len == -1) {
00619        /* Add integer attribute */
00620        ADD_EXTRA_AVPAIR(uri_attrs, offset+i,
00621               &(val_arr[i].s), val_arr[i].len );
00622    } else {
00623        /* Add string attribute */
00624        ADD_EXTRA_AVPAIR(uri_attrs, offset+i,
00625               val_arr[i].s, val_arr[i].len );
00626    }
00627     }
00628 
00629     if ((res = rc_auth(rh, 0, send, &received, msg)) == OK_RC) {
00630    LM_DBG("success\n");
00631    rc_avpair_free(send);
00632    generate_avps(uri_attrs, received);
00633    rc_avpair_free(received);
00634    return 1;
00635     } else {
00636    rc_avpair_free(send);
00637    rc_avpair_free(received);
00638 #ifdef REJECT_RC
00639    if (res == REJECT_RC) {
00640        LM_DBG("rejected\n");
00641        return -1;
00642    } else {
00643        LM_ERR("failure\n");
00644        return -2;
00645    }
00646 #else
00647    LM_DBG("failure\n");
00648    return -1;
00649 #endif
00650     }
00651 
00652  error:
00653     rc_avpair_free(send);
00654     return -1;
00655 }
00656 
00657 
00658 /*
00659  * Check from Radius if Request URI user belongs to a local user.
00660  * If so, loads AVPs based on reply items returned from Radius.
00661  */
00662 int radius_does_uri_user_exist_0(struct sip_msg* _m, char* _s1, char* _s2)
00663 {
00664 
00665     if (parse_sip_msg_uri(_m) < 0) {
00666    LM_ERR("parsing Request-URI failed\n");
00667    return -1;
00668     }
00669 
00670     return radius_does_uri_user_exist(_m, _m->parsed_uri.user);
00671 }
00672 
00673 
00674 /*
00675  * Check from Radius if URI user given in pvar argument belongs
00676  * to a local user. If so, loads AVPs based on reply items returned
00677  * from Radius. 
00678  */
00679 int radius_does_uri_user_exist_1(struct sip_msg* _m, char* _sp, char* _s2)
00680 {
00681     pv_spec_t *sp;
00682     pv_value_t pv_val;
00683 
00684     sp = (pv_spec_t *)_sp;
00685 
00686     if (sp && (pv_get_spec_value(_m, sp, &pv_val) == 0)) {
00687    if (pv_val.flags & PV_VAL_STR) {
00688        if (pv_val.rs.len == 0 || pv_val.rs.s == NULL) {
00689       LM_ERR("pvar argument is empty\n");
00690       return -1;
00691        }
00692    } else {
00693        LM_ERR("pvar value is not string\n");
00694        return -1;
00695    }
00696     } else {
00697    LM_ERR("cannot get pvar value\n");
00698    return -1;
00699     }
00700 
00701     return radius_does_uri_user_exist(_m, pv_val.rs);
00702 }

Generated on Wed May 23 20:00:26 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6