[Asterisk-code-review] res_aeap & res_speech_aeap: Add Asterisk External Application Protocol (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Jan 12 08:08:15 CST 2022


Attention is currently required from: Kevin Harwell.
Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/17330 )

Change subject: res_aeap & res_speech_aeap: Add Asterisk External Application Protocol
......................................................................


Patch Set 3: Code-Review-1

(20 comments)

File include/asterisk/res_aeap.h:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/310a4aab_b24cf5ea 
PS3, Line 33: 
These should have \since added, along with other header files


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/cb4bd493_996cd623 
PS3, Line 218:  */
Should these connect calls include timeouts?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/d96a9d09_faa13e90 
PS3, Line 252: int ast_aeap_disconnect(struct ast_aeap *aeap);
Does this block until disconnect occurs?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/6ab8919d_7ca2da9e 
PS3, Line 322: 	ast_aeap_on_timeout on_timeout;
Is this required or optional?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/efb2b54d_c09525d6 
PS3, Line 326: 	void *obj;
Specify how lifetime of this is managed, who is responsible


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/02f22519_de9be3e4 
PS3, Line 342:  * \param params Additional parameters to consider when sending (optional)
Specify whether this is to be allocated or not.


File include/asterisk/res_aeap_message.h:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/5f778484_75af3251 
PS3, Line 36: 	/*! The size of this type */
This needs further explanation for what this means and what it does.


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/3f010534_c0405076 
PS3, Line 201:  * \brief Create an Asterisk external application error message from a given message.
This doesn't seem to be creating things from a message, and is it actually for creating just an error message?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/42bedd10_7ef1a912 
PS3, Line 219:  * \brief Create an Asterisk external application request object, and generate an id for it
This optionally generates an id.


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/5fb5a59e_2dd6bf96 
PS3, Line 298: int ast_aeap_message_id_generate(struct ast_aeap_message *message);
Would it be useful for this to return the generated id, as part of this call?


File res/res_aeap.c:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/88b1e4eb_15c1a1f9 
PS3, Line 35: 			<configObject name="server">
Ah, the joy of perception. Previously it was configuring the details for a remote server. Now it is configuring the details for the local client.


File res/res_aeap/aeap.c:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/99af0ba5_84f4e1ff 
PS3, Line 57: 	ast_mutex_t lock;
Is there a need for an additional lock alongside the ao2 one?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/ea64d1b1_75809e85 
PS3, Line 125: 	data = ao2_alloc(sizeof(*data) + strlen(id) + 1, cleanup);
Does this need to be allocated with a lock?


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/73535557_30246133 
PS3, Line 174: 	obj = data->obj;
What is the lifetime guarantee of the returned obj? Is there any? Should special care be taken by the caller?


File res/res_aeap/message.c:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/527abcae_fe361dd8 
PS3, Line 47: 	msg = ao2_alloc(type->type_size, message_destructor);
Does this need to be allocated with a lock?


File res/res_aeap/transaction.h:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/f535f626_2e83cfaf 
PS3, Line 81: void aeap_transaction_end(struct aeap_transaction *tsx, int result);
What does result mean? What are the possible values for result? Applies to the next function too.


File res/res_aeap/transaction.c:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/2a6a06e8_14fac140 
PS3, Line 245: 	if (!ao2_link(transactions, tsx)) {
This creates a circular reference, how is it broken/taken care of/not applicable?


File res/res_aeap/transport.h:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/bb7c72be_79379115 
PS3, Line 181:  * \returns Total number of bytes read, or less than zero on error
Document whether this is blocking/non-blocking.


File res/res_speech_aeap.c:

https://gerrit.asterisk.org/c/asterisk/+/17330/comment/4f339ed2_402aa032 
PS3, Line 495: 	speech_engine_create_and_register(ast_sorcery_object_get_id(obj), NULL,
codec_names is always going to be NULL


https://gerrit.asterisk.org/c/asterisk/+/17330/comment/db7db4c4_25a5ac5b 
PS3, Line 530: 	if (ast_aeap_client_config_observer_add(&speech_observer)) {
Add a comment explaining what this is doing



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Iaa4b259f84aa63501e5fd2a6fb107f900b4d4ed2
Gerrit-Change-Number: 17330
Gerrit-PatchSet: 3
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Wed, 12 Jan 2022 14:08:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220112/32898ed9/attachment.html>


More information about the asterisk-code-review mailing list