[OpenSIPS-Users] mi_xmlrpc and dlg_list

Carlos Oliva carlos.oliva at numintec.com
Tue Oct 13 08:25:47 CEST 2015


Hi Mike!

I don't know exactly why but xmlrpc_encode_request must have a parameter as
second argument. try something like that:

<?php

$ip="X.X.X.X";

$params[] = " ";

$method = "ul_dump";
//$method = "dlg_list";
$request = xmlrpc_encode_request($method,$params);

$context = stream_context_create(array('http' => array(
           'method' => "POST",
              'header' => "Content-Type: text/xml",
                 'content' => $request
         )));
$file = file_get_contents("http://$ip:8000/RPC2", false, $context);
$response = xmlrpc_decode($file);
print $response;
?>


Please take note that mi_xmlrpc module needs a very old libxmlrpc-c3
version (between 1.03.10 and 1.06.42 you can check yours with
xmlrpc-c-config --version) You can use mi_xmlrpcng module instead.

Regards,

Carlos Oliva














* _________________________________________________ Carlos
OlivaDepartamento de Sistemas C/ Pujades, 77-79, 8a Planta 9B | 08005
Barcelona www.numintec.com <http://www.numintec.com/> |
carlos.oliva at numintec.com <carlos.oliva at numintec.com> | T: 902 02 02 97
_________________________________________________ Talking Numintec:
Dialogando con empresarios de éxito <http://www.youtube.com/user/numintec>
<http://www.youtube.com/user/numintec> Las soluciones en la nube de
Numintec - Casos de éxito <http://www.numintec.com/category/caso-de-exito/>
<http://www.numintec.com/category/caso-de-exito/> Solicita una demo
<http://www.numintec.com/demo/>
_________________________________________________ Medio Ambiente: Antes de
imprimir este mensaje, asegúrese de que es necesario. Nota Legal: La
información contenida en la presente transmisión es confidencial y su uso
únicamente está permitido a su(s) destinatario(s). Le informamos que los
datos personales que facilite/ha facilitado pasarán/han pasado a formar
parte de un fichero responsabilidad de NUMINTEC COMUNICACIONES S.L.. y que
tiene por finalidad gestionar las relaciones. Tiene la posibilidad de
ejercitar los derechos de acceso, rectificación, cancelación y oposición
respecto a sus datos ante la empresa, en el e-mail
comunicacion at numintec.com <comunicacion at numintec.com>  o bien en el
 domicilio sito en C/ Pujades, 77-79 8ª Planta 9-B 08005 de Barcelona.*

2015-10-09 14:21 GMT+02:00 Mike Tesliuk <mike at brdsoft.com.br>:

> Hello everybody,
>
>
> Im trying some tests on an opensips 1.11 [ (1.11.3-notls (x86_64/linux)) ]
> using mi_xmlrpc, when i try to call the dlg_list command i get the message
> below
>
> <?xml version="1.0" encoding="UTF-8"?>
> <methodResponse>
> <fault>
> <value><struct>
> <member><name>faultCode</name>
> <value><i4>-500</i4></value></member>
> <member><name>faultString</name>
> <value><string>The xmlrpc request could not be parsed into a MI
> tree!</string></value></member>
> </struct></value>
> </fault>
> </methodResponse>
>
>
> My script is very simple, on the first moment just to check how i can
> receive the return to be parsed
>
> $request = xmlrpc_encode_request("dlg_list","");
>
>
> $context = stream_context_create(array('http' => array(
>             'method' => "POST",
>                 'header' => "Content-Type: text/xml",
>                     'content' => $request
>             )));
> $file = file_get_contents("http://127.0.0.1:8000/RPC2", false, $context);
>
> print $file;
> die();
>
>
> Im able to use other commands like which, get_statistics but not the
> dlg_list, is that expected ?
>
> Thank you
>
> _______________________________________________
> 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/20151013/358950e4/attachment-0001.htm>


More information about the Users mailing list