Stefan,
May be you read my emails about asterisk+ser+mwi.
i sent questions to find a sip media server for ser
but asterisk don't seem to be the right way for ser
(just pstn gateway).
how many devoloppers work on sems project ?
I don't understand ivr plugin this one can provide IVR
UMS/mwi and more but sems conf file provide one file
*.py for this module !?
Based on IVR plugin is it possible to write some
dedicated modules :
UMS+mwi module
MOH module
IVR module
Harry
--- Stefan Sayer <sayer(a)cs.tu-berlin.de> a écrit :
harry gaillac wrote:
hello,
If i add this code will it play music as in xmms
playlist for example.
what i expect from moh module is to look in the
moh
directory for one or more wav file (-this
directory is
defined in sems.cfg).
if a least one file is found moh play the same
file
(boucle) .
If more than one file is found all playlist is
palyed
(boucle)
i expect from moh module it provide something like
xmms
if you want to listen the same music.
I agree i know what the moh should do but
translate my
need into C++ is a problem for me.
it is way easier to write a short python
script:
import ivr
import os
...
def pushFiles():
print "pushing files in the media queue..."
for file in os.listdir("/path/to/mymusic"):
fullname = os.path.join(directory,
file)
print "enqueueing " + fullname
ivr.enqueueMediaFile(fullname, false)
...
This could of course be optimized; it will open all
files when the media
queue is empty...just to get you started.
see e.g.
http://effbot.org/librarybook/os-path.htm
or
http://docs.python.org/lib/os-file-dir.html
Stefan
Thanks for help
Harry
--- Stefan Sayer <sayer(a)cs.tu-berlin.de> a écrit :
>pardon:
>Stefan Sayer wrote:
>
>>and some python documentation (
>
>www.python.org/docs ).
>www.python.org/doc/
>
>>...
>
>>If you prefer c++ you can simply extend the
>
>announcement module
>
>>// somewhere in onSessionStart
>>while (!getSession()->sess_stopped.get()) {
>> getSession()->rtp_str.play("file1.wav");
>> getSession()->rtp_str.play("file2.wav");
>> getSession()->rtp_str.play("file3.wav");
>>}
>
>vector<string> files;
>files.push_back("file1.wav");
>files.push_back("file2.wav");
>files.push_back("file3.wav");
>
>vector<string>::iterator it = files.begin();
>while (!getSession()->sess_stopped.get()) {
> getSession()->rtp_str.play(*it);
> it++;
> if (it == files.end())
> it = files.begin();
>}
>
>
>>Stefan
>>
>>
>>
>>_______________________________________________
>
>Sems mailing list
>sems(a)lists.iptel.org