[Asterisk-code-review] feat: AudioSocket channel, application, and ARI support. (asterisk[master])
George Joseph
asteriskteam at digium.com
Wed Dec 11 10:33:12 CST 2019
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11579 )
Change subject: feat: AudioSocket channel, application, and ARI support.
......................................................................
Patch Set 32: Code-Review-1
(4 comments)
https://gerrit.asterisk.org/c/asterisk/+/11579/32/apps/app_audiosocket.c
File apps/app_audiosocket.c:
PS32:
I'm still confused as to why we need the app when the dialplan could just Dial using the audiosocket channel. But OK.
https://gerrit.asterisk.org/c/asterisk/+/11579/32/apps/app_audiosocket.c@111
PS32, Line 111: if (ast_set_write_format(chan, ast_format_slin)) {
: ast_log(LOG_ERROR, "Failed to set write format to SLINEAR for channel %s\n", chanName);
: ao2_ref(writeFormat, -1);
: ao2_ref(readFormat, -1);
: return -1;
: }
: if (ast_set_read_format(chan, ast_format_slin)) {
: ast_log(LOG_ERROR, "Failed to set read format to SLINEAR for channel %s\n", chanName);
:
: /* Attempt to restore previous write format even though it is likely to
: * fail, since setting the read format did.
: */
: if (ast_set_write_format(chan, writeFormat)) {
: ast_log(LOG_ERROR, "Failed to restore write format for channel %s\n", chanName);
: }
: ao2_ref(writeFormat, -1);
: ao2_ref(readFormat, -1);
: return -1;
: }
This is the "calling" channel yes? If so is this going to cause a renegoation with the caller?
https://gerrit.asterisk.org/c/asterisk/+/11579/32/apps/app_audiosocket.c@177
PS32, Line 177: struct ast_channel *targetChan;
: int ms = 0;
: int outfd = 0;
: struct ast_frame *f;
Might be better to declare these outside the loop since this loop runs for every frame.
Just initialize ms to 0. outfd should probably be initialized to -1 at the top of the loop since 0 is a valid value.
https://gerrit.asterisk.org/c/asterisk/+/11579/32/res/res_audiosocket.exports.in
File res/res_audiosocket.exports.in:
https://gerrit.asterisk.org/c/asterisk/+/11579/32/res/res_audiosocket.exports.in@3
PS32, Line 3: LINKER_SYMBOL_PREFIXast_audiosocket_connect;
: LINKER_SYMBOL_PREFIXast_audiosocket_init;
: LINKER_SYMBOL_PREFIXast_audiosocket_send_frame;
: LINKER_SYMBOL_PREFIX*ast_audiosocket_receive_frame;
You can condense this down to just
LINKER_SYMBOL_PREFIXast_audiosocket*
unless there are ast_audiosocket functions that you _don't_ want exported.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11579
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ie866e6c4fa13178ec76f2a6971ad3590a3a588b5
Gerrit-Change-Number: 11579
Gerrit-PatchSet: 32
Gerrit-Owner: Seán C. McCord <ulexus at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Seán C. McCord <ulexus at gmail.com>
Gerrit-Comment-Date: Wed, 11 Dec 2019 16:33:12 +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/20191211/f46e1fdf/attachment-0001.html>
More information about the asterisk-code-review
mailing list