[reSIProcate] (DUM) Question about having user-specified end reasons

Scott Godin sgodin at sipspectrum.com
Tue Mar 8 08:23:03 CST 2011


Looks good to me - thanks Francis!

On Tue, Mar 8, 2011 at 8:18 AM, Francis Joanis <francis.joanis at gmail.com>wrote:

> Hi again,
>
> I have prepared a change that enables user-specific reasons but I haven't
> submitted it yet. Here's a description:
>
> - Added a UserSpecified element to the EndReasons enum in InviteSession.hxx
> - Added a member "Data mUserEndReason" to InviteSession
> - Added a "void end(const Data& userReason)" to InviteSession,
> ClientInviteSession and ServerInviteSession
> - Made getEndReasonString a member of InviteSession rather than a global
> function (so that it can access mUserEndReason)
> - Modified getEndReasonString so that it returns mUserEndReason when reason
> == UserSpecified
>
> Whenever *InviteSession::end("my reason") is called, it sets up
> mUserEndReason then calls *InviteSession::end(UserSpecified).
>
> I've also attached a diff of the changes to this email.
>
> Please feel free to comment, I'm planning on committing this tomorrow
> unless modifications are required.
>
> Cheers,
> Francis
>
> On Wed, Mar 2, 2011 at 1:34 PM, Francis Joanis <francis.joanis at gmail.com>wrote:
>
>> Hi,
>>
>> Thanks for the quick replies guys :).
>>
>> I'm thinking it would make sense to have the API support it. I'll give it
>> some more thoughts but we could have a UserDefined reason in the enum that
>> would end up using a dedicated user string rather than the compiled-in ones.
>>
>> The workaround is a good one since it doesn't get too much in the way
>> (code wise), but it ends up eating a little more CPU cycles on all
>> INVITE-related outgoing messages (which I would like to avoid).
>>
>> Regards,
>> Francis
>>
>> On Wed, Mar 2, 2011 at 1:22 PM, Aron Rosenberg <arosenberg at logitech.com>wrote:
>>
>>> virtual void onReadyToSend(resip::InviteSessionHandle ish,
>>> resip::SipMessage &m)
>>> {
>>> if(m.header(h_RequestLine).getMethod()==resip::BYE))
>>>  m.header(h_Reasons).push_back("blahblah");
>>> }
>>>
>>>
>>> On Wed, Mar 2, 2011 at 9:49 AM, Francis Joanis <francis.joanis at gmail.com
>>> > wrote:
>>>
>>>> Hi again,
>>>>
>>>> Is there a way in DUM to have a user-specified reason when ending an
>>>> InviteSession? It looks like all the reasons have to be hard defined in the
>>>> code (EndReasons).
>>>>
>>>> Thanks a lot,
>>>> Francis
>>>>
>>>> _______________________________________________
>>>> resiprocate-devel mailing list
>>>> resiprocate-devel at resiprocate.org
>>>> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>>>>
>>>
>>>
>>
>
> _______________________________________________
> 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/20110308/2a5b954d/attachment.htm>


More information about the resiprocate-devel mailing list