partysip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Partysip-dev] Almost-infinite message loop for Invite


From: Aymeric Moizard
Subject: Re: [Partysip-dev] Almost-infinite message loop for Invite
Date: Wed, 29 Jan 2003 12:39:25 +0100 (CET)


On Tue, 28 Jan 2003, Gary Corcoran wrote:

>
> Aymeric Moizard wrote:
> >
> > I should have looked better at your log file. I'm too used
> > that users always face this error and I missed yours which
> > is slighlty different.
> >
> > Your UA register this contact address:
> > Contact: LittleGuy <sip:address@hidden>;expires=36000
> >
> > When the INVITE is sent, the address is searched in the
> > local database and this sip url is found. But this one
> > was a bad one. The UA should have sent his real ip
> > address in the contact header instead of the host: "gary.net"
>
> Okay, if that's the way it has to be for now, that's fine.
> And, woohoo! - it works!  Well, at least the Invite now goes
> to my other phone, and the Ringing and OK get forwarded
> from the proxy, so now I can start debugging.  ;-)
>
> > The REGISTER message is thus not compliant.
>
> Just as a point of discussion, so I can learn more about SIP:
> The registration with the @gary.net in the contact *should*
> be allowed, right?

Not at all! You have to give your real locations.

>  Or should it be @ endpointname.gary.net ?

You got it.

> That is, where endpointname has it's own A record in DNS
> with the unique IP address of the phone ?  Would that work
> with the current partysip code?  If not:
>
> As I started trying to figure out some of the code, it looks
> to me as if part of the solution is to have the
> cb_ls_sfull_search_location(), after the check
> if(0 == psp_core_is_responsible_for_this_request_uri() )
> switch to UAS_MODE, so the Invite gets handled locally,
> instead of being passed to sfp which wants to 'forward'
> it to another server (which is what it's doing by default
> now).

No fix is required. partysip is already doing the correct job. If the
ls_sfull plugin find that the request-uri target to himeself, he will not
process the request and the ls_localdb plugin will be called after and
find the local registration (contact header of REGISTER saved during
registration) if any exist.

As said before, the only fix I should make is to verify that the
url that have been found is not again pointing to myself thus
avoiding the loop you have run into. This action should be done
in sfp.c at the time when the new request to forward is built.
The only action to take is to delete the location before building
the message and if no other locations exists, reply with the
correct error code. You don't need to switch to the uas mode
as this could be done in sfp.

I should have refused your initial registration by doing the same
check!

>  But I don't know enough about how it all works to
> offer a complete fix.  Does this make any sense, or am I
> trying to jump in too soon?  :)
>
> > I should write some code to avoid such attacks :)
>
> ;-)
>
> Thanks,
> Gary
>
>
> _______________________________________________
> Partysip-dev mailing list
> address@hidden
> http://mail.nongnu.org/mailman/listinfo/partysip-dev
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]