[OpenSIPS-Users] send params in mi_json

Jayesh Nambiar jayesh1017 at gmail.com
Wed Jul 23 11:07:42 CEST 2014


Thanks Razvan. So the correct format is:
GET /json/dlg_end_dlg?params=1368%2C1091608310 if your h_entry is 1368 and
h_id is 1091608310.
This works fine. Thanks again.

--- Jayesh


On Wed, Jul 23, 2014 at 1:08 PM, Răzvan Crainea <razvan at opensips.org> wrote:

> Hi, Jayesh!
>
> According to the examples in the documentation[1], parameters should be
> separated using comma.
>
> [1] http://www.opensips.org/html/docs/modules/1.11.x/mi_json.html#id249590
>
> Best regards,
>
> Razvan Crainea
> OpenSIPS Core Developer
> http://www.opensips-solutions.com
>
>
> On 07/22/2014 06:20 PM, Jayesh Nambiar wrote:
>
>> Hello,
>> Can somebody please help me in passing parameters in HTTP GET Request.
>> I'm using mi_json to send commands to opensips. I wanted to end a
>> running dialog based on certain conditions. For example, if my dialog-id
>> is 1368:1091608310; I would normally run opensipsctl fifo dlg_end_dlg
>> 1368 1091608310 from the CLI.
>>
>> I tried the following from the http client:
>> GET /json/dlg_end_dlg?params=1368%201091608310 (Adding a space with %20)
>> GET /json/dlg_end_dlg?params=1368:1091608310 (sending the colon)
>> GET /json/dlg_end_dlg?params=1368%3A1091608310 (URL encoded the colon)
>>
>> But nothing above works. Somehow the params dont reach as expected to
>> the opensips. When I run a command that dont expect any params it works
>> well.
>> For eg: GET /json/dlg_list works well and returns the running dialogs in
>> json format as expected. But commands with parameters just fails !!
>>
>> I tried googling for examples but couldn't find much and I'm just doing
>> trial and error for a while :(
>>
>> --- Jayesh
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140723/0dbb7ce5/attachment.htm>


More information about the Users mailing list