Hello,

set the local resp to "$var(resp)" or another writable Kamailio config
variable name.

Cheers,
Daniel

On 14.08.24 11:31, 17603019528--- via sr-users wrote:
> ALL:
>     Hi, here is my lua script:
>      ```
>      local body = '{"ip":"172.16.4.111", "ports":[5261, 5260]}'
>      local resp = ""
>      local code = KSR.http_client.curl_connect_post("configapi", "", 
> "application/json", body, resp)
>     ```
>    the error is :
>    ```
>    24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): 
> param[0] for: curl_connect_post is str: configapi
>   24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): 
> param[1] for: curl_connect_post is str: 
>   24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): 
> param[2] for: curl_connect_post is str: application/json
>   24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): 
> param[3] for: curl_connect_post is str: {"ip":"172.16.4.111", "ports":[5261, 
> 5260]}
>   24(2406) DEBUG: app_lua [app_lua_api.c:1024]: sr_kemi_lua_exec_func_ex(): 
> param[4] for: curl_connect_post is str: 
>   24(2406) ERROR: <core> [core/pvapi.c:429]: pv_cache_get(): invalid 
> parameters
>   24(2406) ERROR: http_client [http_client.c:739]: ki_curl_connect_post(): 
> failed to get pv spec for: 
>    ```
>   I know the error means: "resp" type is not right,  what is  the correct 
> type ?  I search google for this issue, no one knows,  someone  please help 
> me.
>
> Thinks
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:

-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy, Training and Development Services -- asipto.com

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to