[Serusers] Re: [Sems] sems module

harry gaillac gaillacharry at yahoo.fr
Wed Jun 22 16:39:02 CEST 2005


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 at 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 at 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 at lists.iptel.org
>
>>http://lists.iptel.org/cgi-bin/mailman/listinfo/sems
> >>
> > 
> > 
> > 
> > 
> > 	
> > 
> > 	
> > 		
> >
>
___________________________________________________________________________
> 
> > Appel audio GRATUIT partout dans le monde avec le
> nouveau Yahoo! Messenger 
> > Téléchargez cette version sur
> http://fr.messenger.yahoo.com
> > 
> > 
> 
> 



	

	
		
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com




More information about the sr-users mailing list