[OpenSIPS-Users] HTTP to SIP
Bogdan-Andrei Iancu
bogdan at voice-system.ro
Tue Aug 3 00:01:37 CEST 2010
Hi Remi,
the simplest way is to build a CGI do deal with the http part - this CGI
can simply invoke via XMLRPC the t_uac_dlg command from opensips, tm
module (see
http://www.opensips.org/html/docs/modules/1.6.x/tm.html#id272728) - with
this command you can make opensips to generate a SIP request.
For how to use this IM command, see the example file locate under
examples/web_im/send_im.php in SVN/tarball
So basic schema:
browser ---> HTTP ---> WEB server (CGI) ---->XMLRPC ----> OpenSIPs
---->SIP ----> MESSAGE
Regards,
Bogdan
remi humbert wrote:
> Hi Bogdan,
>
> I want to talk to Sip clients from a web browser.
> Eg do:
>
> POST /toto at domain.com <mailto:toto at domain.com> HTTP1.1
> host:www.somewebserver.com <http://www.somewebserver.com>
> hello how are u ?
>
> And then in the sip client toto at domain.com <mailto:toto at domain.com>
> receive
> SIP MESSAGE "hello how are u" from bot at domain.com <mailto:bot at domain.com>
>
> To do that, I can use CGI in my web server to host the "bot" sip clients
> which will take the http message and relay it as a SIP message.
>
> web browser ---> web server (also host "bot" sip client) ---> sip
> registrar ---> sip client (toto at domain.com <mailto:toto at domain.com>)
>
> Or I could make http request directly to opensips:
>
> web browser ---> sip registrar ---> sip client (toto at domain.com
> <mailto:toto at domain.com>)
>
> Perhaps it's a bad idea to try to talk http to the registrar. I just
> stumbled upon this
> http://www.iptel.org/rpc_xml_rpc, and I was wondering if I could do
> the same with opensips,
> since I am using opensips...
>
> On Sun, Aug 1, 2010 at 6:22 PM, Bogdan-Andrei Iancu
> <bogdan at voice-system.ro <mailto:bogdan at voice-system.ro>> wrote:
>
> Hello Remi,
>
> If you want to receive and process an HTTP request, why do you want to
> do it with a SIP server (opensips) and not with a HTTP server ? I
> think
> will be more suitable to you some CGI with APACHE for example, instead
> of misusing opensips for that.
>
> If you can explain me better what the HTTP request is good for, I can
> give you some advices on how to do it....if it has some SIP
> implications....
>
> Regards,
> Bogdan
>
> remi humbert wrote:
> > Hi,
> >
> > I want to be able to make http REST request to some http server, and
> > transform
> > these requests into SIP MESSAGE requests.
> >
> > I made a prototype that works using several sip clients embedded
> into
> > an http server. This kinda works.
> > I would like to suppress the http server, and make request
> directly to
> > the OpenSIPS registrar.
> >
> > I found out about the mi_xmlrpc module, which makes opensips
> > understand http, but I cannot
> > find out how to get the http requests in the opensips.cfg file.
> > In kamalio they seems to have some /modparam/("/xmlrpc/", "/route/",
> > "XMLRPC");)
> > which allows to declare a route in the config file to get the http
> > request.
> > I could not find the equivalent in mi_xmlrpc.
> >
> > So first question, does this exists in opensips, how can I get the
> > http requests ?
> > Second, do you think it is a good idea to do this way ? Have you got
> > another idea ?
> >
> > Regards,
> >
> > --
> > Remi
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
> >
>
>
> --
> Bogdan-Andrei Iancu
> OpenSIPS Bootcamp
> 20 - 24 September 2010, Frankfurt, Germany
> www.voice-system.ro <http://www.voice-system.ro>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org <mailto:Users at lists.opensips.org>
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> --
> Humbert Remi
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro
More information about the Users
mailing list