<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML XMLNS:O><HEAD>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16609" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" text=#000000
bgColor=#ffffff leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT face=Arial size=2>Thanks MC and Chris for the help.</FONT></DIV>
<DIV><FONT face=Arial size=2>Reading the list old posts, and searching the wiki
and google. I saw that a few people were having problems using javascrpit
to originate and control a call with .session in high volume calls.</FONT></DIV>
<DIV><FONT face=Arial size=2>And the suggestion was to use the XML-RPC to
originate the calls and use the dialplan or a javascript to handle the
response.</FONT></DIV>
<DIV><FONT face=Arial size=2>So that's what I am doing. </FONT></DIV>
<DIV><FONT face=Arial size=2>I have started to use the freeswitch this weekend
and I am very happy with it until now.</FONT></DIV>
<DIV><FONT face=Arial size=2>Leonardo</FONT></DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><FONT face=Arial></FONT><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=chris@maxpowersoft.com
href="mailto:chris@maxpowersoft.com">Chris Danielson</A> </DIV>
<DIV><B>Sent:</B> Monday, March 24, 2008 3:01 PM</DIV>
<DIV><B>To:</B> <A title=freeswitch-users@lists.freeswitch.org
href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</A>
</DIV>
<DIV><B>Subject:</B> Re: [Freeswitch-users] Help with
ignore_early_media</DIV></DIV></DIV>
<DIV><BR></DIV>Here is how to handle a new session, though this is used as an
example that shows bridging after a successful originate call is made. You
can remove the bridging code if need be.<BR><BR>//the str variable contains
where we are calling and how to go about it.<BR> var str = <A
class=moz-txt-link-rfc2396E
title='mailto:{ignore_early_media=true}sofia/gateway/blahBlahProvider/15551231234@sip.blahprovider.com" CTRL + Clique para seguir o link'
href='mailto:{ignore_early_media=true}sofia/gateway/blahBlahProvider/15551231234@sip.blahprovider.com"'>"{ignore_early_media=true}sofia/gateway/blahBlahProvider/15551231234@sip.blahprovider.com"</A>;
<BR> session.setVariable("ringback", "%(2000, 4000, 440.0,
480.0)"); //only if necessary... may not need this
line.<BR> var s = new Session();<BR>
s.setCallerData("caller_id_name", "My Name Is");<BR>
s.setCallerData("caller_id_number", "16661112222");<BR> if
(s.originate(session, str, timeout))
{<BR>
s.waitForMedia();<BR>
s.setAutoHangup(true);<BR>
bridge(session, s);<BR> }<BR><BR>//Callback
reference: <A
title="http://wiki.freeswitch.org/wiki/Javascript_DTMF_Callback_Function CTRL + Clique para seguir o link"
href="http://wiki.freeswitch.org/wiki/Javascript_DTMF_Callback_Function">http://wiki.freeswitch.org/wiki/Javascript_DTMF_Callback_Function</A>
<BR><BR>Hope this helps,<BR>-Chris<BR><BR><BR>Michael Collins wrote:
<BLOCKQUOTE
cite=mid:251B739C905BF64FBACCF028D963A5FB021B32B8@exchange.fcnetwork.com
type="cite">
<META content="Microsoft Word 11 (filtered medium)" name=Generator>
<STYLE>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</STYLE>
<O:SMARTTAGTYPE name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags">
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<STYLE>
<!--
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</STYLE>
</O:SMARTTAGTYPE>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Interestingly, even
though JavaScript is the most developed of the control languages, there is a
dearth of sample scripts in SVN. Try here for
help:<O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><A
href="http://wiki.freeswitch.org/wiki/Category:Javascript"
moz-do-not-send="true">http://wiki.freeswitch.org/wiki/Category:Javascript</A><O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><O:P> </O:P></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I don’t see any
examples that explicitly use new.Session() so possibly you could try mimicking
the examples available and see if there’s a quirk in how your script is
attempting to work…<O:P></O:P></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><O:P> </O:P></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">-MC</SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>