<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hello Remi<BR>
<BR>
There is another way to solve your task - to not use opensips =).<BR>
Instead of use "web server---> sip registrar (opensips)", you can use G-Boss\Glasfish with container java SIP servlets. <BR>This solution combines web and SIP server. Java implements all the necessary logic for message passing<BR><BR>Regards,<BR>Nasida Yuriy<BR><BR><BR> <BR>
<HR id=stopSpelling>
Date: Tue, 7 Sep 2010 17:53:19 +0200<BR>From: mimiche@gmail.com<BR>To: users@lists.opensips.org<BR>Subject: Re: [OpenSIPS-Users] HTTP to SIP<BR><BR>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=ecxgmail_quote>
<BLOCKQUOTE style="PADDING-LEFT: 1ex" class=ecxgmail_quote>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=ecxim><BR>Regards,<BR>Bogdan<BR><BR>remi humbert wrote:<BR></DIV>
<DIV class=ecxim>> 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=ecxim>><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=ecxim>><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=ecxim>><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=ecxim>> > <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><BR>_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users                                            </body>
</html>