[OpenSIPS-Users] HTTP to SIP

Yuriy Nasida nasida at live.ru
Mon Sep 13 16:42:58 CEST 2010


Hello Remi

 

There is another way to solve your task - to not use opensips =).

Instead of use  "web server---> sip registrar (opensips)", you can use G-Boss\Glasfish with container java SIP servlets. 
This solution combines web and SIP server. Java implements all the necessary logic for message passing

Regards,
Nasida Yuriy


 


Date: Tue, 7 Sep 2010 17:53:19 +0200
From: mimiche at gmail.com
To: users at lists.opensips.org
Subject: Re: [OpenSIPS-Users] HTTP to SIP

Hi,

Thank you, this works fine, I am able to send messages from the web server and receive them in 
my SIP clients. However I have the following problem:

the xmlrpc request block until either the SIP message is sent to the client, or the request timeout
if the client is not reachable (and the sip server tried to re-send the sip request several time).

Is there a way to tell opensips to acknowledge the xmlrpc request immediatly and then to send
(and then resend if needed) the sip request to the client ?

Regards,

On Tue, Aug 3, 2010 at 12:01 AM, Bogdan-Andrei Iancu <bogdan at voice-system.ro> wrote:


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


_______________________________________________
Users mailing list
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 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100913/278e7cb2/attachment.htm 


More information about the Users mailing list