<p style="white-space: pre-wrap; word-wrap: break-word;">This would also need an addition to the CHANGES file[1].</p><p style="white-space: pre-wrap; word-wrap: break-word;">[1] https://wiki.asterisk.org/wiki/display/AST/CHANGES+and+UPGRADE.txt</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13501">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13501/3//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/13501/3//COMMIT_MSG@7">Patch Set #3, Line 7:</a> <code style="font-family:monospace,monospace">A dialplan function to change endpoint's flag on a session</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It's not just changing flags but any endpoint configurable option.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c">File channels/pjsip/dialplan_functions.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c@1332">Patch Set #3, Line 1332:</a> <code style="font-family:monospace,monospace">int pjsip_session_endpoint_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The threading for this is not correct. You must push it to the serializer like is done for the other dialplan functions and execute it there.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c@1365">Patch Set #3, Line 1365:</a> <code style="font-family:monospace,monospace">    if (ast_sorcery_objectset_apply(ast_sip_get_sorcery(), endpoint, objset)) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">The endpoint is immutable. It can not be altered here without repercussions. You must use ast_sorcery_copy to make a copy like I mentioned previously, and then change the endpoint on the session to that. You can then modify the endpoint since nothing else would be using it.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13501">change 13501</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13501"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I600d5ac1c6c2b47a7a0da6425aea559f1aa61c7c </div>
<div style="display:none"> Gerrit-Change-Number: 13501 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Salah Ahmed <txrubel@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 04 Jan 2020 11:02:12 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>