[Freeswitch-users] Session Question
Nick Temple
nick at intellispire.com
Thu May 1 09:28:36 PDT 2008
Hello,
I am extremely new to VOIP in general and have been using freeswitch only a
couple of days,
so if I have missed something in the docs please point me in the right
direction.
I am attempting to create an outbound call system -- mostly research and
playing at
this point.
The initial goal is to have the system ring a number, then deliver a wave
file. I have
it (mostly) working in two different flavors.
The first seems to work the best right now:
(works fine via XMLRPC or the CLI):
originate sofia/gateway/lesnet/1502NNNNNNN '&javascript(call1.js)'
call1.js:
session.waitForAnswer(10000);
session.streamFile("/tmp/test.wav");
exit();
The second way does everything in Javascript:
jsrun call2.js
where call2.js is nearly as trivial:
sessionx = new Session();
if (sessionx.originate(session, "sofia/gateway/lesnet/15025482003", 30)) {
sessionx.waitForAnswer(10000); // Wait 30 seconds
sessionx.streamFile("/mnt/test.wav");
};
exit();
The difference is that while both methods work on my land line, only #1
works when calling my cell phone ...
for #2, the call is made, but I can't hear the media file playing.
After lots of experimentation, the only thing I can figure at this point is
that call1.js has some
sort of defaults setup that I fail to do in call2.js
Thanks for a great product!
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080501/fce6b97e/attachment-0002.html
More information about the FreeSWITCH-users
mailing list