Hi guys!
We have an issue with XML-RPC module.
From this doc: http://kamailio.org/docs/modules/4.3.x/modules/xmlrpc.html
"Success replies always contain at least one return value. In our case the simplest success replies contain single boolean with value 1"
We are trying to reload domain module after adding/removing new domain, so we send the following request:
XX - web server; YY - kamailio
T XX.XX.XX.XX:55028 -> YY.YY.YY.YY:8080 [AP] POST /RPC2 HTTP/1.1. Host: YY.YY.YY.YY:8080. Accept: */*. Accept-Encoding: deflate, gzip. User-Agent: cURL. Accept-Charset: UTF-8. Content-Length: 120. Content-Type: application/x-www-form-urlencoded. . <?xml version="1.0" encoding="iso-8859-1"?> <methodCall> <methodName>domain.reload</methodName> <params/> </methodCall>
T YY.YY.YY.YY:8080 -> XX.XX.XX.XX:55028 [AP] HTTP/1.1 200 OK. Sia: SIP/2.0/TCP XX.XX.XX.XX:55028. Server: kamailio (4.3.4 (x86_64/linux)). Content-Length: 108. . <?xml version="1.0"?> <methodResponse> <params> <param> <value></value> </param> </params> </methodResponse>
As you can see in the response from the kamailio there is no any data, so our script is waiting until timeout...
Please advice.
Thanks,
hello; i checked the rpc command and yes , you are right there isnt . i will add a rpc return code. it will look like if my pr is accepted.
<?xml version="1.0"?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value> <int>200</int> </value> </member> <member> <name>faultString</name> <value> <string>domain is reloaded</string> </value> </member> </struct> </value> </fault> </methodResponse>
-- View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... Sent from the Users mailing list archive at Nabble.com.
Hello,
is this correct if there was no error? The fault node should be in case of errors, not success. You should check the xmlrpc specs to be sure any chance is conform with the requirements there.
Cheers, Daniel
On 29/03/16 09:26, ycaner wrote:
hello; i checked the rpc command and yes , you are right there isnt . i will add a rpc return code. it will look like if my pr is accepted.
<?xml version="1.0"?>
<methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value> <int>200</int> </value> </member> <member> <name>faultString</name> <value> <string>domain is reloaded</string> </value> </member> </struct> </value> </fault> </methodResponse>
-- View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Daniel; there is only rpc_send method in rpc module that dont have any code and other parameters. it sends empty xml text. if it has parameters like fault function , i think it will be useful.
Cheers.
<?xml version="1.0"?> <methodResponse> <params> <param> <value></value> </param> </params> </methodResponse>
29.03.2016 10:32 tarihinde Daniel-Constantin Mierla-6 [via SIP Router] yazdı:
Hello,
is this correct if there was no error? The fault node should be in case
of errors, not success. You should check the xmlrpc specs to be sure any
chance is conform with the requirements there.
Cheers,
Daniel
On 29/03/16 09:26, ycaner wrote:
> hello;
> i checked the rpc command and yes , you are right there isnt . i will add a
> rpc return code. it will look like if my pr is accepted.
>
> <?xml version="1.0"?>
> <methodResponse>
> <fault>
> <value>
> <struct>
> <member>
> <name>faultCode</name>
> <value>
> <int>200</int>
> </value>
> </member>
> <member>
> <name>faultString</name>
> <value>
> <string>domain is reloaded</string>
> </value>
> </member>
> </struct>
> </value>
> </fault>
> </methodResponse>
>
>
>
> --
> View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... > Sent from the Users mailing list archive at Nabble.com.
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> [hidden email]
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla
http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
To unsubscribe from XML-RPC reply doesn't contain any data, click here . NAML
--
yasin-imza-2014.jpg (51K) http://sip-router.1086192.n5.nabble.com/attachment/146899/0/yasin-imza-2014.jpg
-- View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... Sent from the Users mailing list archive at Nabble.com.
Hello,
I haven't originally implemented the rpc interface in Kamailio (which we inherited via SER merge in 2008), but I expect to be some reason for this behaviour, give the code is like 10 years old by now. A fault code is a fault code, and if there was successful execution, then there was no fault.
It is why I asked to check the xmlrpc specifications, because they must say what should be done in case of a successful execution without any data to be returned.
If there is a problem with existing returned xml document, then of course needs to be fixed. But adding a fault code when the specs don't say that, it is not a fix, but breaking the specs.
Cheers, Daniel
On 29/03/16 09:54, ycaner wrote:
Hello Daniel; there is only rpc_send method in rpc module that dont have any code and other parameters. it sends empty xml text. if it has parameters like fault function , i think it will be useful.
Cheers.
<?xml version="1.0"?>
<methodResponse> <params> <param> <value></value> </param> </params> </methodResponse>
29.03.2016 10:32 tarihinde Daniel-Constantin Mierla-6 [via SIP Router] yazdı:
Hello,
is this correct if there was no error? The fault node should be in case of errors, not success. You should check the xmlrpc specs to be sure any chance is conform with the requirements there.
Cheers, Daniel
On 29/03/16 09:26, ycaner wrote:
hello; i checked the rpc command and yes , you are right there isnt . i
will add a
rpc return code. it will look like if my pr is accepted.
<?xml version="1.0"?>
<methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value> <int>200</int> </value> </member> <member> <name>faultString</name> <value> <string>domain is reloaded</string> </value> </member> </struct> </value> </fault> </methodResponse>
-- View this message in context:
http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
list
[hidden email] </user/SendEmail.jtp?type=node&node=146897&i=0> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda http://twitter.com/#%21/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [hidden email] </user/SendEmail.jtp?type=node&node=146897&i=1> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
To unsubscribe from XML-RPC reply doesn't contain any data, click here. NAML http://sip-router.1086192.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
View this message in context: Re: XML-RPC reply doesn't contain any data http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-data-tp146894p146899.html Sent from the Users mailing list archive http://sip-router.1086192.n5.nabble.com/Users-f3.html at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello; You are right. I found rpc_add function. we can add whatever we want to response xml.
Cheers
29.03.2016 11:10 tarihinde Daniel-Constantin Mierla-6 [via SIP Router] yazdı:
Hello,
I haven't originally implemented the rpc interface in Kamailio (which we inherited via SER merge in 2008), but I expect to be some reason for this behaviour, give the code is like 10 years old by now. A fault code is a fault code, and if there was successful execution, then there was no fault.
It is why I asked to check the xmlrpc specifications, because they must say what should be done in case of a successful execution without any data to be returned.
If there is a problem with existing returned xml document, then of course needs to be fixed. But adding a fault code when the specs don't say that, it is not a fix, but breaking the specs.
Cheers, Daniel
On 29/03/16 09:54, ycaner wrote:
Hello Daniel; there is only rpc_send method in rpc module that dont have any code and other parameters. it sends empty xml text. if it has parameters like fault function , i think it will be useful.
Cheers.
<?xml version="1.0"?> <methodResponse> <params> <param> <value></value> </param> </params> </methodResponse>
29.03.2016 10:32 tarihinde Daniel-Constantin Mierla-6 [via SIP Router] yazdı:
Hello,
is this correct if there was no error? The fault node should be in case of errors, not success. You should check the xmlrpc specs to be sure any chance is conform with the requirements there.
Cheers, Daniel
On 29/03/16 09:26, ycaner wrote:
> hello; > i checked the rpc command and yes , you are right there isnt . i will add a > rpc return code. it will look like if my pr is accepted. > > <?xml version="1.0"?> > <methodResponse> > <fault> > <value> > <struct> > <member> > <name>faultCode</name>
> <value> > <int>200</int> > </value> > </member> > <member> > <name>faultString</name> > <value> > <string>domain is reloaded</string> > </value> > </member> > </struct> > </value> > </fault> > </methodResponse> > > > > -- > View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... > Sent from the Users mailing list archive at Nabble.com.
> > _______________________________________________ > SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list > [hidden email] > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
To unsubscribe from XML-RPC reply doesn't contain any data, click here . NAML
--
View this message in context: Re: XML-RPC reply doesn't contain any data Sent from the Users mailing list archive at Nabble.com.
_______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [hidden email] http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
[hidden email]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
To unsubscribe from XML-RPC reply doesn't contain any data, click here . NAML
--
yasin-imza-2014.jpg (51K) http://sip-router.1086192.n5.nabble.com/attachment/146901/0/yasin-imza-2014.jpg
-- View this message in context: http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... Sent from the Users mailing list archive at Nabble.com.
Hi.
It probably also should be noted, that the current implementation works with a lot of different client implementations (we use Python for Nagios and PHP for Management (both built-in XML-RPC as well as ZendFramework's XML-RPC client)), so it cannot be that wrong.
Just my $0,02, Carsten
2016-03-29 10:10 GMT+02:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
I haven't originally implemented the rpc interface in Kamailio (which we inherited via SER merge in 2008), but I expect to be some reason for this behaviour, give the code is like 10 years old by now. A fault code is a fault code, and if there was successful execution, then there was no fault.
It is why I asked to check the xmlrpc specifications, because they must say what should be done in case of a successful execution without any data to be returned.
If there is a problem with existing returned xml document, then of course needs to be fixed. But adding a fault code when the specs don't say that, it is not a fix, but breaking the specs.
Cheers, Daniel
On 29/03/16 09:54, ycaner wrote:
Hello Daniel; there is only rpc_send method in rpc module that dont have any code and other parameters. it sends empty xml text. if it has parameters like fault function , i think it will be useful.
Cheers.
<?xml version="1.0"?>
<methodResponse> <params> <param> <value></value> </param> </params> </methodResponse>
29.03.2016 10:32 tarihinde Daniel-Constantin Mierla-6 [via SIP Router] yazdı:
Hello,
is this correct if there was no error? The fault node should be in case of errors, not success. You should check the xmlrpc specs to be sure any chance is conform with the requirements there.
Cheers, Daniel
On 29/03/16 09:26, ycaner wrote:
hello; i checked the rpc command and yes , you are right there isnt . i will
add a
rpc return code. it will look like if my pr is accepted.
<?xml version="1.0"?>
<methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value> <int>200</int> </value> </member> <member> <name>faultString</name> <value> <string>domain is reloaded</string> </value> </member> </struct> </value> </fault> </methodResponse>
-- View this message in context:
http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da...
Sent from the Users mailing list archive at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [hidden email] http:///user/SendEmail.jtp?type=node&node=146897&i=0 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla http://www.asipto.com http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.comhttp://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list [hidden email] http:///user/SendEmail.jtp?type=node&node=146897&i=1 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
If you reply to this email, your message will be added to the discussion below:
http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-da... To unsubscribe from XML-RPC reply doesn't contain any data, click here. NAML http://sip-router.1086192.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
View this message in context: Re: XML-RPC reply doesn't contain any data http://sip-router.1086192.n5.nabble.com/XML-RPC-reply-doesn-t-contain-any-data-tp146894p146899.html Sent from the Users mailing list archive http://sip-router.1086192.n5.nabble.com/Users-f3.html at Nabble.com.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierlahttp://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda Kamailio World Conference, Berlin, May 18-20, 2016 - http://www.kamailioworld.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users