[SR-Users] Can this be done with xhttp module (3.1 devel)?

Iñaki Baz Castillo ibc at aliax.net
Sat Oct 2 12:53:24 CEST 2010


2010/10/2 Sergey Okhapkin <sos at sokhapkin.dyndns.org>:
>  t_uac_dlg returns final response to the initiated request. I don't know if it
> really waits for the response or uses some kind of async callback.

I suppose it works as follows:

- t_uac_dlg is invoked.
- Kamailio MI process receives the MI request and creates an outgoing
transaction for sending the desired SIP request. It also creates a
callback to be executed when a response is received within this
transaction (I expect).
- After sending the request the worker process gets free again
(important) and can process other requests.
- When a response arrives the callback is executed and the MI worker
can then send the MI response informing about the response code.

This is not problematic. However what the initiator of this threads
look for *is* terrible problematic. Alex already explained it but I'd
would like to insist on it:

- An HTTP request arrives to a kamailio worker (let's name it "worker_1").
- worker_1 generates a SIP request.
- Now worker_1 MUST wait until the SIP response in order to create the
HTTP response.

This is terrible because worker_1 gets blocked until the HTTP response
arrives (what about if it never arrives?).


If HTTP requests would create a "transaction" (saved in shared memory)
then perhaps this could work but... what do we want
kamaialio/sip-router to be? :)




-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the sr-users mailing list