Hello,
o Jonathan González [01/13/09 23:38]:
Hi there,
Today is the first day that I am using SEMS and I am a little bit lost.
I am trying to implement an announcement service that plays the file
requested as it is decribed in RFC 4240. I have a SIP Servlet which is
sending this kind of INVITEs to SEMS:
INVITE sip:[email protected]:5080 <http://sip:[email protected]:5080> SIP/2.0
Max-Forwards: 70
Contact: <sip:138.4.3.218:5060;fid=server_1>
To: <sip:[email protected]:5080
<http://sip:[email protected]:5080>>;play=voicebox/msg_saved.wav
What I want is to hear the requested file and then establish a
conversation(at the moment I am able to hear the default wav file).
I have almost the original config file(comments have been omitted):
plugin_config_path=/usr/local/etc/sems//etc
fork=yes
stderr=no
loglevel=3
application=early_announce
the early_announce application plays the file indicated by the RURI
user-part (in this case it looks for 1234.wav) in an early dialog (it
replies with 183 early media). If this is what your servlet ecpects,
then it is ok. But if you want to run RFC 4240 style announcements
(;play=<uri>, e.g. ;play=file://path/to/file.wav) you need the
annc_service ivr application from apps/examples/tutorial/annc_service.
For this, set
application=annc_service
load_plugins=wav;ilbc;announcement;sipctrl;ivr;session_timer
do a
$ make -C apps/examples/tutorial/annc_service install
or copy the file apps/examples/tutorial/annc_service/annc_service.py to
some path (e.g. /usr/local/lib/sems/ivr/) , and set the path accordingly
in /etc/sems/etc/ivr.conf :
script_path=/usr/local/lib/sems/ivr/
If you start sems, you will then see something like 'application script
registered: annc_service'. Which means you can run the application
But, usually it is simpler and faster to set the request URI to contain
the filename as the user part and use the announcement application
(application=announcement).
plugin_path=/usr/local/lib/sems/plug-in/
load_plugins=wav;ilbc;announcement;sipctrl
Some more remarks:
exclude_plugins=binrpcctrl;unixsockctrl;precoded_announce
rtp_low_port=10000
rtp_high_port=60000
media_processor_threads=1
media_ip=lo
sip_ip=127.0.0.1
well, I would set the two above, or at least the media_ip, to a publicly
routable IP (see the warning that sems gives), if you want to send RTP
to somewhere.
sip_port=5080
And I am using the command 'sems -E' to debug the server:
(16464) WARNING: [b7d1e6c0] getLocalIP (sems.cpp:571): Media advertising
using loopback address!
(16464) WARNING: [b7d1e6c0] getLocalIP (sems.cpp:572): Try to use
another network interface if your SEMS
(16464) WARNING: [b7d1e6c0] getLocalIP (sems.cpp:573): should be
joinable from the rest of the world.
Sip Express Media Server (1.1.0-rc1 (i386/linux))
Configuration:
configuration file: /usr/local/etc/sems/sems.conf
plug-in path: /usr/local/lib/sems/plug-in/
daemon mode: 0
local SIP IP: 127.0.0.1
public media IP:
local SIP port: 5080
local media IP: 127.0.0.1
outbound proxy:
application: early_announce
...
(16464) INFO: [b79c7b90] run (SipCtrlInterface.cpp:330): Starting SIP
control interface
(16464) ERROR: [b79c7b90] bind (udp_trsp.cpp:205): bind: Address already
in use
this says that there is something already running on localhost:5080.
quit that other application or set sip_port above to something else.
hth
Stefan
(16464) DEBUG: [b78c6b90] _start (AmThread.cpp:68): Thread 3079433104 is
starting.
(16464) DEBUG: [b77c5b90] _start (AmThread.cpp:68): Thread 3078380432 is
starting.
(16464) DEBUG: [b77c5b90] run (udp_trsp.cpp:118): before recvmsg (:0)
(16464) ERROR: [b77c5b90] run (udp_trsp.cpp:122): recvfrom returned -1:
Bad file descriptor
(16464) DEBUG: [b77c5b90] _start (AmThread.cpp:72): Thread 3078380432 is
ending.
(16464) DEBUG: [b79c7b90] _start (AmThread.cpp:72): Thread 3080485776 is
ending.
The point is that I don't know exactly what do these lines mean. Could
someone help me to understand them and if possible, explain how could I
make to make SEMS play the file requested on the invite ?
Thanks in advance,
Jonathan
--
Personal webpage - www.jonbaraq.eu
--
Personal webpage - www.jonbaraq.eu
------------------------------------------------------------------------
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems
--
Stefan Sayer
VoIP Services
[email protected]
www.iptego.com
IPTEGO GmbH
Am Borsigturm 40
13507 Berlin
Germany
Amtsgericht Charlottenburg, HRB 101010
Geschaeftsfuehrer: Alexander Hoffmann
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems