VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
chad at apartmentlines... Guest
|
Posted: Sat Aug 08, 2009 10:21 am Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..
"\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Sat Aug 08, 2009 11:07 am Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..
"\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
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 |
|
Back to top |
|
|
raffaele.p.guidi at gm... Guest
|
Posted: Sat Aug 08, 2009 11:54 am Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
Brian, I've read 8-9 of your emails asking to not hijack threads in threads where this it didn't happen (like this). I see this as a new thread with a single message (plus yours, of course) inside with "[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is playing" as the subject - and I think is quite relevant to the message. I suspect you have something wrong in your email client (mine is gmail) or server and suggest you to give it a check.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote: | Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..
"\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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
|
|
|
Back to top |
|
|
raffaele.p.guidi at gm... Guest
|
Posted: Sat Aug 08, 2009 11:59 am Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
A cut&paste of a gmail search for "label:voip hijack". The subjects seem to be ok
[img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Chad, Brian, Raffaele (3)
liste.voip
Â
[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is playing‎ - … please DO NOT hijack threads. You can't click reply, change the subject as it messes up the …
 18:50 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Greg .. Brian, Michael (6)
liste.voip
Â
[Freeswitch-users] phpmod compile error‎ - … Please don't hijack threads... please click new message and start a new thread. Thanks …
 Aug 5 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] mashudi, Brian (2)
liste.voip
Â
[Freeswitch-users] video playback on FS‎ - … btw don't hijack threads please. thank you in advanced, best regard, mashudi Brian West brian@freeswitch.org (brian@freeswitch.org) -- Meet us at ClueCon! http://www.cluecon.com …
 Jun 23 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Tim .. Michael, Chris (4)
liste.voip
Â
[Freeswitch-users] Routing 911 calls‎ - … p.s. Sorry to hijack the thread. --- On Mon, 6/8/09, Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> wrote: From: Michael Collins <msc@freeswitch.org (msc@freeswitch.org)> Subject: Re …
 Jun 8 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Lars .. Brian, Michael (13)
liste.voip
Â
[Freeswitch-users] Total noob question‎ - … please do not hijack threads.. Click new message and input the address freeswitch-users@lists.freeswitch.org (freeswitch-users@lists.freeswitch.org) Thanks, Brian On May 7, 2009, at 8:13 PM, Lars Zeb wrote: I …
 May 8 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] wchao
liste.voip
Â
[Freeswitch-users] Registration problem with multiple IP phones behind Linux NAT firewa...‎ - … is trying to hijack phone A's registration. The packet capture was taken when running Freeswitch 1.0.4pre4, but I subsequently upgraded to 1.0.4pre6 and it didn't …
 May 4 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Chris, Brian, Anthony (3)
liste.voip
Â
[Freeswitch-users] Audio delay when conferencing‎ - … Also don't hijack threads please! /b On Apr 30, 2009, at 3:54 PM, Chris Fowler wrote: I'm using FreeSWITCH (Build 13168M) and we're having intermittent …
 Apr 30 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Chris, Brian (2)
liste.voip
Â
[Freeswitch-users] mod_fifo uuid_transfer into mod_conference audio issue‎ - … PLEASE do not hijack threads. You clicked reply.. cleared the body and the subject and sent the message. DO NOT DO THAT. Please click new message and input freeswitch …
 Apr 15 [img]images/cleardot.gif[/img] [img]images/cleardot.gif[/img] Valentin, Brian, Anthony (3)
liste.voip
Â
[Freeswitch-users] Nokia N800‎ - … please do not hijack threads... you clicked reply, changed the subject and body which causes it to thread your message with the original posters thread. So please in the …
 Apr 1
Conversations Select: All, None, Read, Unread, Starred, Unstarred
Regards,
  Raffaele
