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

[reSIProcate] Add OutboundDecorator to AppDialogSet and header Reason


Hello,
I need to add an outbound decorator on per call basis and I would prefer
if it could be possible to avoid the use of unique profile for each call
(like suggested in
<http://list.resiprocate.org/archive/resiprocate-devel/msg07342.html>),
in fact I use another outbound decorator set in MasterProfile that is
called for each outgoing message, not only invite sessions.
I thought to add methods to set outbound decorator in DialogSet through
AppDialogSet and then retrieve that in DialogUsageManager::send(). This
outbound decorator would be added between UserProfile and ClientAuth
decorators.
I attached a patch file to this mail to show my idea. I would appreciate
any comments/suggestions.

Moreover, I have a question related to header Reason.
In InviteSession::sendBye() header Reason is forced to use description
parameter, but in my opinion this is not compliant with RFC 3326
(section 2), in fact an example found in RFC is:
   Reason: SIP ;cause=200 ;text="Call completed elsewhere"

In my opinion InviteSession::sendBye() should contain something like:
   if (mEndReason != NotSpecified)
      Token reason(getEndReasonString(mEndReason));
      bye->header(h_Reasons).push_back(reason);
   }

Moreover it seems to me that the only way to add Reason header to CANCEL
request is an outbound decorator, because Helper::makeCancel() is
invoked in DialogSet::end() which then invokes
DialogUsageManager::send().
What are your opinions about that?

Thank you,
Dario

Attachment: AppDialogSetOutboundDecorator.zip
Description: AppDialogSetOutboundDecorator.zip