<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>With regard to mod_lua straight from the Wiki changed to mod_perl:</div><div><br></div><div><span class="Apple-style-span" style="font-family: -webkit-sans-serif; font-size: 13px; line-height: 19px; "><pre style="padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: dashed; border-right-style: dashed; border-bottom-style: dashed; border-left-style: dashed; border-top-color: rgb(47, 111, 171); border-right-color: rgb(47, 111, 171); border-bottom-color: rgb(47, 111, 171); border-left-color: rgb(47, 111, 171); color: black; background-color: rgb(249, 249, 249); line-height: 1.1em; position: static; z-index: auto; ">-- answer the call
session:answer();
-- play a file
session:streamFile("/path/to/blah.wav");
-- hangup
session:hangup();</pre></span></div><div>mod_perl Equivalent:</div><div><br></div><div>$session->answer();</div><div>## I wonder what gets returned if the call failed to answer. Let's say late negotiation is enabled, and it fails for that reason, how would I know what the cause was?</div><div>## would mod_perl be "killed" in action if that failed, or would it continue running until exit()?</div><div><br></div><div>## One could assume:</div><div>my $AnswerStatus = $session->answer();</div><div>## might contain SOMETHING, but what??</div><div><br></div><div>$session->streamFile("/some/path/to/file.wav");</div><div>## This probably does work.</div><div><br></div><div>$session->hangup();</div><div>## Probably works as well, and we don't care about anything it returns, since it should always return true, right?</div><div><br></div><div>##But now for the interesting ones...</div><div>my $DigitsDialed = $session->read(<magic 8 ball>);</div><div>### Evidently the arguments in the lua example of session:read(5,10,"/path/to/some/file.wav", 3000, "#"); </div><div>### mean something with the file.wav probably being the prompt, the 3000 probably being a 3 second timeout, </div><div>### and the "#" quite possibly being a terminator to stop taking digits, but 5,10????</div><div><br></div><div>Specifically (in one instance) I'm looking to do the following:</div><div>Check the status of a particular phone/extension, see if it's currently registered, busy, presence, or whatnot.</div><div>Depending on the "condition" of that phone, and quite possibly the time of day in the time zone the phone is in, do something. As to that something, well that'd be determined by what information I could obtain from the phone/user.</div><div><br></div><div><b><span class="Apple-style-span" style="text-decoration: underline;">Another for instance:</span></b></div><div>For some incoming calls, I'd like to check to see if it's encrypted, and if it is, then and ONLY then, send it on through, otherwise call the extension, play a recording that the call is NOT encrypted, and they dial (X) to answer of (Y) to do something else etc... At that point I might wish to record the non-encrypted call for review by someone should a need arise in the future, or if indicated in a DB somewhere. Depending on the location (physical location) of the remote phone, I might have to play a recording notifying at least ONE party or BOTH parties that the call is being recorded.</div><div><br></div><div><b><span class="Apple-style-span" style="text-decoration: underline;">Another for instance:</span></b></div><div>Outbound calls kind of like tele-marketing, but not. What's that mean? Think of it as an intelligent phone-tree that initiates a conference amongst many participants.</div><div>The "caller" dials a particular "extension" that's in their dialplan.</div><div>That extension kicks off an (for the lack of a better word) AGI, kind of like an intercom, but branches out to (X) people, who may be at (Y) numbers.</div><div><br></div><div>Person (A) which is one of (X) receives the call on their (Y) extensions.</div><div>They Answer one or many of them.</div><div>They dial their pin.</div><div>The other numbers/phones (Y) they're at stop ringing and they're dumped into a conference.</div><div><br></div><div><b><span class="Apple-style-span" style="text-decoration: underline;">SUMMARY:</span></b></div><div>There's lots of stuff to write, but little if anything that doesn't involve hours upon hours of experimentation which sorry to say makes the learning curve too steep.</div><div>Imagine if Perl itself lacked documentation and Larry Wall merely said, "Go forth and play! It's sorta like 'C'!"</div><div><br></div><div><br></div><br><div><div>On Sep 13, 2008, at 3:47 PM, Wasim Baig wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">there is also the mod_perl_rosetta page on the wiki that takes a stab at doing asterisk::agi stuff with mod_perl<br>please fix/edit as you go along, thanks ...<br><br>-wasim<br><br><div class="gmail_quote">On Sun, Sep 14, 2008 at 1:37 AM, Michael S Collins <span dir="ltr"><<a href="mailto:msc@freeswitch.org">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 bgcolor="#FFFFFF"><div>But spewing forth dialplans is so much fun!</div><div><br></div> <div>Okay one thing I can say is that mod_perl is very similar to mod_lua so there value in studying the mod_lua wiki page. </div><div><br></div><div>Was there something in particular that you wanted to do?</div><div><br> </div><div>-MC<br><br>Sent from my iPhone</div><div><br>On Sep 13, 2008, at 10:19 AM, Karl Vesterling <<a href="mailto:kjv@ken-ton.com" target="_blank">kjv@ken-ton.com</a>> wrote:<br><br></div><div></div><blockquote type="cite"> <div><div><br></div><div>Does anyone have any examples for mod_perl?</div><div><br></div><div>I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call.</div><div><br></div><div> There's little if anything of use for this on the Wiki</div><div><a href="http://wiki.freeswitch.org/wiki/Mod_perl" target="_blank"></a><a href="http://wiki.freeswitch.org/wiki/Mod_perl" target="_blank">http://wiki.freeswitch.org/wiki/Mod_perl</a></div> <div><br></div><div>Thanks in advance.</div><div><br></div><br><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style=""> <div><div>Best Regards,</div><div>Karl J. Vesterling</div><div><a href="mailto:kjv@ken-ton.com" target="_blank"></a><a href="mailto:kjv@ken-ton.com" target="_blank">kjv@ken-ton.com</a></div><div>202-448-3009 x0</div></div> </div></span> </div><br></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Freeswitch-users mailing list</span><br><span><a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a></span><br> <span><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a></span><br><span>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank"></a><a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a></span><br> <span><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span><br></div></blockquote></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>wasim h. baig | principal consultant | convergence pk | +92 300 8508070<br> </div> _______________________________________________<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">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>Best Regards,</div><div>Karl J. Vesterling</div><div><a href="mailto:kjv@ken-ton.com">kjv@ken-ton.com</a></div><div>202-448-3009 x0</div></div></div></span> </div><br></body></html>