Hi all,

        I will try to do an special condfiguration to manage calls. We
ask to Webservice and I obtain a json structure with and array inside. 

{allow=true, number=sip:205, ip=, port=5080, headers=[X-
header1, X-header2, X-header3], X-header1=2, X-header2=1, X-

This is made like that to add any header and process in an INVITE to
add headers. My problems is when I try to process array. I have next

jansson_get_field("$avp(respINV)", "Allow", "$var(allow)");
    jansson_get_field("$avp(respINV)", "Number", "$var(number)");
    jansson_get_field("$avp(respINV)", "Ip", "$var(ip)");
    jansson_get_field("$avp(respINV)", "port", "$var(port)");
    jansson_get_field("$avp(respINV)", "headers", "$var(headers)");
    jansson_array_size("cabeceras", $var(cabeceras), "$var(size)");
    xlog("L_INFO", "Tamaño: $var(size)----\n");
    while($var(indice) < $var(size))
        xlog("L_INFO", "Cabecera cabeceras[$var(indice)]: --$var(tmp)
        $var(indice) = $var(indice) + 1;
        jannson_get_field("$avp(respINV)", $var(tmp),
        xlog("L_INFO", "Cabecera: $var(tmp) - Valor:
$var(valorCabecera) \n");
    }The problem is in the line:

jannson_get_field("$avp(respINV)", $var(tmp), "$var(valorCabecera)");

It's appears that I can't use variable in second parameter

ERROR: <core> [cfg.y:3228]: yyparse(): cfg. parser: failed to find
command jannson_get_field (params
Sep 21 11:36:58 kam01 kamailio: : <core> [cfg.y:3368]: yyerror_at():
parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line
617, column 69: unknown command, missing loadmodule?

Any one can confirm that I can't use var as parameters in
jannson_get_filed function?

Best regards,


Attachment: signature.asc
Description: This is a digitally signed message part

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

Reply via email to