The part about getting started without an SIP proxy was particularly useful. I have the simple services running, and that will help me focus on the applications. SER on my box is not quite working (it seems to start, but I see no processes), but I will try and figure that out later. Thank you very much, and I might end up bugging you a bit more depending on how it goes. -Mahi
On Tue, Mar 2, 2010 at 1:36 PM, Stefan Sayer <[email protected]>wrote: > Hi, > > > Mahi Haile wrote: > >> Hi all, >> I am a grad student in CS, and has been recently interested in voice >> solutions. I am a complete beginner in this area. I am starting out with >> SEMS, and using the included SER module. >> >> I have built sems, and thats where I am. Reading though the documentations >> and presentations, I could not find an end to end tutorial that covers >> everything. In most of the SEMS presentations, I see a 'Proxy' box that >> sends requests to SEMS. >> > in SIP usually you have some registrar where the phones register to, and a > ("home") proxy through which the calls are placed. you can easily set up > this for a small to medium system with ser, sip-router or kamailio or the > like, and there are lots of documentation and tutorials on how to do that. > > with ser for example, if you are on debian, you can basically download the > source package (e.g. checkout from svn or download from > ftp.iptel.org/pub/ser), create the ser-oob package (cd ser-x.y.z; ln -s > pkg/debian debian; dpkg-buildpackage -rfakeroot -us -uc), install it (dpkg > -i ser_x.y.z ser-oob_x.y.z), configure it (dpkg-reconfigure ser-oob) and > adapt the ser-oob configuration file (/etc/ser/ser-oob.cfg), which does > implement all you need to start. > > now, lets say you want to have some certain announcement played for the > case that the user dials a certain number, e.g. starting with 300. In ser > (kamailio, sip-router, opensips etc), you can catch calls to that number and > send them to SEMS, like this: > > if (uri=~"sip:300.*") { > t_relay_to_udp("192.168.5.106","5080"); > break; > } > > where the IP address/port is the SIP listen address of your SEMS server > (set in sems.conf). > > In the ser-oob config, the best place to do this is in SITE-SPECIFIC route, > and there is also already an example in there I think (forwarding to > iptel.org conference for 000777). > > Now you have all INVITEs to 300 sent to your SEMS server. You tell SEMS to > load and run the application announcement, by setting in > /etc/sems/sems.conf: > load_plugins=wav;ilbc;announcement;sipctrl > application=announcement > and possibly set the announcement to play in announcement.conf (in > /etc/sems/etc/announcement.conf). > You should also set the SIP listen address and port in sems.conf. > > Now all calls to 300 go to the SEMS server that runs the announcement > application, and you should hear that playing on your phone. > > Now lets say that you wanted to have your SEMS server not do only > announcements, but also an echo service, if you call the number 'echo'. So > you need to load both echo and announcement applications, and somehow the > proxy needs to tell SEMS which applicaiton should be executed. > > There is several methods how to select an application in SEMS (by RURI user > part, RURI parameter, regexp matching on RURI, or a separate header), and > the preferred way is to add some special header to the INVITE, P-App-Name. > > so, in sems.conf you set: > load_plugins=wav;ilbc;announcement;sipctrl;session_timer;echo > application=$(apphdr) > > and in the ser-oob.cfg you do: > if (uri=~"sip:300.*") { > append_hf("P-App-Name: announcement\r\n"); > t_relay_to_udp("192.168.5.106","5080"); > break; > } > > if (uri=~"sip:echo.*") { > append_hf("P-App-Name: echo\r\n"); > t_relay_to_udp("192.168.5.106","5080"); > break; > } > > Now lets say there is an application in SEMS which needs some parameters > (e.g. the email address to send the voicemail to, or the user ID for > voicebox). Usually, the proxy has looked up the user profile from some kind > of DB anyway, so it makes sense to just add that information to the INVITE > and not have the voicemail or voicebox server care for databases and stuff > and look it up again. So there is a header called P-App-Param which SEMS > understands and gives as parameters to the applications. For voicebox that > is for example: > > if (uri=~"^sip:1000") { > append_hf("P-App-Name: voicebox\r\n"); > append_hf("P-App-Param: > [email protected]%|;[email protected]%|;lng=%$f.lang%|;uid=%$f.uid%| > ;did=%$f.did%|;\r\n"); > rewritehostport("mysemsserver.ip.addr:5080"); > route(FORWARD); > } > > or for leaving a voicemail (in failure_route, see the comment in > ser-oob.cfg) > append_hf("P-App-Name: voicemail\r\n"); > append_hf("P-App-Param: > mod=%$t.voicemail%|;eml='%$t.email%|';[email protected]%|;snd='%[email protected]%|' > ;[email protected]%|;uid=%$t.uid%|;did=%$t.did%|;"); > rewritehostport("mysemsserver.ip.addr:5080"); > route(FORWARD); > > Of course, pretty much the same applies to kamailio/sip-router/opensips > config, sometimes the syntax is a little different. > > I hope that gets you somehow started... also note that each sems > application has got documentation; Readme files in doc/ and for the examples > under the source tree. The 1.1 documenation is also online at > iptel.org/sems/. > > hth > Stefan > > P.S. For testing, I often use a very simple ser configuration, have a look > at ser-basic.cfg in the ser source tree under etc/ser-basic.cfg . I put the > checks for r-uri between REGISTER handling and USRLOC lookup. > > P.S. 2: for testing simple things like announcement or some service, you > can also do it completely without setting up a SIP proxy: register two users > A and B at iptel.org/service, load registrar_client;uac_auth in sems.conf, > set the A user's credential in registrar_client.conf, register ekiga to your > iptel.org account B, and call the number of A - this way the iptel.orgproxy > sends the call to SEMS just like any other SIP phone. > > >> As a very basic process, here is what I would like to do: call from my >> Ekiga softphone and hear an announcement served by Sems. My question is, >> please point me to a tutorial on how to set up the complete system. What >> pieces do I need besides sems, and how do they interact? After that, I would >> like to find out how to add more users, so that they have separate >> voiceboxes etc. >> >> Thank you very much, >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Sems mailing list >> [email protected] >> http://lists.iptel.org/mailman/listinfo/sems >> > > > -- > Stefan Sayer > VoIP Services Consulting and Development > > Warschauer Str. 24 > 10243 Berlin > > tel:+491621366449 > sip:[email protected] <sip%[email protected]> > email/xmpp:[email protected] <xmpp%[email protected]> > > >
_______________________________________________ Sems mailing list [email protected] http://lists.iptel.org/mailman/listinfo/sems
