[Devel] CVS commitlog: sip-server/modules/tm mi.c

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri Dec 15 15:54:10 CET 2006


Hi Juha, Hi Stefan,

indeed asynchronous replies was a problem from the beginning when 
implementing the XMLRPC module. For the moment there is no support for 
that in XMLRPC (only in FIFO) and I tried to find several solutions.

I agree with Stefan that the solution he suggested have some drawbacks. 
Exploiting some implementation feature of libxmlrpc-c3 library I can 
suggest another solution (of course, with its one drawbacks :) ).

libxmlrpc-c3 uses the abyss http server and it forks a new process for 
each requests - so a process processes a single requests - this would 
give us the liberty to block and wait until the TM generates the SIP 
reply in order to build the xmlrpc response. And this with no risk of 
blocking the openser or the XMLRPC server.
the draw back is that you can and with a large number of processes (from 
abyss) waiting for sending replies - this does not affect the CPU load 
as all of them will be blocked in I/O.


regards,
bogdan

Stefan Sayer wrote:

>
>
> Juha Heinanen wrote:
>
>> now that i'm able to issue t_uac_dlg requests over xml-rpc, the next
>> question is how can i get access to the reply? 
>> in fifo implementation that happened by reading the reply fifo file.
>>
>> i would assume that in xml-rpc implementation the reply would be
>> returned in the params section of xml-rpc response to t_uac_dlg, but in
>
> but then the xmlrpc call would have to wait until final response (or 
> timeout) of the request, which would not be desirable. I think using 
> xmlrpc the only ways would be that either t_uac_dlg returns a handle 
> which can be polled for the status of the request (bad - when should 
> openser forget the state which is saved for a request?), or one 
> parameter of the call would be a uri where a callback over xmlrpc 
> could be done by openser (ugly and bad aswell - this could block 
> openser).
>
> xmlrpc is not really suited for this, because of its simple 
> request-reply model which does not support anything like a callback 
> mechanism, do i see that right?
>
> Stefan
>
>> my tests the only param of the response has been empty.
>>
>> -- juha
>>
>> Received the following response:
>>
>> HTTP/1.1 200 OK
>> Content-type: text/xml; charset="utf-8"
>> Content-length: 147
>> Connection: close
>> Date: Fri, 15 Dec 2006 11:45:14 GMT
>> Server: ABYSS/0.3
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <methodResponse>
>> <params>
>> <param><value><string></string></value></param>
>> </params>
>> </methodResponse>
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/devel
>
>




More information about the Devel mailing list