Hi Brian, [email protected] wrote: > Hello Anca, > > An ven., janv 29, 2010, Anca Vamanu schrieb: > >> [email protected] wrote: >> >>> An lun., janv 04, 2010, Anca Vamanu schrieb: >>> >>>> I see that you say that the prepaid scenario does not work for you. >>>> What version are you testing with? >>>> >>>> >>> Solaris 11 x86 (nv-b91) >>> OpenSIPS 1.6.0 with TLS >>> >>> I've copied the example 'prepaid.xml' word for word from the URL: >>> >>> http://www.opensips.org/Resources/B2buaTutorial16 >>> >>> Here are the relevant parts of the route script: >>> >>> listen = udp:name.host.tld:5060 >>> listen = tls:name.host.tld:5061 >>> >>> modparam("tm", "pass_provisional_replies", 1) >>> modparam("b2b_entities", "server_address", "sip:[email protected]") >>> modparam("b2b_logic", "script_scenario", >>> "/pfx/etc/opensips/b2bua/prepaid.xml") >>> >>> if (has_totag()) { >>> if (loose_route()) { >>> # code here >>> } >>> } >>> >>> if (!is_method("REGISTER|MESSAGE")) { >>> record_route(); >>> } >>> >>> if (is_method("INVITE") && src_ip != myself) { # Start of B2BUA >>> if (!t_newtran()) { # logic block, do >>> sl_reply_error(); # media announcements >>> exit; # to users >>> } >>> b2b_init_request("prepaid", "sip:[email protected]:5080", >>> "sip:[email protected]:5080"); >>> exit; >>> } >>> >>> if (src_ip != myself) { >>> if ($hdr(P-hint) != "outbound") { >>> append_hf("P-hint: outbound\r\n"); >>> } >>> } >>> >>> Does that look like it should work? Is 't_newtran' necessary? >>> >>> >> t_newtran is necessary because b2b should not handle retransmissions. >> And yes, the configuration file seems correct and should work. If it >> doesn't, try to find the exact problem. Check if there are errors in >> opensips log and watch the network traffic. >> >> > I've changed the parameters to: > > b2b_init_request("prepaid", > "sip:[email protected]:5080;transport=tcp", > "sip:[email protected]:5080;transport=tcp"); > > ...because name.host.tld is listening on TCP port 5080. Before, > the B2BUA modules were sending over TLS, which is how the original > INVITE from the UAC is sent. Is there a better way to tell the B2BUA > modules to use TCP rather than another transport? > > No, unfortunately there is no other way to tell b2b to use other protocol.
> My main question now, is that the host name.host.tld is getting the > message, but challenging the B2BUA logic with a WWW-Authenticate 401 > message. This gets passed implicitly back to the UAC which sent the > INVITE, however it seems that the B2BUA modules strip the WWW- > Authenticate header so that the UAC only sees a 'sanitized' > 401 SIP message and cannot authenticate. > > How can I adjust the prepaid scenario to accommodate 401 challenges? > > If you use the trunk svn branch, you have a parameter in b2b_logic module - "custom_headers". You can set it to "WWW-Authenticate, Authorization" and the content of these headers will be passed on the other side. > Regards, > Brian > > Regards, -- Anca Vamanu www.voice-system.ro _______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
