<html><head></head>
<body><div>Hi all,</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">   </span>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. </div><div><br></div><div><br></div><div>{allow=true, number=sip:205, ip=127.26.101.12, port=5080, headers=[X-header1, X-header2, X-header3], X-header1=2, X-header2=1, X-header3=yes}</div><div><br></div><div>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 code:</div><div><br></div><div>jansson_get_field("$avp(respINV)", "Allow", "$var(allow)");</div><div>    jansson_get_field("$avp(respINV)", "Number", "$var(number)");</div><div>    jansson_get_field("$avp(respINV)", "Ip", "$var(ip)");</div><div>    jansson_get_field("$avp(respINV)", "port", "$var(port)");</div><div>    jansson_get_field("$avp(respINV)", "headers", "$var(headers)");</div><div>    $var(indice)=0;</div><div>    $var(cabeceras)="{\"cabeceras\":$var(headers)}";</div><div>    jansson_array_size("cabeceras", $var(cabeceras), "$var(size)");</div><div>    xlog("L_INFO", "TamaƱo: $var(size)----\n");</div><div>    while($var(indice) < $var(size))</div><div>    {</div><div>        jansson_get("cabeceras[$var(indice)]",$var(cabeceras), "$var(tmp)");</div><div>        xlog("L_INFO", "Cabecera cabeceras[$var(indice)]: --$var(tmp)--\n");</div><div>        $var(indice) = $var(indice) + 1;</div><div>        jannson_get_field("$avp(respINV)", $var(tmp), "$var(valorCabecera)");</div><div>        xlog("L_INFO", "Cabecera: $var(tmp) - Valor: $var(valorCabecera) \n");</div><div>    }</div><div class="-x-evo-paragraph -x-evo-top-signature-spacer"><br></div><div>The problem is in the line:</div><div><br></div><div>jannson_get_field("$avp(respINV)", $var(tmp), "$var(valorCabecera)");</div><div><br></div><div><br></div><div>It's appears that I can't use variable in second parameter</div><div><br></div><div>ERROR: <core> [cfg.y:3228]: yyparse(): cfg. parser: failed to find command jannson_get_field (params 3)                                                       </div><div>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?</div><div><br></div><div><br></div><div>Any one can confirm that I can't use var as parameters in jannson_get_filed function?</div><div><br></div><div>Best regards,</div><div><br></div><div>Sergio</div></body></html>