Hi,<br>
<br>
Thank you, this works fine, I am able to send messages from the web server and receive them in <br>
my SIP clients. However I have the following problem:<br>
<br>
the xmlrpc request block until either the SIP message is sent to the client, or the request timeout<br>
if the client is not reachable (and the sip server tried to re-send the sip request several time).<br>
<br>
Is there a way to tell opensips to acknowledge the xmlrpc request immediatly and then to send<br>
(and then resend if needed) the sip request to the client ?<br><br>
Regards,<br><br>On Tue, Aug 3, 2010 at 12:01 AM, Bogdan-Andrei Iancu <span dir="ltr"><<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Remi,<br>
<br>
the simplest way is to build a CGI do deal with the http part - this CGI<br>
can simply invoke via XMLRPC the t_uac_dlg command from opensips, tm<br>
module (see<br>
<a href="http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id272728" target="_blank">http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id272728</a>) - with<br>
this command you can make opensips to generate a SIP request.<br>
<br>
For how to use this IM command, see the example file locate under<br>
examples/web_im/send_im.php in SVN/tarball<br>
<br>
So basic schema:<br>
browser ---> HTTP ---> WEB server (CGI) ---->XMLRPC ----> OpenSIPs<br>
---->SIP ----> MESSAGE<br>
<div class="im"><br>
Regards,<br>
Bogdan<br>
<br>
remi humbert wrote:<br>
</div><div class="im">> Hi Bogdan,<br>
><br>
> I want to talk to Sip clients from a web browser.<br>
> Eg do:<br>
><br>
</div>> POST /<a href="mailto:toto@domain.com">toto@domain.com</a> <mailto:<a href="mailto:toto@domain.com">toto@domain.com</a>> HTTP1.1<br>
> host:<a href="http://www.somewebserver.com" target="_blank">www.somewebserver.com</a> <<a href="http://www.somewebserver.com" target="_blank">http://www.somewebserver.com</a>><br>
> hello how are u ?<br>
><br>
> And then in the sip client <a href="mailto:toto@domain.com">toto@domain.com</a> <mailto:<a href="mailto:toto@domain.com">toto@domain.com</a>><br>
> receive<br>
> SIP MESSAGE "hello how are u" from <a href="mailto:bot@domain.com">bot@domain.com</a> <mailto:<a href="mailto:bot@domain.com">bot@domain.com</a>><br>
<div class="im">><br>
> To do that, I can use CGI in my web server to host the "bot" sip clients<br>
> which will take the http message and relay it as a SIP message.<br>
><br>
> web browser ---> web server (also host "bot" sip client) ---> sip<br>
</div>> registrar ---> sip client (<a href="mailto:toto@domain.com">toto@domain.com</a> <mailto:<a href="mailto:toto@domain.com">toto@domain.com</a>>)<br>
<div class="im">><br>
> Or I could make http request directly to opensips:<br>
><br>
> web browser ---> sip registrar ---> sip client (<a href="mailto:toto@domain.com">toto@domain.com</a><br>
</div>> <mailto:<a href="mailto:toto@domain.com">toto@domain.com</a>>)<br>
<div class="im">><br>
> Perhaps it's a bad idea to try to talk http to the registrar. I just<br>
> stumbled upon this<br>
> <a href="http://www.iptel.org/rpc_xml_rpc" target="_blank">http://www.iptel.org/rpc_xml_rpc</a>, and I was wondering if I could do<br>
> the same with opensips,<br>
> since I am using opensips...<br>
><br>
> On Sun, Aug 1, 2010 at 6:22 PM, Bogdan-Andrei Iancu<br>
</div><div><div></div><div class="h5">> <<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a> <mailto:<a href="mailto:bogdan@voice-system.ro">bogdan@voice-system.ro</a>>> wrote:<br>
><br>
> Hello Remi,<br>
><br>
> If you want to receive and process an HTTP request, why do you want to<br>
> do it with a SIP server (opensips) and not with a HTTP server ? I<br>
> think<br>
> will be more suitable to you some CGI with APACHE for example, instead<br>
> of misusing opensips for that.<br>
><br>
> If you can explain me better what the HTTP request is good for, I can<br>
> give you some advices on how to do it....if it has some SIP<br>
> implications....<br>
><br>
> Regards,<br>
> Bogdan<br>
><br>
> remi humbert wrote:<br>
> > Hi,<br>
> ><br>
> > I want to be able to make http REST request to some http server, and<br>
> > transform<br>
> > these requests into SIP MESSAGE requests.<br>
> ><br>
> > I made a prototype that works using several sip clients embedded<br>
> into<br>
> > an http server. This kinda works.<br>
> > I would like to suppress the http server, and make request<br>
> directly to<br>
> > the OpenSIPS registrar.<br>
> ><br>
> > I found out about the mi_xmlrpc module, which makes opensips<br>
> > understand http, but I cannot<br>
> > find out how to get the http requests in the opensips.cfg file.<br>
> > In kamalio they seems to have some /modparam/("/xmlrpc/", "/route/",<br>
> > "XMLRPC");)<br>
> > which allows to declare a route in the config file to get the http<br>
> > request.<br>
> > I could not find the equivalent in mi_xmlrpc.<br>
> ><br>
> > So first question, does this exists in opensips, how can I get the<br>
> > http requests ?<br>
> > Second, do you think it is a good idea to do this way ? Have you got<br>
> > another idea ?<br>
> ><br>
> > Regards,<br>
> ><br>
> > --<br>
> > Remi<br>
> ><br>
> ><br>
> ------------------------------------------------------------------------<br>
> ><br>
> > _______________________________________________<br>
> > Users mailing list<br>
</div></div>> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div class="im">> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
> ><br>
><br>
><br>
> --<br>
> Bogdan-Andrei Iancu<br>
> OpenSIPS Bootcamp<br>
> 20 - 24 September 2010, Frankfurt, Germany<br>
</div>> <a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a> <<a href="http://www.voice-system.ro" target="_blank">http://www.voice-system.ro</a>><br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a> <mailto:<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>><br>
<div><div></div><div class="h5">> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Humbert Remi<br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
<br>
<br>
--<br>
Bogdan-Andrei Iancu<br>
OpenSIPS Bootcamp<br>
20 - 24 September 2010, Frankfurt, Germany<br>
<a href="http://www.voice-system.ro" target="_blank">www.voice-system.ro</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Humbert Remi<br><br>