[OpenSIPS-Users] How should we represent empty parameters in MI Datagram JSON
Adrian Fretwell
adrian.fretwell at topgreen.co.uk
Wed Jul 8 14:42:04 EST 2020
Vlad,
Thank you , that makes sense, and seems so obvious now you have said
it! Switch from positional to named parameters. Works perfectly.
Kind regards,
Adrian Fretwell
Sibthorpe
Nottinghamshire
UK.
On 08/07/2020 15:28, Vlad Patrascu wrote:
> Hi Adrian,
>
> In the cases (like 'pua_publish') where there are multiple optional
> parameters that cannot be simply identified by position in the array,
> the 'params' member in the JSON-RPC request should be an Object with
> named parameters.
>
> As such, you should have:
>
> "params": {
>
> "presentity_uri": "sip:system at 192.168.2.132",
>
> "expires": 3600,
>
> [...]
>
> }
>
> Regards,
>
> On 06.07.2020 22:47, Adrian Fretwell wrote:
>>
>> Hello,
>>
>> What is the correct way to specify empty parameters in an MI call
>> using JSON?
>>
>> For example this call to pua_publish has two unused parameters; ETag
>> and extra_headers, in the old way they were represented by a dot, but
>> if I try that now I get an invalid etag message:
>>
>> Pua_publish:
>>
>> <presentity_uri>
>> <expires>
>> <event package>
>> <content_type> - body type if body of a type different from
>> default event content-type or .
>> <ETag> - ETag that publish should match or . if
>> no ETag
>> <extra_headers> - extra headers to be added to the request or .
>> <publish_body> - may not be present in case of update for expire
>>
>> Example:
>>
>> :pua_publish:fifo_reply
>> sip:system at 192.168.2.132
>> 3600
>> presence
>> application/pidf+xml
>> .
>> .
>> <?xml version='1.0'?><presence xmlns='urn:ietf:params:xml:ns:pidf'
>> xmlns:dm='urn:ietf:params:xml:ns:pidf:data-model'... etc.
>>
>> Would someone point me in the right direction please.
>>
>>
>> Kind regards,
>>
>> Adrian Fretwell
>> Sibthorpe
>> Nottinghamshire
>> UK.
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> --
> Vlad Patrascu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> _______________________________________________
> 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/20200708/661e8225/attachment.html>
More information about the Users
mailing list