[OpenSIPS-Devel] [ opensips-Patches-3553765 ] create_dialog() - Clear flags before setting new ones

SourceForge.net noreply at sourceforge.net
Thu Aug 2 22:44:26 CEST 2012


Patches item #3553765, was opened at 2012-08-02 13:44
Message generated for change (Tracker Item Submitted) made by rrb3942
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3553765&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ryan Bullock (rrb3942)
Assigned to: Nobody/Anonymous (nobody)
Summary: create_dialog() - Clear flags before setting new ones

Initial Comment:
Currently, if a dialog has already been created, calling create_dialog() with parameters appends the passed flags to the current dialogs flags. This means there is no way to remove a flag after is has been set.

Example:

#Pings callee and sends BYE on timeout
create_dialog("Bp");
#Will still ping callee
create_dialog("B");
#Will now ping caller, callee, and send BYE on timeout
create_dialog("P");

This patch causes create_dialog(), when called with a parameter, to first clear the currently set flags before applying the new flags passed in the function.

Example:

#Pings callee and sends BYE on timeout
create_dialog("Bp");
#No longer pings callee, just sends BYE on timeout
create_dialog("B");
#Just pings caller, does not send BYE on timeout
create_dialog("P");

#Ping caller, callee, and send BYE on timeout
create_dialog("pPB");
#Clears flags, no pings, no BYE on timeout
create_dialog("");

#Makes no changes to flags
create_dialog();

The biggest use case for this is the ability to control pinging the callee when hunting through multiple endpoints that may have varying support for In-Dialog OPTIONS.


Thanks.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3553765&group_id=232389



More information about the Devel mailing list