Hi, Gary!

Have you tried quoting the entire curl parameter using quotes?

curl "127.0.0.1:8888/json/t_uac_dlg?params=OPTIONS,sip:[email protected],.,.,From: sip:[email protected],To: sip:[email protected],Content-Type: text/plain"

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com

On 09/22/2014 07:23 PM, Gary Nyquist wrote:
Hi Răzvan,
Thanks for the response.
The "get_statistics" command works fine with the comma-separated params.
Facing problem with 't_uac_dlg' command.
Can't figure out how to pass the headers in the params.
As per the 'tm' module doc:


      |t_uac_dlg|

Generates and sends a local SIP request.

Parameters:

 *

    /method/ - request method

 *

    /RURI/ - request SIP URI

 *

    /NEXT HOP/ - next hop SIP URI (OBP); use “.” if no value.

 *

    /socket/ - local socket to be used for sending the request; use
    “.” if no value.

 *

    /headers/ - set of additional headers to be added to the request;
    at least “From” and “To” headers must be specify)

 *

    /body/ - (optional, may not be present) request body (if present,
    requires the “Content-Type” and “Content-length” headers)

I want to send (say) an OPTIONS packet.
The following fifo commands works fine:
opensipsctl fifo t_uac_dlg OPTIONS "sip:[email protected]" . . "\"From: sip:[email protected]\r\nTo: sip:[email protected]\r\nContent-Type: text/plain\r\n"\"
But, 'mi_json' command won't work.
Have tried (without luck) with several permutations, including the follwoing: curl 127.0.0.1:8888/json/t_uac_dlg?params=OPTIONS,sip:[email protected],.,.,From: sip:[email protected],To: sip:[email protected],Content-Type: text/plain Have tried with url encoing the complete params query string; but no OPTIONS packet goes out.
No errors in the log also (debug level 4).
Any clues?
Regards
-Gary
*Sent:* Monday, September 22, 2014 at 8:11 AM
*From:* "Răzvan Crainea" <[email protected]>
*To:* [email protected]
*Subject:* Re: [OpenSIPS-Users] mi_json parameters format
Hi, Gary!

As the documentation indicates, you should pass the parameters separated
by comma. You can try something like this:

curl "http://127.0.0.1:8888/JSON/get_statistics?params=tm:,dialog:";

Best regards,

Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com <http://www.opensips-solutions.com>

On 09/18/2014 11:41 PM, Gary Nyquist wrote:
> Hi,
>
> I am trying to use the MI interface to generate SIP MESSAGE packets locally
> and send out to remote SIP UA.
>
> The 'opensipsctl fifo' method works fine.
> The 'mi_datagram' method works fine.
>
> But not able to make "mi_json" work with "t_uac_dlg".
> Basically, can't figure out how the parameters for "t_uac_dlg" be formatted for the mi_json query.
>
> Reading the manual, I understand that the "parameters are to be comma-separated then URI-encoded."
> The following working fine:
> curl 10.0.0.30:8888/json/get_statistics?params=all
>
> But can't figure out how to pass the parameters for "t_uac_dlg" command.
>
> Any help / advice?
>
> Thanks
> -Gary
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to