VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
birgit at westhawk.co.uk Guest
|
Posted: Tue Nov 18, 2008 10:44 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi,
In Javascript, I do the following:
var mSession = new
Session("{ignore_early_media=true,originate_timeout=8}" + endpoint_url);
mSession.execute("record_session", recordfile);
This works very well, however, the client would like the rings to be
recorded as well.
I've tried using various channel variables, but 'new Session' only
returns after the call is answered.
I tried calling
apiExecute("record", <file_path>);
before 'new Session', but that returns an error.
Is is possible to record the rings (in javascript)?
And if so, how would I do that?
Thanks, Birgit
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Nov 18, 2008 12:08 pm Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Birgit,
I'm pretty sure that ringing is early media and you've got
ignore_early_media set to true. If you can work without ignoring early
media then you'll get rings. However, there's probably a reason you're
ignoring early media so be sure to test thoroughly without ignoring
early media just to make sure something else doesn't break. Actually I
just noticed the call timeout you have. IIRC that does require you to
ignore early media. Is there a way you can work without that call
timeout? Let me know. Also, I might have an alternate solution but I
can't give you more info until I get to my desk in an hour or so.
-MC
Sent from my iPhone
On Nov 18, 2008, at 7:40 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi,
In Javascript, I do the following:
var mSession = new
Session("{ignore_early_media=true,originate_timeout=8}" +
endpoint_url);
mSession.execute("record_session", recordfile);
This works very well, however, the client would like the rings to be
recorded as well.
I've tried using various channel variables, but 'new Session' only
returns after the call is answered.
I tried calling
apiExecute("record", <file_path>);
before 'new Session', but that returns an error.
Is is possible to record the rings (in javascript)?
And if so, how would I do that?
Thanks, Birgit
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Tue Nov 18, 2008 12:59 pm Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi Michael,
Thanks for your reply.
I tried a variety of options:
var mSession = new Session(endpoint_url);
var mSession = new Session("{ignore_early_media=false}" + endpoint_url);
both only return after the session is answered (originated?).
The customer wants
"the number of seconds we wait for each user to pick up"
configurable, hence I use "originate_timeout". I noticed (by try and
error) that this is the timeout that does the trick. The other timeout
variables behaved differently.
I'm currently trying to see how I can do recording of the rings. If that
clashes with this neat "originate_timeout" variable, I'll have to see
what my options are.
I did read the http://wiki.freeswitch.org/wiki/Channel_Variables page,
but to be honest, even with descriptions I don't really understand the
implications of using these variables, sorry.
Thanks, Birgit
On 18/11/08 17:03, Michael S Collins wrote:
Quote: | Birgit,
I'm pretty sure that ringing is early media and you've got
ignore_early_media set to true. If you can work without ignoring early
media then you'll get rings. However, there's probably a reason you're
ignoring early media so be sure to test thoroughly without ignoring
early media just to make sure something else doesn't break. Actually I
just noticed the call timeout you have. IIRC that does require you to
ignore early media. Is there a way you can work without that call
timeout? Let me know. Also, I might have an alternate solution but I
can't give you more info until I get to my desk in an hour or so.
-MC
Sent from my iPhone
On Nov 18, 2008, at 7:40 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi,
In Javascript, I do the following:
var mSession = new
Session("{ignore_early_media=true,originate_timeout=8}" +
endpoint_url);
mSession.execute("record_session", recordfile);
This works very well, however, the client would like the rings to be
recorded as well.
I've tried using various channel variables, but 'new Session' only
returns after the call is answered.
I tried calling
apiExecute("record", <file_path>);
before 'new Session', but that returns an error.
Is is possible to record the rings (in javascript)?
And if so, how would I do that?
Thanks, Birgit
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Nov 18, 2008 1:13 pm Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Birgit,
I'm almost to my office. I will give you more info soon. I have not
used js in this capacity so we will have to do some experimenting.
-MC
Sent from my iPhone
On Nov 18, 2008, at 9:51 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi Michael,
Thanks for your reply.
I tried a variety of options:
var mSession = new Session(endpoint_url);
var mSession = new Session("{ignore_early_media=false}" +
endpoint_url);
both only return after the session is answered (originated?).
The customer wants
"the number of seconds we wait for each user to pick up"
configurable, hence I use "originate_timeout". I noticed (by try and
error) that this is the timeout that does the trick. The other timeout
variables behaved differently.
I'm currently trying to see how I can do recording of the rings. If
that
clashes with this neat "originate_timeout" variable, I'll have to see
what my options are.
I did read the http://wiki.freeswitch.org/wiki/Channel_Variables page,
but to be honest, even with descriptions I don't really understand the
implications of using these variables, sorry.
Thanks, Birgit
On 18/11/08 17:03, Michael S Collins wrote:
Quote: | Birgit,
I'm pretty sure that ringing is early media and you've got
ignore_early_media set to true. If you can work without ignoring
early
media then you'll get rings. However, there's probably a reason
you're
ignoring early media so be sure to test thoroughly without ignoring
early media just to make sure something else doesn't break.
Actually I
just noticed the call timeout you have. IIRC that does require you to
ignore early media. Is there a way you can work without that call
timeout? Let me know. Also, I might have an alternate solution but I
can't give you more info until I get to my desk in an hour or so.
-MC
Sent from my iPhone
On Nov 18, 2008, at 7:40 AM, Birgit Arkesteijn
<birgit@westhawk.co.uk>
wrote:
Quote: | Hi,
In Javascript, I do the following:
var mSession = new
Session("{ignore_early_media=true,originate_timeout=8}" +
endpoint_url);
mSession.execute("record_session", recordfile);
This works very well, however, the client would like the rings to be
recorded as well.
I've tried using various channel variables, but 'new Session' only
returns after the call is answered.
I tried calling
apiExecute("record", <file_path>);
before 'new Session', but that returns an error.
Is is possible to record the rings (in javascript)?
And if so, how would I do that?
Thanks, Birgit
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Thu Nov 20, 2008 4:56 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi Michael,
Sorry to nag you, but did you manage to experiment with the Javascript
session in this capacity?
I hope you reached your office.
Cheers, Birgit
On 18/11/08 18:10, Michael S Collins wrote:
Quote: | Birgit,
I'm almost to my office. I will give you more info soon. I have not
used js in this capacity so we will have to do some experimenting.
-MC
Sent from my iPhone
On Nov 18, 2008, at 9:51 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi Michael,
Thanks for your reply.
I tried a variety of options:
var mSession = new Session(endpoint_url);
var mSession = new Session("{ignore_early_media=false}" +
endpoint_url);
both only return after the session is answered (originated?).
The customer wants
"the number of seconds we wait for each user to pick up"
configurable, hence I use "originate_timeout". I noticed (by try and
error) that this is the timeout that does the trick. The other timeout
variables behaved differently.
I'm currently trying to see how I can do recording of the rings. If
that
clashes with this neat "originate_timeout" variable, I'll have to see
what my options are.
I did read the http://wiki.freeswitch.org/wiki/Channel_Variables page,
but to be honest, even with descriptions I don't really understand the
implications of using these variables, sorry.
Thanks, Birgit
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Nov 20, 2008 9:38 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
On Thu, Nov 20, 2008 at 1:50 AM, Birgit Arkesteijn
<birgit@westhawk.co.uk> wrote:
Quote: | Hi Michael,
Sorry to nag you, but did you manage to experiment with the Javascript
session in this capacity?
I hope you reached your office.
Cheers, Birgit
| Sorry, day job was rough yesterday and I didn't get a chance to
tinker. Hopefully later today I will. I'm GMT -0800 so it will
probably be pretty late your time before I start playing with this,
though if you check the lists tonight I should have something to
report.
Thanks,
MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Thu Nov 20, 2008 8:07 pm Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
On Thu, Nov 20, 2008 at 1:50 AM, Birgit Arkesteijn
<birgit@westhawk.co.uk> wrote:
Quote: | Hi Michael,
Sorry to nag you, but did you manage to experiment with the Javascript
session in this capacity?
I hope you reached your office.
Cheers, Birgit
|
Birgit,
After reviewing my dialplan I realize now that what I'm doing won't
work for the scenario you've got, specifically because I am never
dialing multiple endpoints. I'm going to ruminate on this for a little
while and see what I can think of. I'm sure there's a way to do it.
"If FreeSWITCH can't do it, nothing can!"
-MC
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Mon Nov 24, 2008 6:16 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi Michael,
Thanks for your effort and feedback.
I dial multiple endpoints, but I dial them sequentially, i.e. I will
only dial the next merchant, when the previous one hangs up.
In this scenario, each "task" always only involves two channels: one
consumer and one merchant.
One potential complication is that after the merchant picks up, I'll
transfer (bridge?) him/her to a conference call where the consumer is
waiting. I would like the recording to continue after this bridging.
"Long live FreeSWITCH!"
Cheers, Birgit
On 21/11/08 01:05, Michael Collins wrote:
Quote: | Birgit,
After reviewing my dialplan I realize now that what I'm doing won't
work for the scenario you've got, specifically because I am never
dialing multiple endpoints. I'm going to ruminate on this for a little
while and see what I can think of. I'm sure there's a way to do it.
"If FreeSWITCH can't do it, nothing can!"
-MC
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Tue Nov 25, 2008 9:10 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi Michael,
Sorry to nag you again.
I'm getting close to my deadline and I would like to give our customer
some feedback on this issue.
Would you be so kind to explain what the issue is with recording rings
when doing 'new Session(originate_url)'?
As far as I've been able to work out, this statement will only return after
a) the (or some) timeout has expired or
b) the user has picked up
Only in case b) we've got a originated session, that can be used to
record. However, since the user has already answered, the rings are not
recorded.
Is that right?
Cheers, Birgit
On 24/11/08 11:11, Birgit Arkesteijn wrote:
Quote: | Hi Michael,
Thanks for your effort and feedback.
I dial multiple endpoints, but I dial them sequentially, i.e. I will
only dial the next merchant, when the previous one hangs up.
In this scenario, each "task" always only involves two channels: one
consumer and one merchant.
One potential complication is that after the merchant picks up, I'll
transfer (bridge?) him/her to a conference call where the consumer is
waiting. I would like the recording to continue after this bridging.
"Long live FreeSWITCH!"
Cheers, Birgit
On 21/11/08 01:05, Michael Collins wrote:
Quote: | Birgit,
After reviewing my dialplan I realize now that what I'm doing won't
work for the scenario you've got, specifically because I am never
dialing multiple endpoints. I'm going to ruminate on this for a little
while and see what I can think of. I'm sure there's a way to do it.
"If FreeSWITCH can't do it, nothing can!"
-MC
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Tue Nov 25, 2008 9:15 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
The originate method does not return until either early media or answer has been received.
in other words the very instant it returns is the soonest there is even any media to record.
you can execute record_session app on the A leg before you call and that's the best you can do.
session.execute("record_session");
session.execute("bridge", LIST_OF_DESTINATIONS);
if you are not doing much else in your script it may be better to set the dest as a variable then
exit your script and execute bridge from the regular dialplan to avoid extra JS overhead during the call.
On Tue, Nov 25, 2008 at 8:03 AM, Birgit Arkesteijn <birgit@westhawk.co.uk (birgit@westhawk.co.uk)> wrote:
Quote: | Hi Michael,
Sorry to nag you again.
I'm getting close to my deadline and I would like to give our customer
some feedback on this issue.
Would you be so kind to explain what the issue is with recording rings
when doing 'new Session(originate_url)'?
As far as I've been able to work out, this statement will only return after
a) the (or some) timeout has expired or
b) the user has picked up
Only in case b) we've got a originated session, that can be used to
record. However, since the user has already answered, the rings are not
recorded.
Is that right?
Cheers, Birgit
On 24/11/08 11:11, Birgit Arkesteijn wrote:
Quote: | Hi Michael,
Thanks for your effort and feedback.
I dial multiple endpoints, but I dial them sequentially, i.e. I will
only dial the next merchant, when the previous one hangs up.
In this scenario, each "task" always only involves two channels: one
consumer and one merchant.
One potential complication is that after the merchant picks up, I'll
transfer (bridge?) him/her to a conference call where the consumer is
waiting. I would like the recording to continue after this bridging.
"Long live FreeSWITCH!"
Cheers, Birgit
On 21/11/08 01:05, Michael Collins wrote:
Quote: | Birgit,
After reviewing my dialplan I realize now that what I'm doing won't
work for the scenario you've got, specifically because I am never
dialing multiple endpoints. I'm going to ruminate on this for a little
while and see what I can think of. I'm sure there's a way to do it.
"If FreeSWITCH can't do it, nothing can!"
-MC
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk (birgit@westhawk.co.uk),
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
birgit at westhawk.co.uk Guest
|
Posted: Tue Nov 25, 2008 9:31 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Hi Anthony,
Thanks for your feedback.
I still cannot get it to work, maybe the snippet and the output will
give you an idea?
*** I've got the following javascript:
var endpoint_url = 'sofia/gateway/westhawk/0663';
var recordfile = "/usr/local/freeswitch/recordings/dispatcher.wav";
setGlobalVariable("RECORD_ANSWER_REQ", false);
var mSession = new Session("{ignore_early_media=false}" + endpoint_url);
console_log("info", "mSession created, start recording\n");
mSession.execute("record_session", recordfile);
*** When I run it:
freeswitch@apso> jsrun record_rings.js
API CALL [jsrun(record_rings.js)] output:
OK
freeswitch@apso> 2008-11-25 14:22:10 [NOTICE] switch_channel.c:551
switch_channel_set_name() New Channel sofia/external/0663
[7225b30a-bafc-11dd-be4c-05a0d8dd6ae1]
2008-11-25 14:22:10 [NOTICE] sofia.c:2327 sofia_handle_sip_i_state()
Ring-Ready sofia/external/0663!
2008-11-25 14:22:22 [NOTICE] sofia.c:2723 sofia_handle_sip_i_state()
Channel [sofia/external/0663] has been answered
2008-11-25 14:22:22 [INFO] record_rings.js:1 console_log() mSession
created, start recording
2008-11-25 14:22:22 [NOTICE] mod_spidermonkey.c:2959 session_destroy()
Hangup sofia/external/0663 [CS_SOFT_EXECUTE] [NORMAL_CLEARING]
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:927
switch_core_session_thread() Session 3 (sofia/external/0663) Ended
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:929
switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]
As you can see, 'new Session' does not return on the 'ring ready' and
therefore doesn't record the rings to/on this new channel (that is
mSession).
Having said that, I don't know if 'ring ready' qualifies as 'early media'.
Cheers, Birgit
On 25/11/08 14:13, Anthony Minessale wrote:
Quote: | The originate method does not return until either early media or answer
has been received.
in other words the very instant it returns is the soonest there is even
any media to record.
you can execute record_session app on the A leg before you call and
that's the best you can do.
session.execute("record_session");
session.execute("bridge", LIST_OF_DESTINATIONS);
if you are not doing much else in your script it may be better to set
the dest as a variable then
exit your script and execute bridge from the regular dialplan to avoid
extra JS overhead during the call.
On Tue, Nov 25, 2008 at 8:03 AM, Birgit Arkesteijn
<birgit@westhawk.co.uk <mailto:birgit@westhawk.co.uk>> wrote:
Hi Michael,
Sorry to nag you again.
I'm getting close to my deadline and I would like to give our customer
some feedback on this issue.
Would you be so kind to explain what the issue is with recording rings
when doing 'new Session(originate_url)'?
As far as I've been able to work out, this statement will only
return after
a) the (or some) timeout has expired or
b) the user has picked up
Only in case b) we've got a originated session, that can be used to
record. However, since the user has already answered, the rings are not
recorded.
Is that right?
Cheers, Birgit
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
anthony.minessale at g... Guest
|
Posted: Tue Nov 25, 2008 9:55 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
ring_ready does not have audio so there is nothing to record.
ring_ready is a 180 ringing which is just a packet telling your phone to play a ringing sound
on your end.
Remember what i said? originate returns the exact instant there is any audio.
On Tue, Nov 25, 2008 at 8:29 AM, Birgit Arkesteijn <birgit@westhawk.co.uk (birgit@westhawk.co.uk)> wrote:
Quote: | Hi Anthony,
Thanks for your feedback.
I still cannot get it to work, maybe the snippet and the output will
give you an idea?
*** I've got the following javascript:
var endpoint_url = 'sofia/gateway/westhawk/0663';
var recordfile = "/usr/local/freeswitch/recordings/dispatcher.wav";
setGlobalVariable("RECORD_ANSWER_REQ", false);
var mSession = new Session("{ignore_early_media=false}" + endpoint_url);
console_log("info", "mSession created, start recording\n");
mSession.execute("record_session", recordfile);
*** When I run it:
freeswitch@apso> jsrun record_rings.js
API CALL [jsrun(record_rings.js)] output:
OK
freeswitch@apso> 2008-11-25 14:22:10 [NOTICE] switch_channel.c:551
switch_channel_set_name() New Channel sofia/external/0663
[7225b30a-bafc-11dd-be4c-05a0d8dd6ae1]
2008-11-25 14:22:10 [NOTICE] sofia.c:2327 sofia_handle_sip_i_state()
Ring-Ready sofia/external/0663!
2008-11-25 14:22:22 [NOTICE] sofia.c:2723 sofia_handle_sip_i_state()
Channel [sofia/external/0663] has been answered
2008-11-25 14:22:22 [INFO] record_rings.js:1 console_log() mSession
created, start recording
2008-11-25 14:22:22 [NOTICE] mod_spidermonkey.c:2959 session_destroy()
Hangup sofia/external/0663 [CS_SOFT_EXECUTE] [NORMAL_CLEARING]
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:927
switch_core_session_thread() Session 3 (sofia/external/0663) Ended
2008-11-25 14:22:22 [NOTICE] switch_core_session.c:929
switch_core_session_thread() Close Channel sofia/external/0663 [CS_HANGUP]
As you can see, 'new Session' does not return on the 'ring ready' and
therefore doesn't record the rings to/on this new channel (that is
mSession).
Having said that, I don't know if 'ring ready' qualifies as 'early media'.
Cheers, Birgit
On 25/11/08 14:13, Anthony Minessale wrote:
Quote: | The originate method does not return until either early media or answer
has been received.
in other words the very instant it returns is the soonest there is even
any media to record.
you can execute record_session app on the A leg before you call and
that's the best you can do.
session.execute("record_session");
session.execute("bridge", LIST_OF_DESTINATIONS);
if you are not doing much else in your script it may be better to set
the dest as a variable then
exit your script and execute bridge from the regular dialplan to avoid
extra JS overhead during the call.
On Tue, Nov 25, 2008 at 8:03 AM, Birgit Arkesteijn
|
Quote: | <birgit@westhawk.co.uk (birgit@westhawk.co.uk) <mailto:birgit@westhawk.co.uk (birgit@westhawk.co.uk)>> wrote:
Hi Michael,
Sorry to nag you again.
I'm getting close to my deadline and I would like to give our customer
some feedback on this issue.
Would you be so kind to explain what the issue is with recording rings
when doing 'new Session(originate_url)'?
As far as I've been able to work out, this statement will only
return after
a) the (or some) timeout has expired or
b) the user has picked up
Only in case b) we've got a originated session, that can be used to
record. However, since the user has already answered, the rings are not
recorded.
Is that right?
Cheers, Birgit
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk (birgit@westhawk.co.uk),
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400 |
|
Back to top |
|
|
msc at freeswitch.org Guest
|
Posted: Tue Nov 25, 2008 10:51 am Post subject: [Freeswitch-users] Javascript: record ringing of session |
|
|
Sent from my iPhone
On Nov 25, 2008, at 6:03 AM, Birgit Arkesteijn <birgit@westhawk.co.uk>
wrote:
Quote: | Hi Michael,
Sorry to nag you again.
I'm getting close to my deadline and I would like to give our customer
some feedback on this issue.
Would you be so kind to explain what the issue is with recording rings
when doing 'new Session(originate_url)'?
|
I don't know for sure but I suspect this doesn't return while there is
early media, therefore you don't actually get the ringing.
Quote: |
As far as I've been able to work out, this statement will only
return after
a) the (or some) timeout has expired or
b) the user has picked up
Only in case b) we've got a originated session, that can be used to
record. However, since the user has already answered, the rings are
not
recorded.
Is that right?
|
That is my understanding, yes.
Can you experiment with this in a regular dialplan outside of js? Try
creating a simple dp entry that does these apps:
pre_answer
record_session
info
sleep (20 seconds or so)
hangup
Say you create the above dp entry as extension 2500. Do an originate
at the CLI and examine the results:
originate sofia/gateway/westhawk/0663 2500
This should call the URL and as soon as there is early media
(hopefully ringing) it will put the originated call leg into ext 2500
which will pre answer the call (so you can "hear" the early media),
execute the record session, do an info dump for good measure, sleep
for a while and then hang up. You should then be able to listen to the
sound file and if all goes well you will hear ringing prior to the far
end answering.
The results of this test will help you decide where to go next.
-MC
Quote: | F
On 24/11/08 11:11, Birgit Arkesteijn wrote:
Quote: | Hi Michael,
Thanks for your effort and feedback.
I dial multiple endpoints, but I dial them sequentially, i.e. I will
only dial the next merchant, when the previous one hangs up.
In this scenario, each "task" always only involves two channels: one
consumer and one merchant.
One potential complication is that after the merchant picks up, I'll
transfer (bridge?) him/her to a conference call where the consumer is
waiting. I would like the recording to continue after this bridging.
"Long live FreeSWITCH!"
Cheers, Birgit
On 21/11/08 01:05, Michael Collins wrote:
Quote: | Birgit,
After reviewing my dialplan I realize now that what I'm doing won't
work for the scenario you've got, specifically because I am never
dialing multiple endpoints. I'm going to ruminate on this for a
little
while and see what I can think of. I'm sure there's a way to do it.
"If FreeSWITCH can't do it, nothing can!"
-MC
|
|
--
-- Birgit Arkesteijn, birgit@westhawk.co.uk,
-- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK
-- Company no: 1769350
-- Registered Office:
-- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK.
-- tel.: +44 (0)161 237 0660
-- <URL: http://www.westhawk.co.uk>
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
|
_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|