Taking the following code: new_session.originate(session, dialout); new_session.waitForAnswer(20000); At this point either the call connected or we timed out. I expected to be able to use new_session.ready() to determine if the call successfully answered but this also returns true if the call timed out. The circumstances in which it will return false are not documented on the wiki. session.ready() is apparently not a function. So how does one check that the originate() ended up with a connected call? Thanks again, James
I had the same problem a while ago. I don't know if it's fixed, but I do this (and it works) session.setVariable("ringback", "%(1000,4000,425)"); bleg = new Session(); bleg.setCallerData("caller_id_name", session.caller_id_name); bleg.setCallerData("caller_id_num", session.caller_id_num); log.debug("Calling sofia/" + options[2] + "/" + options[3] + " for " + options[1] + " seconds"); timeOut = parseInt(options[1]); destination = "{ignore_early_media=true,originate_timeout=10}sofia/mydomain.com/" + options[3] + "%" + options[2]; log.debug("DESTINATION: " + destination + " waiting 15 secs"); res = bleg.originate(session, destination); if (res) { res2 = bleg.waitForAnswer(20000); res2 = session.waitForAnswer(20000); } else res2 = false; log.debug("**** Originate result: " + res + ", " + res2 + " ************"); if (res) { log.debug("Transferred"); socket.send("transfer\tok\n"); bridge(session, bleg); exit(); } else socket.send("transfer\tfailed\n"); On Tue, Aug 19, 2008 at 3:36 PM, James Green <james.green@stealthnet.net> wrote:
Taking the following code:
new_session.originate(session, dialout); new_session.waitForAnswer(20000);
At this point either the call connected or we timed out.
I expected to be able to use new_session.ready() to determine if the call successfully answered but this also returns true if the call timed out. The circumstances in which it will return false are not documented on the wiki.
session.ready() is apparently not a function.
So how does one check that the originate() ended up with a connected call?
Thanks again,
James
_______________________________________________ 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
The originate method technique really causes more issues than it solves =D If you don't have some specific need for doing it that way try this: newSession new Session("{ignore_early_media=true}sofia/default/foo@bar.com "); if (newSession.ready()) { .... yay } On Tue, Aug 19, 2008 at 8:40 AM, Jonas Gauffin <jonas.gauffin@gmail.com>wrote:
I had the same problem a while ago. I don't know if it's fixed, but I do this (and it works)
session.setVariable("ringback", "%(1000,4000,425)"); bleg = new Session(); bleg.setCallerData("caller_id_name", session.caller_id_name); bleg.setCallerData("caller_id_num", session.caller_id_num); log.debug("Calling sofia/" + options[2] + "/" + options[3] + " for " + options[1] + " seconds"); timeOut = parseInt(options[1]); destination = "{ignore_early_media=true,originate_timeout=10}sofia/mydomain.com/" + options[3] + "%" + options[2]; log.debug("DESTINATION: " + destination + " waiting 15 secs"); res = bleg.originate(session, destination);
if (res) { res2 = bleg.waitForAnswer(20000); res2 = session.waitForAnswer(20000); } else res2 = false;
log.debug("**** Originate result: " + res + ", " + res2 + " ************"); if (res) { log.debug("Transferred"); socket.send("transfer\tok\n"); bridge(session, bleg); exit(); } else socket.send("transfer\tfailed\n");
On Tue, Aug 19, 2008 at 3:36 PM, James Green <james.green@stealthnet.net> wrote:
Taking the following code:
new_session.originate(session, dialout); new_session.waitForAnswer(20000);
At this point either the call connected or we timed out.
I expected to be able to use new_session.ready() to determine if the call successfully answered but this also returns true if the call timed out. The circumstances in which it will return false are not documented on the wiki.
session.ready() is apparently not a function.
So how does one check that the originate() ended up with a connected call?
Thanks again,
James
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Can you check the value of variable enpoint_disposition? -MC Sent from my iPhone On Aug 19, 2008, at 6:36 AM, James Green <james.green@stealthnet.net> wrote:
Taking the following code:
new_session.originate(session, dialout); new_session.waitForAnswer(20000);
At this point either the call connected or we timed out.
I expected to be able to use new_session.ready() to determine if the call successfully answered but this also returns true if the call timed out. The circumstances in which it will return false are not documented on the wiki.
session.ready() is apparently not a function.
So how does one check that the originate() ended up with a connected call?
Thanks again,
James <james_green.vcf> _______________________________________________ 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
Michael S Collins wrote:
Can you check the value of variable enpoint_disposition?
Against what values? I only ask because http://wiki.freeswitch.org/wiki/Session_getVariable really ought to link to a list of variables, their values and meanings. James
A fair question! I was thinking of the value "ANSWERED" but I guess I only know that because I've been digging through thousands of XMLCDRs... :) The channel variables, values, and meanings is a *HUGE* documentation project and it's not one that we've queued up yet. Most likely we'll be asking the community for assistance with it once we get through the exercise of documenting the default configuration and related config files. -MC On Tue, Aug 19, 2008 at 7:58 AM, James Green <james.green@stealthnet.net>wrote:
Michael S Collins wrote:
Can you check the value of variable enpoint_disposition?
Against what values? I only ask because http://wiki.freeswitch.org/wiki/Session_getVariable really ought to link to a list of variables, their values and meanings.
James
_______________________________________________ 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
did everyone skip my email with the answer in it ? On Tue, Aug 19, 2008 at 2:25 PM, Michael Collins <msc@freeswitch.org> wrote:
A fair question! I was thinking of the value "ANSWERED" but I guess I only know that because I've been digging through thousands of XMLCDRs... :)
The channel variables, values, and meanings is a *HUGE* documentation project and it's not one that we've queued up yet. Most likely we'll be asking the community for assistance with it once we get through the exercise of documenting the default configuration and related config files.
-MC
On Tue, Aug 19, 2008 at 7:58 AM, James Green <james.green@stealthnet.net>wrote:
Michael S Collins wrote:
Can you check the value of variable enpoint_disposition?
Against what values? I only ask because http://wiki.freeswitch.org/wiki/Session_getVariable really ought to link to a list of variables, their values and meanings.
James
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Nope! I liked your answer the best, FWIW anyway... ________________________________ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Anthony Minessale Sent: Tuesday, August 19, 2008 1:16 PM To: freeswitch-users@lists.freeswitch.org Subject: Re: [Freeswitch-users] Did the call connect? did everyone skip my email with the answer in it ? On Tue, Aug 19, 2008 at 2:25 PM, Michael Collins <msc@freeswitch.org> wrote: A fair question! I was thinking of the value "ANSWERED" but I guess I only know that because I've been digging through thousands of XMLCDRs... :) The channel variables, values, and meanings is a *HUGE* documentation project and it's not one that we've queued up yet. Most likely we'll be asking the community for assistance with it once we get through the exercise of documenting the default configuration and related config files. -MC On Tue, Aug 19, 2008 at 7:58 AM, James Green <james.green@stealthnet.net> wrote: Michael S Collins wrote: > Can you check the value of variable enpoint_disposition? Against what values? I only ask because http://wiki.freeswitch.org/wiki/Session_getVariable really ought to link to a list of variables, their values and meanings. James _______________________________________________ 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 -- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <mailto:MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com <mailto:PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <mailto:sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org <mailto:googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
Anthony Minessale wrote:
did everyone skip my email with the answer in it ?
Nope. I took things further and documented your answer on the wiki. Follow-up question: I can check endpoint_disposition after a while for an error and thus determine cause if the call could not connect? I'm going to need to log attempts and their outcomes for my application. Thanks, James
if you use the way i described above but additionally supply an existing session as the 2nd arg to the constructor then the endpoint_disposition will be set on that session. On Wed, Aug 20, 2008 at 3:01 AM, James Green <james.green@stealthnet.net>wrote:
Anthony Minessale wrote:
did everyone skip my email with the answer in it ?
Nope. I took things further and documented your answer on the wiki.
Follow-up question: I can check endpoint_disposition after a while for an error and thus determine cause if the call could not connect? I'm going to need to log attempts and their outcomes for my application.
Thanks,
James
_______________________________________________ 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
-- Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com <MSN%3Aanthony_minessale@hotmail.com> GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com<PAYPAL%3Aanthony.minessale@gmail.com> IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org <sip%3A888@conference.freeswitch.org> iax:guest@conference.freeswitch.org/888 googletalk:conf+888@conference.freeswitch.org<googletalk%3Aconf%2B888@conference.freeswitch.org> pstn:213-799-1400
participants (6)
-
Anthony Minessale
-
James Green
-
Jonas Gauffin
-
Michael Collins
-
Michael Collins
-
Michael S Collins