[Asterisk-code-review] app_sendmf: New SendMF application (asterisk[master])

N A asteriskteam at digium.com
Fri Aug 6 09:27:57 CDT 2021


Attention is currently required from: Joshua Colp, Sarah Autumn, George Joseph.
N A has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/16080 )

Change subject: app_sendmf: New SendMF application
......................................................................


Patch Set 5:

(2 comments)

File apps/app_sendmf.c:

https://gerrit.asterisk.org/c/asterisk/+/16080/comment/e3cc7f2a_28766ff5 
PS4, Line 257: static int mf_stream_digits(struct ast_channel *chan, struct ast_channel *peer, const char *digits, int between, unsigned int duration, unsigned int durationkp, unsigned int durationst)
             : {
             : 	int res;
             : 
             : 	if (peer && ast_autoservice_start(peer)) {
             : 		return -1;
             : 	}
             : 	res = mf_stream(chan, digits, between, duration, durationkp, durationst, 0);
             : 	if (peer && ast_autoservice_stop(peer)) {
             : 		res = -1;
             : 	}
             : 
             : 	return res;
             : }
> I'd cross that bridge when you come to it. […]
By "on my list", I am working on that right now, actively writing code for it.

It seems there are 2 options:
1) Follow the DTMF format, include the necessary functions in app.c/app.h and channel.c/channel.h. Then use from app_sendmf.c and app_dial.c
2) Duplicate all the MF code in app_dial.c.

I have also added a ReceiveMF application, and might end up adding that to this module, since they go together. I think my plan is to incorporate all these MF patches in this review as "adding channel-agnostic MF support". I am just wondering if it still makes sense to not make the sender functions public - better to not have duplicated code across the project, right? In which case, would it be best to following the visibilities/locations of the DTMF functions?


File apps/app_sendmf.c:

https://gerrit.asterisk.org/c/asterisk/+/16080/comment/b3959bd5_4afea9c4 
PS5, Line 335: !ast_strlen_zero(duration) && (sscanf(duration, "%30u", &duration_ms) != 1
> Isn't this going to override the overrides for '*' and '#'?
Yes, wouldn't that be the right way, since we are expecting the user to pass in the right duration for the digit?



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I5d89afdbccee3f86cc702ed96d882f3d351327a4
Gerrit-Change-Number: 16080
Gerrit-PatchSet: 5
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-CC: Sarah Autumn <sarah at endlesstemple.org>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Sarah Autumn <sarah at endlesstemple.org>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Fri, 06 Aug 2021 14:27:57 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: N A <mail at interlinked.x10host.com>
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210806/6101e770/attachment.html>


More information about the asterisk-code-review mailing list