I have used asterisk MusicOnHold with that I have to point a particlar folder in musiconhold.conf and during the execution all the tone inside that folder are played for all the users.
But now I have to play a specific sound file for each user uploaded by them.My problem is that how can I play this file for user.Because if he uploads a sound file then I have to manually create a class in musiconhold.conf pointing to that folder the do moh reload.
I just want to automate the things to the user just uploads the sound file and during the call of that user in extensions.conf I can point to that sound file and it will be played without reload or adding context in musiconhold.conf everytime.
For ex. the way Playback(pathToSoundfil) works which takes tone path directly is there any function like in musiconhold for directly passing the sound file?
Thanks
You can do as many section in your musiconhold file as you want.
After that you can use thoose class
No, you can't change classes without reload res_musiconhold
However you can use asterisk realtime architecture and put whole config into mysql. Still need do script which will do reload.
If you want 100% realtime solution, you can use conference and play into same conference any file. Just create enother call to conference which play file. This variant require expert level in asterisk.
Related
The simplest abstraction of NVR(Network Video Recorder) is like the follow:
The user specifies a path (such as: ~/recrods/) to store video records.
The NVR creates video files (such as: 1.mp4, 2.mp4) on the path.
Now we are going to implement a web-page NVR. Is it possible to do the similar things in the browser without popping up file selectors?
I'm encoding a video file using the built-in adaptive streaming transform. Once the file is successfully processed, an asset container is created with the below files:
Is it possible to provide custom file names at the time a job is created? It seems that the default behavior is to take a certain number of characters from the original file name and prepend them in the above file names. If possible, I'd like to configure this behavior.
P.S. I'm using the .NET SDK.
You can create a custom transform to output file names differently. On https://learn.microsoft.com/en-us/rest/api/media/transforms/createorupdate#definitions search for the Mp4Format section. In that you can specify the filenamePattern with certain macros like {Bitrate} and {Codec}.
See https://learn.microsoft.com/en-us/azure/media-services/latest/custom-preset-cli-howto for an example custom transform and the process by which to create it in Media Services.
I use the macros on my jobs, they work ok. I have a process that takes 3 videos (an intro section, the actual content, and the outro section) and encodes them as one single video. The issue I have with the macros is that it uses the file name of the first video in the inputs. So it ends up using the file name of the intro video which is a generic name. They need to have a way where we can have a little more control.
I suppose I could copy/rename the intro video to a desired name before I encode and it would pick it up, but that seems to be a little bit of overkill.
The Macros are good, but they could use some enhancements I think.
I would like to upload file programatically to my jsf application. The user should select a directory on his system, and a js script should loop on any file in dir and send each one to the listener serverside
I cannot use FileUpload, because it cannot select a whole dir with thousands of file, so I was thinking to use jquery and send the file to a remotecommand, but I have no clue to how send the file itself (normally I pass just string)
so I was thinking to use jquery and send the file to a remotecommand, but I have no clue to how send the file itself
Don't go there. It is a bad attempt to a workaround for a bad design choice. You'd most likely run into similar problems and what about the user selecting a lot of files for second time if it fails halfway? It might become slow, might run into browser limits (search for uploading multiple files in plain html)...
If you still want to do it via a webbrowser (which according to one of your other questions you do not want to), maybe try something like https://webdeltasync.github.io/ (disclaimer: I did not use it myself, and there might be similar ones (https://www.google.com/search?q=browser+based+rsync), it is just a hint in which direction to find a real solution)
I have an xPages application that needs to write a text file to a folder on my network. I'm not sure if it's even possible from an xPages application?
If it is, can someone give me an idea how to go about this?
POI4XPages can write views etc to CSV files https://poi4xpages.openntf.org/. I've previously used OpenCSV, and Apache-licensed Java library to import from a CSV file, but it also allows exporting. I use it regularly to preload data for session databases like for my session at Connect 2016. CommonsCSV has subsequently been released, which would replace OpenCSV.
Yes you can. The easiest way is to create a Java class that does what you need (and test it from the command line). In a button, which is server side JavaScript, you can instantiate that class and write out.
You might need to handle security setting (e.g. deploying your class in a jar file into [DominoAppDir]/jvm/lib/ext) to be allowed to have network access. If you rather keep the class in the nsf, you might need harder measures.
Let us know how it goes
I just created a simple class that created the file and wrote to it. Worked like a champ
Thanks all!
How we can write in a file through a j2me code ?
Does your J2ME support JSR-75? If so, see here
http://developers.sun.com/mobility/apis/articles/fileconnection/
this is he JSR75 spec, basically it just means to create a connector (FileConnectoion) and open a stream, once you hve it you can do various operation with hte file like chance to hidden, delete, create open etc..
If JSR-75 does not exists on the device (rare these days) your ownly options for storage is RMS, and if you want just to read files you have in your application you can use class.OpenResourceasStream(resname);