Does anyone have any examples for mod_perl? I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call. There's little if anything of use for this on the Wiki http://wiki.freeswitch.org/wiki/Mod_perl Thanks in advance. Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
But spewing forth dialplans is so much fun! 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. Was there something in particular that you wanted to do? -MC Sent from my iPhone On Sep 13, 2008, at 10:19 AM, Karl Vesterling <kjv@ken-ton.com> wrote:
Does anyone have any examples for mod_perl?
I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call.
There's little if anything of use for this on the Wiki http://wiki.freeswitch.org/wiki/Mod_perl
Thanks in advance.
Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
_______________________________________________ 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
there is also the mod_perl_rosetta page on the wiki that takes a stab at doing asterisk::agi stuff with mod_perl please fix/edit as you go along, thanks ... -wasim On Sun, Sep 14, 2008 at 1:37 AM, Michael S Collins <msc@freeswitch.org>wrote:
But spewing forth dialplans is so much fun!
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.
Was there something in particular that you wanted to do?
-MC
Sent from my iPhone
On Sep 13, 2008, at 10:19 AM, Karl Vesterling <kjv@ken-ton.com> wrote:
Does anyone have any examples for mod_perl?
I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call.
There's little if anything of use for this on the Wiki <http://wiki.freeswitch.org/wiki/Mod_perl> http://wiki.freeswitch.org/wiki/Mod_perl
Thanks in advance.
Best Regards, Karl J. Vesterling <kjv@ken-ton.com>kjv@ken-ton.com 202-448-3009 x0
_______________________________________________ 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://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
-- wasim h. baig | principal consultant | convergence pk | +92 300 8508070
With regard to mod_lua straight from the Wiki changed to mod_perl: -- answer the call session:answer(); -- play a file session:streamFile("/path/to/blah.wav"); -- hangup session:hangup(); mod_perl Equivalent: $session->answer(); ## 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? ## would mod_perl be "killed" in action if that failed, or would it continue running until exit()? ## One could assume: my $AnswerStatus = $session->answer(); ## might contain SOMETHING, but what?? $session->streamFile("/some/path/to/file.wav"); ## This probably does work. $session->hangup(); ## Probably works as well, and we don't care about anything it returns, since it should always return true, right? ##But now for the interesting ones... my $DigitsDialed = $session->read(<magic 8 ball>); ### Evidently the arguments in the lua example of session:read(5,10,"/ path/to/some/file.wav", 3000, "#"); ### mean something with the file.wav probably being the prompt, the 3000 probably being a 3 second timeout, ### and the "#" quite possibly being a terminator to stop taking digits, but 5,10???? Specifically (in one instance) I'm looking to do the following: Check the status of a particular phone/extension, see if it's currently registered, busy, presence, or whatnot. 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. Another for instance: 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. Another for instance: 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. The "caller" dials a particular "extension" that's in their dialplan. 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. Person (A) which is one of (X) receives the call on their (Y) extensions. They Answer one or many of them. They dial their pin. The other numbers/phones (Y) they're at stop ringing and they're dumped into a conference. SUMMARY: 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. Imagine if Perl itself lacked documentation and Larry Wall merely said, "Go forth and play! It's sorta like 'C'!" On Sep 13, 2008, at 3:47 PM, Wasim Baig wrote:
there is also the mod_perl_rosetta page on the wiki that takes a stab at doing asterisk::agi stuff with mod_perl please fix/edit as you go along, thanks ...
-wasim
On Sun, Sep 14, 2008 at 1:37 AM, Michael S Collins <msc@freeswitch.org> wrote: But spewing forth dialplans is so much fun!
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.
Was there something in particular that you wanted to do?
-MC
Sent from my iPhone
On Sep 13, 2008, at 10:19 AM, Karl Vesterling <kjv@ken-ton.com> wrote:
Does anyone have any examples for mod_perl?
I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call.
There's little if anything of use for this on the Wiki http://wiki.freeswitch.org/wiki/Mod_perl
Thanks in advance.
Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
_______________________________________________ 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
-- wasim h. baig | principal consultant | convergence pk | +92 300 8508070 _______________________________________________ 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
Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
See, that's exactly the problem I'm encountering. I have approximately 10 hours / week to invest into Freeswitch. So to invest say 40 hours into Freeswitch takes approximately 1 month. It would be nice to have some documentation of the API instead of having to "explore" and "re-discover". If there are some examples that I can reference to lessen this "discovery" process, I'd definitely take the time to document this in the Wiki, as I did with the ENUM http://wiki.freeswitch.org/wiki/ENUM_support On Sep 13, 2008, at 3:47 PM, Wasim Baig wrote:
there is also the mod_perl_rosetta page on the wiki that takes a stab at doing asterisk::agi stuff with mod_perl please fix/edit as you go along, thanks ...
-wasim
On Sun, Sep 14, 2008 at 1:37 AM, Michael S Collins <msc@freeswitch.org> wrote: But spewing forth dialplans is so much fun!
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.
Was there something in particular that you wanted to do?
-MC
Sent from my iPhone
On Sep 13, 2008, at 10:19 AM, Karl Vesterling <kjv@ken-ton.com> wrote:
Does anyone have any examples for mod_perl?
I'm looking to do more than spew forth an XML dialplan, I want to actually interact with the call.
There's little if anything of use for this on the Wiki http://wiki.freeswitch.org/wiki/Mod_perl
Thanks in advance.
Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
_______________________________________________ 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
-- wasim h. baig | principal consultant | convergence pk | +92 300 8508070 _______________________________________________ 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
Best Regards, Karl J. Vesterling kjv@ken-ton.com 202-448-3009 x0
participants (3)
-
Karl Vesterling
-
Michael S Collins
-
Wasim Baig