Try it from the FS CLI first to see how to do it.<br><br>originate <dial string> <extension> <dialplan> <context><br><br>so type this in the console replacing the sofia url with one of your choice:<br>
<br>originate sofia/default/<a href="mailto:100@dom.com">100@dom.com</a> 9998 XML default <br><br>when you answer the call you should hear the tetris song. so you can use any ext@context+dialplan combo with those args.<br>
<br>You can do the same over xmlrpc or mod_event_socket <br><br><br><br><br><div class="gmail_quote">On Fri, Jan 23, 2009 at 5:39 PM, Shelby Ramsey <span dir="ltr"><<a href="mailto:sicfslist@gmail.com">sicfslist@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Anthony / Michael,<div><br></div><div>Thanks for the quick responses. What I don't want to do is "drive the call" (by that listen on a socket ... do this on this event ... or anything else that my very limited FS foo would break) ... Just want to start it and then give it instructions on where to go.</div>
<div><br></div><div>So I guess a better question would be ... how do I give directions to FS for this (and I get the 1st part ... that's obvious ... really lost on the DTMF digit part) ... and please keep in mind we're talking hundreds of extensions / IVR's and distributed machines so I can't have any dependancy on static conf files other than maybe something like what Michael mentioned where I point every call to something:</div>
<div class="Ih2E3d">
<div><br></div><div>[campaign]</div><div>exten => 100,1,ANSWER()</div></div><div>exten => 100,n,PLAYBACK(somefile)</div><div>exten => 100,n,BACKGROUND(somefile)</div><div>exten => 100,n,WAITEXTEN(4)</div>
<div>exten => 100,n,HANGUP()</div><div><br></div><div>but in that same context is someone triggers DTMF:</div><div>exten => 1,1,DOSOMETHING</div><div>exten => 2,1,DOSOMETHING</div>
<div><br></div><div>I was imaging issuing originate via XML_RPC ... something like <span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">originate sofia/$ANI@$IP $SOMEEXTEN then on answer when FS tries to connect to $SOMEEXTEN it will ask me what to do via xml_curl ... where I would normally respond with something like this:</span></div>
<div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
<section name="dialplan" description="FS RESPONSE">
<context name="public">
<extension name="$EXTEN">
<condition field="destination_number" expression="">
<action application="set" data="hangup_after_bridge=true"/>
<action application="set" data="continue_on_fail=true"/>
<action application="set" data="call_timeout=180"/>
<action application="set" data="proxy_media=true"/>
<action application="set" data="pass_rfc2833=true"/>
<action application="set" data="accountcode=$CUSTOMER" />
<action application="set" data="origination_caller_id_name=NULL" />
<action application="set" data="origination_caller_id_number=$CIDNUM" />
<action application="set" data="effective_caller_id_name=NULL" />
<action application="set" data="effective_caller_id_number=$CIDNUM" />
<action application="set" data="userfield=$BUNCHOFCRAPFORMYCDR" />
<action application="bridge" data="sofia/external/$ANI@$PROVIDERIP" />
</condition>
</extension></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"> </context></span><br></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"> </section>
</document></span><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">
</span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">The challenge I've got is I have no idea how to do stuff like the IVR mentioned above (the playback part is easy) ... but I can't grasp conceptually how to get the "context" with "multiple extensions" part back to FS via this method (is it possible?)... </span></div>
<div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">Sorry for what is probably a very simple answer and any AST references (but I've been using it in heavy production environments for about 5 years). Just trying to "port" what I do today without making my brain melt out of my ears (and it doesn't take much for that to happen). </span></div>
<div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><font color="#888888"><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">Shelby</span></div>
</font><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;">PS ... Really enjoy the list. I usually fall out of my chair laughing once a day from your remarks Anthony. Keep it coming!</span></div>
<div><div></div><div class="Wj3C7c">
<div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br></span></div><div><span style="font-family: Courier; font-size: 12px; line-height: 13px; white-space: pre;"><br>
</span><div class="gmail_quote">On Fri, Jan 23, 2009 at 4:55 PM, Anthony Minessale <span dir="ltr"><<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Does AST mean Asterisk Open Source PBX ?<br><br>If so, then yes I am familiar with it's archetechure as I am a former developer from that project.<br><br>You have 3 choices with FreeSWITCH<br><br>1) You can open a dedicated connection to mod_event_socket or XMLRPC per call and issue the originate command from there: <br>
This will block until you know for sure the outcome of the
attempt. If it's success it will give you the uuid if not it gives you
the cause code.<br><br>2)
You can use a single mod_event_socket or XMLRPC connection to send all
calls but use the bgapi mechanism which will do the same as above<br>
only asynchronously, The command will return immediately and the
result will be fired as an event that you can pick up on the same or
different event_socket connection or<br> other event consumer such as a custom C,perl,lua etc module.<br>
<br>3) You can use mod_xml_cdr to generate detailed 1-file-per-leg call
files that will tell you when where and why the calls failed or did not
fail.<div><div></div><div><br><br><br><div class="gmail_quote">On Fri, Jan 23, 2009 at 4:39 PM, Michael Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org" target="_blank">msc@freeswitch.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Fri, Jan 23, 2009 at 2:15 PM, Shelby Ramsey <<a href="mailto:sicfslist@gmail.com" target="_blank">sicfslist@gmail.com</a>> wrote:<br>
> Sorry for the double post ... actually hit send too early ...<br>
> OK ... Here goes another I'm doing this with AST ... but I want to move it<br>
> to FS. Searched via google site:<a href="http://lists.freeswitch.org" target="_blank">lists.freeswitch.org</a> auto dialer and others<br>
> ... nothing useful.<br>
> Today I have a platform for auto dialing with AST (centrally managed ...<br>
> about 10 machines) and we do this:<br>
> -- Remote machines query central DB for numbers to call based on certain<br>
> configs<br>
> -- Use AMI to generate the call<br>
> -- If call gets answered, extension info queried via rta (central db<br>
> again)<br>
> The nice thing about all of this is it's relatively easy to manage (through<br>
> one central web interface we built) and it works ... the bad part is<br>
> reporting ...<br>
> So ... conceptually I'm trying to accomplish the same thing ...<br>
> Today we use FS a lot for termination of VoIP traffic ... all done via<br>
> XML_CURL ... which is awesome (not to xml cdr ... and the "proxying" of<br>
> media) ...<br>
> Would like to do something like:<br>
> -- originate request (looks simple enough)<br>
> -- on answer XML_CURL posts info<br>
<br>
</div>Several choices, depending upon how much you want it handled inside<br>
the dialplan vs. handled in the scripting language. For the sake of<br>
testing you could do something like this:<br>
<extension name="ivr-start"><br>
<condition field="destination_number" expression="ivr_whatever"><br>
<action application="set" data="execute_on_answer=transfer<br>
IVR_ANSWER XML default"/><br>
<!-- rest of dialplan --><br>
</condition><br>
</extension><br>
<br>
Then have:<br>
<extension name="ivr-answer"><br>
<condition field="destination_number" expression="IVR_ANSWER"><br>
<action application="lua" data="post-info.lua ${some_important_value}"/><br>
</condition><br>
</extension><br>
<br>
This would have any answered call go to the "ivr-answer" extension<br>
while unanswered calls could stay in the ivr-start extension to get<br>
properly handled. (Busy, no answer, invalid/SIT, etc.)<br>
<br>
You could then have the "ivr-answer" extension do whatever is<br>
appropriate, like listen for digits, play announcement, beg for money,<br>
etc. :)<br>
<br>
-MC<br>
<div><br>
> But for the life of me I can't figure out how to translate this into the xml<br>
> response ...<br>
> [campaign]<br>
> exten => 100,1,ANSWER()<br>
> exten => 100,n,WAIT(2)<br>
> exten => 100,n,BACKGROUND(${SOUND_DIR}/somefile)<br>
> exten => 100,n,WAITEXTEN(10)<br>
> exten => 100,n,HANGUP()<br>
> exten => 1,1,PLAYBACK(goodbye)<br>
> .... and so on ...<br>
> I've looked at the ivr.conf stuff but it's all static and all of this has to<br>
> be manageable via a web interface .... meaning dumping into a DB and<br>
> returning an XML response seems reasonable ... but trying to stick or modify<br>
> static text files from the web interface is too much text parsing and bad<br>
> things will happen ...<br>
> Any thoughts or pointing me in the right direction would be appreciated.<br>
> Shelby<br>
><br>
><br>
><br>
</div>> _______________________________________________<br>
> Freeswitch-users mailing list<br>
> <a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
> <a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>
<br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Anthony Minessale II<br><br>FreeSWITCH <a href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>ClueCon <a href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
<br>AIM: anthm<br><a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net">irc.freenode.net</a> #freeswitch<br><br>FreeSWITCH Developer Conference<br><a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br><a href="http://iax:guest@conference.freeswitch.org/888">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>pstn:213-799-1400<br>