[Asterisk-code-review] A dialplan function to change endpoint's flag on a session (asterisk[13])

Joshua Colp asteriskteam at digium.com
Sat Jan 4 05:02:12 CST 2020


Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/13501 )

Change subject: A dialplan function to change endpoint's flag on a session
......................................................................


Patch Set 3:

(3 comments)

This would also need an addition to the CHANGES file[1].

[1] https://wiki.asterisk.org/wiki/display/AST/CHANGES+and+UPGRADE.txt

https://gerrit.asterisk.org/c/asterisk/+/13501/3//COMMIT_MSG 
Commit Message:

https://gerrit.asterisk.org/c/asterisk/+/13501/3//COMMIT_MSG@7 
PS3, Line 7: A dialplan function to change endpoint's flag on a session
It's not just changing flags but any endpoint configurable option.


https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c 
File channels/pjsip/dialplan_functions.c:

https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c@1332 
PS3, Line 1332: int pjsip_session_endpoint_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
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.


https://gerrit.asterisk.org/c/asterisk/+/13501/3/channels/pjsip/dialplan_functions.c@1365 
PS3, Line 1365: 	if (ast_sorcery_objectset_apply(ast_sip_get_sorcery(), endpoint, objset)) {
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.



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13501
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I600d5ac1c6c2b47a7a0da6425aea559f1aa61c7c
Gerrit-Change-Number: 13501
Gerrit-PatchSet: 3
Gerrit-Owner: Salah Ahmed <txrubel at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Comment-Date: Sat, 04 Jan 2020 11:02:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200104/ea7db9d4/attachment.html>


More information about the asterisk-code-review mailing list