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@xxxxxxxxx> 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@xxxxxxxxxxxx> 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");
}
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@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel