[OpenSIPS-Users] mi_xmlrpc_ng Problem

Ovidiu Sas osas at voipembedded.com
Mon Jan 20 22:28:46 CET 2014


Mr. PlayMen,

As I mentioned to you before, you need to send the arguments as a string.
I tested and it works fine with mi_xmlrpc_ng.

You can tested using curl.
First, create a file called dialog.xml.
$ cat dialog.xml
<?xml version='1.0'?>
<methodCall>
<methodName>dlg_end_dlg</methodName>
<params>
<param><value><string>HASH_ENTRY</string></value></param>
<param><value><string>HASH_ID</string></value></param>
</params>
</methodCall>

replace HASH_ENTRY and HASH_ID with your real values

Then send the values to your opensips server:
curl -i -X POST http://OPENSIPS_IP:PORT/PATH -d @dialog.xml -H
"Content-Type: text/xml"

In your script, you need to force those values to be string.
Probably you need to put quotes or double quotes around the hash_entry
and hash_id variables.

Regards,
Ovidiu Sas

On Mon, Jan 20, 2014 at 3:16 PM, Dragomir Haralambiev
<goup2010 at gmail.com> wrote:
> Hello,
>
> The module mi_xmlrpc have problem with dlg_list_ctx when have 50 concurent
> calls. /The Opensips crashed/.
>
> The module mi_xmlrpc_ng not working with dlg_end_dlg because OpenSips not
> received integer value (<i4>).
>
> Can anyone advise me what to use for remote MI.
>
> Rgards,
> PlayMen
>
>
> 2014/1/20 Ovidiu Sas <osas at voipembedded.com>
>>
>> Give it a try.  IIRC the conversion is done automatically in opensips.
>> You should send only strings.
>>
>> -ovidiu
>>
>>
>> On Monday, January 20, 2014, Dragomir Haralambiev <goup2010 at gmail.com>
>> wrote:
>>>
>>> I do not know.
>>> The PERL XML::RPC for integer variable use <i4> only.
>>>
>>>
>>> 2014/1/20 Ovidiu Sas <osas at voipembedded.com>
>>>>
>>>> Does it work without i4?
>>>>
>>>>
>>>> On Monday, January 20, 2014, Dragomir Haralambiev <goup2010 at gmail.com>
>>>> wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I try to terminate call using dlg_end_dlg.
>>>>>
>>>>> When use module mi_xmlrpc all is OK.
>>>>> When use module mi_xmlrpc_ng I receive follow error:
>>>>>
>>>>> DBG:mi_xmlrpc_ng:mi_xmlrpc_http_run_mi_cmd: got methodName=dlg_end_dlg
>>>>> ERROR:mi_xmlrpc_ng:mi_xmlrpc_http_run_mi_cmd: missing node string
>>>>> ERROR:mi_xmlrpc_ng:mi_xmlrpc_http_answer_to_connection: no reply
>>>>>
>>>>> Here is PERL script:
>>>>>
>>>>> #!/usr/bin/perl
>>>>> use XML::RPC;
>>>>> $hash_entry=538;
>>>>> $hash_id=10274470;
>>>>> $xmlrpc = XML::RPC->new("http://OPENSIPS_IP:8000/xmlrpc");
>>>>> $xmlrpc->call('dlg_end_dlg', ("$hash_entry", "$hash_id") );
>>>>>
>>>>> Here is the XML sended to Opensips:
>>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>>> <methodCall>
>>>>> <methodName>dlg_end_dlg</methodName>
>>>>> <params>
>>>>>  <param>
>>>>>   <value><i4>538</i4></value>
>>>>>  </param>
>>>>>  <param>
>>>>>   <value><i4>10274470</i4></value>
>>>>>  </param>
>>>>> </params>
>>>>> </methodCall>
>>>>>
>>>>> The hash_entry and hash_id are interger.
>>>>> In this case XML is using <i4>538</i4> not a <string>538</string>.
>>>>> The mi_xmlrpc_ng is not recognised <i4>.
>>>>>
>>>>> How to fix this problem?
>>>>>
>>>>> Best regards,
>>>>> PlayMen
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> VoIP Embedded, Inc.
>>>> http://www.voipembedded.com
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>
>>
>>
>> --
>> VoIP Embedded, Inc.
>> http://www.voipembedded.com
>>
>> _______________________________________________
>> 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
>



-- 
VoIP Embedded, Inc.
http://www.voipembedded.com



More information about the Users mailing list