[Home]

Summary:ASTERISK-03789: [patch] enter/leave prompt easily changable.. Again ;)
Reporter:mochouinard (mochouinard)Labels:
Date Opened:2005-03-27 23:16:01.000-0600Date Closed:2005-06-23 16:06:50
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_meetme
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_meetme.c-signals_rev1.txt
Description:This patch is a continution of my old patch ASTERISK-161332 and ASTERISK-161130.  It   doesnt currently handle parameters from the meetme options, but with this, it will be easy to do. But first I want comments.

Check in the code the line :
#define DEFAULT_ENTERSIGNAL "beep"
#define DEFAULT_LEAVESIGNAL "vm-no"

When the conference is created, it will load the beep.gsm and vm-no.gsm to a pcm file into a memory pointer. (one load only)

****** ADDITIONAL INFORMATION ******

Ok I got malloc, and I got weird loop to convert the file.  I dont know how else to do it.  the malloc aint freed rightnow when it closed,  but I dlike to know how I can get away from using malloc in the first place so I dont need to free it everywhere in the code.

Also if there is a way to convert without puting into a file and reopening it again, let me know.

Disclamed
Comments:By: mochouinard (mochouinard) 2005-03-27 23:19:25.000-0600

oh, and it forced to GSM rightnow for input... I gota find how to use ast_filehelper or something

By: Clod Patry (junky) 2005-03-28 02:24:40.000-0600

i think the idea to change the enter/leave prompt is a good point. It's good that you push to parametrized it.
Just a comment on patch: prototypes functions shouldn't be at the beginning of the file (by convention)?

By: Russell Bryant (russell) 2005-03-28 16:52:42.000-0600

A simple way to do this would be to include a script in contrib/scripts/ that will convert a regular sound file into the correct format.

As suggested by Steven Critchfield on the -dev list ...

"Use sox to convert to the appropriate raw file format.
Use hexdump with the appropriate format string to convert to the data
format needed."

By: mochouinard (mochouinard) 2005-03-28 19:05:44.000-0600

the file format is ulaw.  I could would remove the code for gsm->ulaw and just load the prerecorded  .pcm file into the pointer.  So you create your .pcm file and that it.  Just thought of loading it from a gsm or other format might be good for people.  Also people who really do heavy meetme can easily just put the .pcm file in the first place to save cpu (currently not done, since Im not sure on how I convert from 'gsm'->ulaw.

By: Mark Spencer (markster) 2005-03-28 22:42:58.000-0600

I don't think this is necessary...  Remember that we actually *did* the first part of this which was to create a pseudo channel (conf->chan) upon which we can ast_streamfile() instead of the careful_write we currently do.  Of course the default behaior should be the carefulwrite since it's a lot less overhead than calling streamfile / waitstream but it should work anyway and be an extremely trivial patch to implement.

By: mochouinard (mochouinard) 2005-05-14 19:40:30

the idea of this is to exactly get RID of those enter leave .h file and use file instead, and load them when the conference is created 1 time, so it doesn't create overhead (unless you create and destroy 200 conference every second...)

By: Clod Patry (junky) 2005-06-09 18:01:24

My opinion is this:
if we want to customize the enter/leave sounds, why not set flag in meetme, like J(entersound) and L(leavesound) with some default values? Cause even with that patch, we wont be able to customize these sounds. The only way is to change the defines, and it's gonna be for all confs.

And my remark on code, group your prototypes at the beginning.

By: Michael Jerris (mikej) 2005-06-23 04:41:28

Probably better as a conf file option.  I think using streamfile on conf->chan should produce cleaner code, and be more flexible as to file format and such.

By: Michael Jerris (mikej) 2005-06-23 16:06:50

Closed at OP request.