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

Francis Joanis francis.joanis at gmail.com
Tue Nov 16 16:53:42 CST 2010


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 at sipspectrum.com>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 at gmail.com
> > 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 at resiprocate.org
>> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20101116/86b6ac27/attachment.htm>


More information about the resiprocate-devel mailing list