On Sat, Aug 8, 2009 at 18:50, Raffaele P. Guidi <raffaele.p.guidi@gmail.com (raffaele.p.guidi@gmail.com)> wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in threads where this it didn't happen (like this). I see this as a new thread with a single message (plus yours, of course) inside with "[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is playing" as the subject - and I think is quite relevant to the message. I suspect you have something wrong in your email client (mine is gmail) or server and suggest you to give it a check.
Regards,
  Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org (brian@freeswitch.org)> wrote:
Quote: | Examples exist in the scripts/lua folder called callback.lua. Â Also
please DO NOT hijack threads. Â You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. Â the same callback _does_ catch DTMF when i use
session:streamFile() to play something. Â is there some other way to do
it?
below is an example of how i'm doing it now. Â when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
   if input_type == "dtmf" then
       freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..
"\n")
   end
end
if session:ready() then
   session:answer()
   session:execute("sleep", "1000")
   session:setInputCallback("key_press", "")
   session:streamFile("voicemail/vm-mailbox_full.wav")
   session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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
|
|
|
|
Back to top |
|
|
chad at apartmentlines... Guest
|
Posted: Sat Aug 08, 2009 12:22 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
On Aug 8, 2009, at 11:59 AM, Brian West wrote:
Quote: | Examples exist in the scripts/lua folder called callback.lua.
|
i read this example code, but it doesn't seem to really address my
question. if you re-read the code and explanation that i posted
earlier, the input callback is working when i do something like
session:streamFile("blah"), but *not* when i do something like
session:execute("phrase", "blah,args")). to be clear, the phrase
plays just fine, but when i press keys during the phrase playback, the
input callback doesn't get fired. am i missing something obvious
here? you should be able to drop that code in that i provided earlier
to verify what i'm talking about.
one thing i will add is that i'm using portaudio for making the call
and sending the DTMF. i'll try testing this out with a regular sip
client and see if the same thing occurs...
Quote: | Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
|
sorry, i've never had that problem before -- i can certainly adjust
_______________________________________________
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 |
|
Back to top |
|
|
stkn at freeswitch.org Guest
|
Posted: Sat Aug 08, 2009 1:06 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
His message was a direct reply to Alan Chandler's mail and Brian's mail client is working perfectly fine
(as are both of my mail clients).
Look at the Message-Id and In-Reply-To headers of the mails if you still think our clients are broken
stkn
Raffaele P. Guidi wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in
threads where this it didn't happen (like this). I see this as a new
thread with a single message (plus yours, of course) inside with
"[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is
playing" as the subject - and I think is quite relevant to the message.
I suspect you have something wrong in your email client (mine is gmail)
or server and suggest you to give it a check.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org
<mailto:brian@freeswitch.org>> wrote:
Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " ..
| data["digit"] ..
Quote: | "\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
| <mailto:FreeSWITCH-users@lists.freeswitch.org>
Quote: | http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
| UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
Quote: | http://www.freeswitch.org
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
<mailto: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
|
_______________________________________________
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 |
|
Back to top |
|
|
raffaele.p.guidi at gm... Guest
|
Posted: Sat Aug 08, 2009 1:53 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
Uh, oh, ok. Message-Id and In-Reply-To headers don't mean too much in a gmail world (I think gmail does a better job than any other mail client). Well, at least I understood what Brian was talking about, thanks.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 20:01, Stefan Knoblich <stkn@freeswitch.org (stkn@freeswitch.org)> wrote:
Quote: | His message was a direct reply to Alan Chandler's mail and Brian's mail client is working perfectly fine
(as are both of my mail clients).
Look at the Message-Id and In-Reply-To headers of the mails if you still think our clients are broken
stkn
Raffaele P. Guidi wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in
threads where this it didn't happen (like this). I see this as a new
thread with a single message (plus yours, of course) inside with
"[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is
playing" as the subject - and I think is quite relevant to the message.
I suspect you have something wrong in your email client (mine is gmail)
or server and suggest you to give it a check.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org (brian@freeswitch.org)
|
Quote: | <mailto:brian@freeswitch.org (brian@freeswitch.org)>> wrote:
Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
> in a lua script, i've tried using session:setInputCallback() to catch
> DTMF tones while a phrase macro is playing, but it doesn't seem to
> work. the same callback _does_ catch DTMF when i use
> session:streamFile() to play something. is there some other way to do
> it?
>
> below is an example of how i'm doing it now. when voicemail/vm-
> mailbox_full.wav plays, i see key presses being printed to the
> console, but when the phrase plays, no key presses are displayed.
>
> function key_press(session, input_type, data)
> if input_type == "dtmf" then
> freeswitch.consoleLog("info", "Key pressed: " ..
data["digit"] ..
> "\n")
> end
> end
>
> if session:ready() then
> session:answer()
> session:execute("sleep", "1000")
> session:setInputCallback("key_press", "")
> session:streamFile("voicemail/vm-mailbox_full.wav")
> session:execute("phrase", "voicemail_menu,1:2:3:#")
> end
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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
|
|
|
Back to top |
|
|
chad at apartmentlines... Guest
|
Posted: Sat Aug 08, 2009 2:13 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
does anybody else find it amusing that my thread about Lua scripting was hijacked by people talking about hijacking threads??
/me waits patiently for discussion on the topic
On Aug 8, 2009, at 2:48 PM, Raffaele P. Guidi wrote:
Quote: | Uh, oh, ok. Message-Id and In-Reply-To headers don't mean too much in a gmail world (I think gmail does a better job than any other mail client). Well, at least I understood what Brian was talking about, thanks.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 20:01, Stefan Knoblich <stkn@freeswitch.org (stkn@freeswitch.org)> wrote:
Quote: | His message was a direct reply to Alan Chandler's mail and Brian's mail client is working perfectly fine
(as are both of my mail clients).
Look at the Message-Id and In-Reply-To headers of the mails if you still think our clients are broken
stkn
Raffaele P. Guidi wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in
threads where this it didn't happen (like this). I see this as a new
thread with a single message (plus yours, of course) inside with
"[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is
playing" as the subject - and I think is quite relevant to the message.
I suspect you have something wrong in your email client (mine is gmail)
or server and suggest you to give it a check.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org (brian@freeswitch.org)
|
Quote: | <mailto:brian@freeswitch.org (brian@freeswitch.org)>> wrote:
Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " ..
| data["digit"] ..
Quote: | "\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
|
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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
|
|
|
Back to top |
|
|
raffaele.p.guidi at gm... Guest
|
Posted: Sat Aug 08, 2009 2:54 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
I did that. And I do find it quite amusing
On Sat, Aug 8, 2009 at 21:09, Chad Phillips -- Apartment Lines <chad@apartmentlines.com (chad@apartmentlines.com)> wrote:
Quote: | does anybody else find it amusing that my thread about Lua scripting was hijacked by people talking about hijacking threads??
/me waits patiently for discussion on the topic
On Aug 8, 2009, at 2:48 PM, Raffaele P. Guidi wrote:
Quote: | Uh, oh, ok. Message-Id and In-Reply-To headers don't mean too much in a gmail world (I think gmail does a better job than any other mail client). Well, at least I understood what Brian was talking about, thanks.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 20:01, Stefan Knoblich <stkn@freeswitch.org (stkn@freeswitch.org)> wrote:
Quote: | His message was a direct reply to Alan Chandler's mail and Brian's mail client is working perfectly fine
(as are both of my mail clients).
Look at the Message-Id and In-Reply-To headers of the mails if you still think our clients are broken
stkn
Raffaele P. Guidi wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in
threads where this it didn't happen (like this). I see this as a new
thread with a single message (plus yours, of course) inside with
"[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is
playing" as the subject - and I think is quite relevant to the message.
I suspect you have something wrong in your email client (mine is gmail)
or server and suggest you to give it a check.
Regards,
Raffaele
On Sat, Aug 8, 2009 at 17:59, Brian West <brian@freeswitch.org (brian@freeswitch.org)
|
Quote: | <mailto:brian@freeswitch.org (brian@freeswitch.org)>> wrote:
Examples exist in the scripts/lua folder called callback.lua. Also
please DO NOT hijack threads. You can't click reply, change the
subject as it messes up the mailing list threading and most mail
readers will thread it incorrectly.
Thanks,
Brian
On Aug 8, 2009, at 10:15 AM, Chad Phillips -- Apartment Lines wrote:
> in a lua script, i've tried using session:setInputCallback() to catch
> DTMF tones while a phrase macro is playing, but it doesn't seem to
> work. the same callback _does_ catch DTMF when i use
> session:streamFile() to play something. is there some other way to do
> it?
>
> below is an example of how i'm doing it now. when voicemail/vm-
> mailbox_full.wav plays, i see key presses being printed to the
> console, but when the phrase plays, no key presses are displayed.
>
> function key_press(session, input_type, data)
> if input_type == "dtmf" then
> freeswitch.consoleLog("info", "Key pressed: " ..
data["digit"] ..
> "\n")
> end
> end
>
> if session:ready() then
> session:answer()
> session:execute("sleep", "1000")
> session:setInputCallback("key_press", "")
> session:streamFile("voicemail/vm-mailbox_full.wav")
> session:execute("phrase", "voicemail_menu,1:2:3:#")
> end
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
|
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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 (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
|
|
|
Back to top |
|
|
mike at jerris.com Guest
|
Posted: Sat Aug 08, 2009 3:23 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
use the SayPhrase method of sessin instead of executing the phrase
application then your input callback should work as expected.
Mike
On Aug 8, 2009, at 11:15 AM, Chad Phillips -- Apartment Lines wrote:
Quote: | in a lua script, i've tried using session:setInputCallback() to catch
DTMF tones while a phrase macro is playing, but it doesn't seem to
work. the same callback _does_ catch DTMF when i use
session:streamFile() to play something. is there some other way to do
it?
below is an example of how i'm doing it now. when voicemail/vm-
mailbox_full.wav plays, i see key presses being printed to the
console, but when the phrase plays, no key presses are displayed.
function key_press(session, input_type, data)
if input_type == "dtmf" then
freeswitch.consoleLog("info", "Key pressed: " .. data["digit"] ..
"\n")
end
end
if session:ready() then
session:answer()
session:execute("sleep", "1000")
session:setInputCallback("key_press", "")
session:streamFile("voicemail/vm-mailbox_full.wav")
session:execute("phrase", "voicemail_menu,1:2:3:#")
end
|
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Sat Aug 08, 2009 8:26 pm Post subject: [Freeswitch-users] how to catch DTMF in Lua while a phrase m |
|
|
Yes it happens 100% of the time I say not to do it..
Example this thread started with:
In-Reply-To: <4A7BE35B.8010709@chandlerfamily.org.uk>
References: <4A7BE35B.8010709@chandlerfamily.org.uk>
The hijacked thread has:
References: <4A7BE35B.8010709@chandlerfamily.org.uk>
<33c87fa30908072139m9444779w80f5908fa624e9de@mail.gmail.com>
<4A7D8C26.4020408@chandlerfamily.org.uk>
<BC708A39-BA09-4524-A072-92A5E5A870F3@apartmentlines.com>
<96ADFBB4-A015-417A-B0AD-2C427376E010@freeswitch.org>
<b0a8792f0908080950w107ca4b9jedff8cafc27ed0de@mail.gmail.com>
Which causes it to thread it via the References header.
Hence it was hijacked.
/b
On Aug 8, 2009, at 11:50 AM, Raffaele P. Guidi wrote:
Quote: | Brian, I've read 8-9 of your emails asking to not hijack threads in
threads where this it didn't happen (like this). I see this as a new
thread with a single message (plus yours, of course) inside with
"[Freeswitch-users] how to catch DTMF in Lua while a phrase macro is
playing" as the subject - and I think is quite relevant to the
message. I suspect you have something wrong in your email client
(mine is gmail) or server and suggest you to give it a check.
Regards,
Raffaele
|
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|