Hi!
This patch works just fine:Oct 22 15:50:35 fs sems[17413]: [#b73a8b90] 
[onSipReply, UACAuth.cpp:176] DEBUG: updated remote URI to 
'sip:[email protected]:5060'
Thank you for your help.
Maybe it could be made a configurable, default false, option for others?
Br,/Tobias
> Date: Fri, 22 Oct 2010 13:39:33 +0200
> From: [email protected]
> To: [email protected]
> CC: [email protected]; [email protected]
> Subject: Re: [Sems] Regarding SEMS and SRV records
> 
> Tobias Lindgren wrote:
> > Hi Stefan,
> > 
> > I'm really new to SEMS (just started using it a couple of days ago). How 
> > would I go about to force auth_b2b to send it's next request to the 
> > source IP of the first reply as you describe?
> if you update master or cherry-pick 47250b8, you can apply this:
> 
> diff --git a/core/plug-in/uac_auth/UACAuth.cpp 
> b/core/plug-in/uac_auth/UACAuth.cpp
> index e9fb675..b3c5400 100644
> --- a/core/plug-in/uac_auth/UACAuth.cpp
> +++ b/core/plug-in/uac_auth/UACAuth.cpp
> @@ -167,6 +167,15 @@ bool UACAuth::onSipReply(const AmSipReply& reply, 
> int old_dlg_status, const stri
>                // reset remote tag so remote party
>                // thinks its new dlg
>                dlg->remote_tag = "";
> +
> +             // update remote URI to resolved IP
> +             size_t hpos = dlg->remote_uri.find("@");
> +             if (hpos != string::npos && reply.remote_ip.length()) {
> +               dlg->remote_uri = dlg->remote_uri.substr(0, hpos+1) +
> +                 reply.remote_ip + ":"+int2str(reply.remote_port);
> +               DBG("updated remote URI to '%s'\n", 
> dlg->remote_uri.c_str());
> +             }
> +
>              }
>              // resend request
>              if (dlg->sendRequest(ri->second.method,
> 
> I'm not sure whether it should be there by default; actually I think 
> that its a special case for your (broken) server, which should not be 
> made the default. Or what do others think?
> 
> Stefan
> 
> > 
> > Br,
> > /Tobias
> > 
> >  > Date: Fri, 22 Oct 2010 10:41:13 +0200
> >  > From: [email protected]
> >  > To: [email protected]
> >  > CC: [email protected]; [email protected]
> >  > Subject: Re: [Sems] Regarding SEMS and SRV records
> >  >
> >  > Tobias Lindgren wrote:
> >  > > Unfortainly it's the same result.
> >  > if you don't get it working at all, also not with sending the request
> >  > to the same proxy by setting remote-uri to the source IP of the reply,
> >  > you can just try resending until it works...
> >  >
> >  > diff --git a/core/plug-in/uac_auth/UACAuth.cpp
> >  > b/core/plug-in/uac_auth/UACAuth.cpp
> >  > index 97d4911..a3ab84f 100644
> >  > --- a/core/plug-in/uac_auth/UACAuth.cpp
> >  > +++ b/core/plug-in/uac_auth/UACAuth.cpp
> >  > @@ -105,7 +105,8 @@ UACAuth::UACAuth(AmSipDialog* dlg,
> >  > UACAuthCred* cred)
> >  > : dlg(dlg),
> >  > credential(cred),
> >  > - AmSessionEventHandler()
> >  > + AmSessionEventHandler(),
> >  > + retries(0)
> >  > {
> >  > }
> >  >
> >  > @@ -132,7 +133,7 @@ bool UACAuth::onSipReply(const AmSipReply& reply,
> >  > AmSipDialog::Status old_dlg_st
> >  >
> >  > std::map<unsigned int, SIPRequestInfo >::iterator ri =
> >  > sent_requests.find(reply.cseq);
> >  > - if (ri!= sent_requests.end())
> >  > + if (ri!= sent_requests.end() || ++retries < 10)
> >  > {
> >  > DBG(" UACAuth - processing with reply code %d \n", reply.code);
> >  > // DBG("realm %s user %s pwd %s ----------------\n",
> >  > diff --git a/core/plug-in/uac_auth/UACAuth.h
> >  > b/core/plug-in/uac_auth/UACAuth.h
> >  > index e6f07cf..863778d 100644
> >  > --- a/core/plug-in/uac_auth/UACAuth.h
> >  > +++ b/core/plug-in/uac_auth/UACAuth.h
> >  > @@ -104,6 +104,7 @@ class UACAuth : public AmSessionEventHandler
> >  >
> >  > UACAuthCred* credential;
> >  > AmSipDialog* dlg;
> >  > + unsigned int retries;
> >  >
> >  > std::string find_attribute(const std::string& name, const
> >  > std::string& header);
> >  > bool parse_header(const std::string& auth_hdr,
> >  > UACAuthDigestChallenge& challenge);
> >  >
> >  >
> 
> 
> -- 
> Stefan Sayer
> VoIP Services Consulting and Development
> 
> Warschauer Str. 24
> 10243 Berlin
> 
> tel:+491621366449
> sip:[email protected]
> email/xmpp:[email protected]
> 
> 
                                          
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems

Reply via email to