There is no authentication supported there. I guess it would be relatively easy to Basic authentication if you had username/password in the proxy URI, like TPTAG_HTTP_CONNECT(" Http://user:[EMAIL PROTECTED]:8080"). Have a peek in libsofia-sip-ua/tport/tport_type_connect.c. You need to add a Proxy-Authorization header with the username and password encoded in base64 (see RFC2617 and sofia-sip-ua/ipt/sofia-sip/base64.h for details).
--Pekka 2007/10/6, chen.liang.sip <[EMAIL PROTECTED]>: > > hi,all > > I've found following message from the mail list( ), i'd like to know if > anyone has successfully used http proxy in sofia sip stack? > > I've tryed to use TPTAG_HTTP_CONNECT() tag in my program, when i filled > one string like TPTAG_HTTP_CONNECT("http://192.168.1.123:8080") into the > tag, which means no authentication, everything looks fine, and sofia sip > stack can use the http proxy connect to the internet! > > But when i filled the tag with TPTAG_HTTP_CONNECT("http://testaccount: > [EMAIL PROTECTED]:8080") , which using basic authentication, of > course i've set basic access authentication in http proxy, and i got the > log message : > > " > tport_http_connect: 407 Unauthorized > nta_agent: tport: 192.168.1.123:808: Protocol error > nta_agent: received garbage from TCP/x.x.x.x:5060/sip > " > > And i also found in maillist that sofia-sip does not support NTLM > authentication at present, so i just want to test the basic authentication > method when using http proxy > > Best regards, > Liang > > *PS*: captures from wireshark > ---------------------------- M*essage sent to http proxy* > CONNECT XXXX:5060 HTTP/1.1 > Host: XXXX:5060 > User-Agent: Sofia-SIP/1.12.6 > Proxy-Connection: keepalive > -------------------------------- R*esponse from http proxy* > HTTP/1.0 407 Unauthorized > Server: Proxy > Proxy-Authenticate: Basic realm="Proxy Authorization" > Cache-control: no-cache > -------------------------------- *message sent to http proxy* > REGISTER sip:XXX.com SIP/2.0 > Via: SIP/2.0/TCP DBDaDaacBBDaBcDc.is.invalid;branch=z9hG4bKBK32BSBBBS88S > Max-Forwards: 70 > From: <sip:[EMAIL PROTECTED]>;tag=BK32BSZmm1j8e > To: <sip:[EMAIL PROTECTED]> > Call-ID: 04287cfa-edab-122a-2680-39a48cb53b8d > CSeq: 89663657 REGISTER > Contact: <sip:[EMAIL PROTECTED]@192.168.1.42:6789 > >;+sip.instance="fd9feabd07225e286b2c3f67 > Expires: 30 > User-Agent: test UA > Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, > NOTIFY, REFER, UPDATE > Supported: timer, 100rel, path > Allow-Events: message-summary, callme, presence > Content-Length: 0 > ---------------------------------*Response from http proxy* > <Html><Body><H1> Unauthorized ...</H1></Body></Html > > > > ----------------------------------------------------------------------------------------------- > Re: Anyone knows how to use http proxy? > *Subject*: Re: Anyone knows how to use http proxy? *List-id*: < > sofia-sip-devel.lists.sourceforge.net> > > Hi, > > On Tue, 11 Jul 2006, [EMAIL PROTECTED] wrote: > > >* I want to know whether Sofia can support the http proxy, that is,* > >* use http proxy to connect to Internet.* > > this is not a very common feature in SIP stacks, but as it happens, > Sofia-SIP does support http-proxies. This is a fairly new feature though, > so not widely tested yet. > > You need to give the TPTAG_HTTP_CONNECT() tag, containing the http-proxy > URL, to nua_create(). Sofia-SIP will then use HTTP's CONNECT method to > open a TCP socket that can be used for SIP signaling toward other SIP > endpoints. > > Note that the proxy needs to support CONNECT (RFC2817), and allow > connections to the SIP port (5060). Many http-proxies are configured to > only allow connections to ports 80 and 443. Of course, you could set up a > SIP server listening on port 443... :) > > " > ------------------------------ > 2007-10-05 > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Sofia-sip-devel mailing list > Sofia-sip-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel > > -- Pekka.Pessi mail at nokia.com
<<14.gif>>
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel