< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index  

Re: [reSIProcate] SipMessage::isExternal() == true on a locally generated failure


Thanks a lot Scott, this is exactly what I was looking for.

Cheers,
Francis

On Tue, Nov 16, 2010 at 11:33 AM, Scott Godin <sgodin@xxxxxxxxxxxxxxx> wrote:

Yeah – I’ve noticed that – however I’m hesitant to change the way isExternal is used today, as I know it will modify the behaviour of the stack.  So far I have conceded that the fn name isExternal is poorly chosen.  


However, there is another way to tell if the message is really external or not.  Use the method getReceivedTransport() on SipMessage.  It will be set to a transport pointer if the message was received from the wire, or 0 (NULL) for internally generated messages (ie. getReceivedTransport() != 0   <- message is from wire).


Scott


On Tue, Nov 16, 2010 at 11:03 AM, Francis Joanis <francis.joanis@xxxxxxxxx> wrote:
Hi guys,

(resip 1.6)

In the following scenario:

- Send message (OPTIONS, ...) to a invalid UDP URI
- Timer F expires
- SIP stack sends 408 Request Timeout to DUM (Transaction User)

I'm seeing that the message that gets sent to the DUM has isExternal() == true, even though it was locally generated.

It gets set into Helper::makeResponse because the supplied request (the outgoing OPTIONS) has isExternal() == false:

   if (request.isExternal())
   {
       response.setFromTU();
   }
   else
   {
       response.setFromExternal();
   }

In this case, I was expecting isExternal() == false since the response didn't come from the wire.

The problem I'm trying to solve is discerning between true locally generated message (failures + successes) and true remotely generated ones.

Does this make sense :) ?

Thanks,
Francis



_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel