I apologize, as my first post to this list, that I ask a detailed set of questions, but I have spend some time looking at all the docs and can't get what I need to do completely sorted in my head. I am definitely one who likes to UNDERSTAND what is happening rather than follow blank recipies, so please bear with me as I try understand all the details. I do understand about networking, NAT etc - but I am new to SIP/RTP and in particular what I think is a double NAT problem Firstly - what am I trying to achieve: I am in the UK and have a small home network behind a D-Link DIR-100 Router/NAT/Firewall one of those machines, running Debian Lenny, acts as my main server for everything (and in an earlier incarnation was the firewall/router/nat box too - I only say this is because I had all this working using Asterisk a year or so ago, but with this important difference in configuration). Many of the ports on the firewall are port forwarded to this machine. I have set Freeswitch up on this server to act as a small voip pbx for the home - but MORE IMPORTANTLY - to enable my daughter from her house to talk to us. At my house locally I have a Linksys PAP2T two phone SIP box - and that is working with Freeswitch's default configuration (I set up to be 1000 and 1001 and used all the facilities). I will later add a Linksys SPA 3102 - although I DO NOT intend to use its facility to bridge to the normal phone network. My daughter, living in another house, also has a Nat box (unknown - its part of her ADSL modem/router/wireless access point) and also has a PAP2T which she will connect to the her network. This will be her phone. There is a family relation living in Australia who will load up a whatever softphone that we tell him to use. I expect, but don't know, that he will behind a NAT box too. Later, I have some friends in the USA that I might wish to add it too - especially so that we can hold some teleconferences. They will have a mixture of Windows and MACs, and I will need to recommend softphone clients for them. I want to set this up as a small private voice network, so anyone can ring anyone else. I will add fancy facilities such as conferencing and voicemail later - I just want to get the basics working first. Secondly I installed a stun client on my home machine and ran it against stun.freeswitch.org. It reported:- Primary: Independent Mapping, Independent Filter, preserves ports, no hairpin But I have no idea what this means - I can't find any clear statement via googling for it - how this set of answers maps to the different types of NAT that might be required to get this to all work. CAN SOMEONE ENLIGHTEN me please. Thirdly I have set up a sip profile called "double nat" from the recipe in the wiki. This defines the SIP port to be 5090. However, what I DO NOT UNDERSTAND is how the PAP2T box in my daughters house will initiate a connection to my server. Presumably, I have to port forward 5090 from the nat box to my server. IS THAT CORRECT? I also assume I will have to tell her to use STUN (I believe this is an option on the PAP2T) Fourthly If I understand SIP correctly, it just initiates the session and the two end points then communicate directly via RTP. What I don't understand is how does a session transition from SIP to RTP via the connection set up in the the first phase (in terms of passing through the NAT boxes). In particular WHICH OF THE TEST RESULTS from my stun client indicate it will do the right thing. (I am going to take a laptop to my daughters house with a stun client in to test her network this weekend). Could someone explain please. Fifthly Is there a recommended SIP softphone with all the right facilities (STUN support?) that works on MAC and WINDOWS (I only use linux myself). Apologies for the length of this. I am eager to get the answers so I can use an opportunity this weekend to get it working. -- Alan Chandler http://www.chandlerfamily.org.uk
What a long detailed list of todos. You certainly can't find that kind of answers in here.
I apologize, as my first post to this list, that I ask a detailed set of questions, but I have spend some time looking at all the docs and can't get what I need to do completely sorted in my head. I am definitely one who likes to UNDERSTAND what is happening rather than follow blank recipies, so please bear with me as I try understand all the details. I do understand about networking, NAT etc - but I am new to SIP/RTP and in particular what I think is a double NAT problem
Firstly - what am I trying to achieve:
I am in the UK and have a small home network behind a D-Link DIR-100 Router/NAT/Firewall one of those machines, running Debian Lenny, acts as my main server for everything (and in an earlier incarnation was the firewall/router/nat box too - I only say this is because I had all this working using Asterisk a year or so ago, but with this important difference in configuration). Many of the ports on the firewall are port forwarded to this machine. I have set Freeswitch up on this server to act as a small voip pbx for the home - but MORE IMPORTANTLY - to enable my daughter from her house to talk to us. At my house locally I have a Linksys PAP2T two phone SIP box - and that is working with Freeswitch's default configuration (I set up to be 1000 and 1001 and used all the facilities). I will later add a Linksys SPA 3102 - although I DO NOT intend to use its facility to bridge to the normal phone network.
My daughter, living in another house, also has a Nat box (unknown - its part of her ADSL modem/router/wireless access point) and also has a PAP2T which she will connect to the her network. This will be her phone.
There is a family relation living in Australia who will load up a whatever softphone that we tell him to use. I expect, but don't know, that he will behind a NAT box too.
Later, I have some friends in the USA that I might wish to add it too - especially so that we can hold some teleconferences. They will have a mixture of Windows and MACs, and I will need to recommend softphone clients for them.
I want to set this up as a small private voice network, so anyone can ring anyone else. I will add fancy facilities such as conferencing and voicemail later - I just want to get the basics working first.
Secondly
I installed a stun client on my home machine and ran it against stun.freeswitch.org.
It reported:-
Primary: Independent Mapping, Independent Filter, preserves ports, no hairpin
But I have no idea what this means - I can't find any clear statement via googling for it - how this set of answers maps to the different types of NAT that might be required to get this to all work. CAN SOMEONE ENLIGHTEN me please.
Thirdly
I have set up a sip profile called "double nat" from the recipe in the wiki. This defines the SIP port to be 5090.
However, what I DO NOT UNDERSTAND is how the PAP2T box in my daughters house will initiate a connection to my server. Presumably, I have to port forward 5090 from the nat box to my server. IS THAT CORRECT?
I also assume I will have to tell her to use STUN (I believe this is an option on the PAP2T)
Fourthly
If I understand SIP correctly, it just initiates the session and the two end points then communicate directly via RTP. What I don't understand is how does a session transition from SIP to RTP via the connection set up in the the first phase (in terms of passing through the NAT boxes). In particular WHICH OF THE TEST RESULTS from my stun client indicate it will do the right thing. (I am going to take a laptop to my daughters house with a stun client in to test her network this weekend).
Could someone explain please.
Fifthly
Is there a recommended SIP softphone with all the right facilities (STUN support?) that works on MAC and WINDOWS (I only use linux myself).
Apologies for the length of this. I am eager to get the answers so I can use an opportunity this weekend to get it working.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ 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
Alan Chandler <alan@chandlerfamily.org.uk> wrote:
I want to set this up as a small private voice network, so anyone can ring anyone else. I will add fancy facilities such as conferencing and voicemail later - I just want to get the basics working first.
I have a similar arrangement operating here which involves friends and colleagues in the U.S., as well as a local VoIP provider that gives me access to the PSTN. To eliminate NAT issues, we are using IPv6: each of us has an IPv6 over IPv4 tunnel configured to provide access to the IPv6 Internet. NAT and all the problems associated with it go away. Another option, although I don't know how well real-time communication works in this setting, would be to create a VPN using, for example, OpenVPN so that the clients and server all appear to be on the same lan. Alternatively, you could play with port forwarding and FreeSWITCH settings in an attempt to work around the nat issues - good luck! I can't answer any questions about MacOS or Windows softphones - there are no MacOS or Windows machines in my life.
Hi Alan, I hope you find your answers here as these are the sort of things that are hard to find on the wiki, which is somewhat outdated in areas. If you do find your answers, please post them back here for everyone else. I am new to FS also, so my comments below may not be 100% correct! 1. Very similar to what I want to have setup as well. Do you have a static IP address at home. If not, get a dyndns account and setup an entry there so that your friends/family can register using your dns name instead of ip address 2. No idea. Maybe try another stun server? 3. Not sure if double-NAT is needed now with the newer builds of FreeSwitch. Download the latest 1.0.4 to be on the safeside and compile it again! (I have FS 1.0.4 pre9 and it works I think). As long as your clients can register remotely you should be okay. I think FS can work around most home NATs. Make sure you have auto-nat set in your internal.xml file (I think its this one) 4. SIP is the signaling. RTP is the payload, or voice in your case. Any transition is done via the SIP signaling. This is how FS can transfer calls etc or use the media bypass mode by specifying the IP address where the RTP should be sent, which does not have to be the same as the signaling. Make sure you enable tracing in the internal.xml file so you can debug the signaling. You don't need to take a laptop to your daughters to test this. Use an internet sip phone like flaphone.com, which works through your web browser. This will register with an external IP address exactly like your daughters and save you time traveling. Note that sound isn't so clear for me using this service, but it helps with debugging. I also would recommend a sip client on windows like Zoiper, or CounterPath's X-Lite.. both are free. X-Lite is well known, Zoiper allows for multiple SIP registrations and comes in a portable version. On Fri, Aug 7, 2009 at 6:18 PM, Alan Chandler<alan@chandlerfamily.org.uk> wrote:
I apologize, as my first post to this list, that I ask a detailed set of questions, but I have spend some time looking at all the docs and can't get what I need to do completely sorted in my head. I am definitely one who likes to UNDERSTAND what is happening rather than follow blank recipies, so please bear with me as I try understand all the details. I do understand about networking, NAT etc - but I am new to SIP/RTP and in particular what I think is a double NAT problem
Firstly - what am I trying to achieve:
I am in the UK and have a small home network behind a D-Link DIR-100 Router/NAT/Firewall one of those machines, running Debian Lenny, acts as my main server for everything (and in an earlier incarnation was the firewall/router/nat box too - I only say this is because I had all this working using Asterisk a year or so ago, but with this important difference in configuration). Many of the ports on the firewall are port forwarded to this machine. I have set Freeswitch up on this server to act as a small voip pbx for the home - but MORE IMPORTANTLY - to enable my daughter from her house to talk to us. At my house locally I have a Linksys PAP2T two phone SIP box - and that is working with Freeswitch's default configuration (I set up to be 1000 and 1001 and used all the facilities). I will later add a Linksys SPA 3102 - although I DO NOT intend to use its facility to bridge to the normal phone network.
My daughter, living in another house, also has a Nat box (unknown - its part of her ADSL modem/router/wireless access point) and also has a PAP2T which she will connect to the her network. This will be her phone.
There is a family relation living in Australia who will load up a whatever softphone that we tell him to use. I expect, but don't know, that he will behind a NAT box too.
Later, I have some friends in the USA that I might wish to add it too - especially so that we can hold some teleconferences. They will have a mixture of Windows and MACs, and I will need to recommend softphone clients for them.
I want to set this up as a small private voice network, so anyone can ring anyone else. I will add fancy facilities such as conferencing and voicemail later - I just want to get the basics working first.
Secondly
I installed a stun client on my home machine and ran it against stun.freeswitch.org.
It reported:-
Primary: Independent Mapping, Independent Filter, preserves ports, no hairpin
But I have no idea what this means - I can't find any clear statement via googling for it - how this set of answers maps to the different types of NAT that might be required to get this to all work. CAN SOMEONE ENLIGHTEN me please.
Thirdly
I have set up a sip profile called "double nat" from the recipe in the wiki. This defines the SIP port to be 5090.
However, what I DO NOT UNDERSTAND is how the PAP2T box in my daughters house will initiate a connection to my server. Presumably, I have to port forward 5090 from the nat box to my server. IS THAT CORRECT?
I also assume I will have to tell her to use STUN (I believe this is an option on the PAP2T)
Fourthly
If I understand SIP correctly, it just initiates the session and the two end points then communicate directly via RTP. What I don't understand is how does a session transition from SIP to RTP via the connection set up in the the first phase (in terms of passing through the NAT boxes). In particular WHICH OF THE TEST RESULTS from my stun client indicate it will do the right thing. (I am going to take a laptop to my daughters house with a stun client in to test her network this weekend).
Could someone explain please.
Fifthly
Is there a recommended SIP softphone with all the right facilities (STUN support?) that works on MAC and WINDOWS (I only use linux myself).
Apologies for the length of this. I am eager to get the answers so I can use an opportunity this weekend to get it working.
-- Alan Chandler http://www.chandlerfamily.org.uk
_______________________________________________ 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
Mark Campbell-Smith wrote:
Hi Alan,
I hope you find your answers here as these are the sort of things that are hard to find on the wiki, which is somewhat outdated in areas. If you do find your answers, please post them back here for everyone else.
I am new to FS also, so my comments below may not be 100% correct!
1. Very similar to what I want to have setup as well. Do you have a static IP address at home. If not, get a dyndns account and setup an entry there so that your friends/family can register using your dns name instead of ip address
Thanks for the idea - but I am way ahead on this. My IP address is allocated by dhcp, but since my router stays switched on 24/7, and even powering it off for short periods doesn't change things. It has not changed for maybe a year. So I own my own domain name (chandlerfamily.org.uk) and can point home.chandlerfamily.org.uk at my ip address. If it ever changes, I can go to my domain name provider and change my dns entry very easily. You can in fact tell freeswitch to ignore the domain names used by the clients with the two parameters in the internal sip profile <!--all inbound reg will look in this domain for the users --> <param name="force-register-domain" value="$${domain}"/> <!--all inbound reg will stored in the db using this domain --> <param name="force-register-db-domain" value="$${domain}"/> (This is from the new 1.0.4 version of freeswitch) After a discussion on IRC I decided to set $${domain} to chandlerfamily.org.uk so theoretically all my phones have addresses extn-no@chandlerfamily.org.uk And in the pap2t box I am using tell it to use chandlerfamily.org.uk as its "proxy" and home.chandlerfamily.org.uk as its "outgoing proxy" - for phones outside the NAT box. Inside my home I use the internal name of the freeswitch box as the "outgoing proxy".
2. No idea. Maybe try another stun server?
I still don't have any answers to this, but it doesn't appear to be important
3. Not sure if double-NAT is needed now with the newer builds of FreeSwitch. Download the latest 1.0.4 to be on the safeside and compile it again! (I have FS 1.0.4 pre9 and it works I think). As long as your clients can register remotely you should be okay. I think FS can work around most home NATs. Make sure you have auto-nat set in your internal.xml file (I think its this one)
I have 1.0.4 installed as of yesterday, and it appears to be working. My daughter still has to change the user id's inside her PAP2T box to numbers as I could not make the "number-alias" function work - so although the sip part appears to work, I have still to find out if the voice part does.
4. SIP is the signaling. RTP is the payload, or voice in your case. Any transition is done via the SIP signaling. This is how FS can transfer calls etc or use the media bypass mode by specifying the IP address where the RTP should be sent, which does not have to be the same as the signaling. Make sure you enable tracing in the internal.xml file so you can debug the signaling.
You don't need to take a laptop to your daughters to test this. Use an internet sip phone like flaphone.com, which works through your web browser. This will register with an external IP address exactly like your daughters and save you time traveling. Note that sound isn't so clear for me using this service, but it helps with debugging.
I also would recommend a sip client on windows like Zoiper, or CounterPath's X-Lite.. both are free. X-Lite is well known, Zoiper allows for multiple SIP registrations and comes in a portable version.
I used zoiper before as an iax client - so I'll look again at this -- Alan Chandler http://www.chandlerfamily.org.uk
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
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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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> 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 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
A cut&paste of a gmail search for "label:voip hijack". The subjects seem to be ok 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:50Greg .. 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 5mashudi, 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 -- Meet us at ClueCon! http://www.cluecon.com … Jun 23Tim .. 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> wrote: From: Michael Collins <msc@freeswitch.org> Subject: Re … Jun 8Lars .. 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 Thanks, Brian On May 7, 2009, at 8:13 PM, Lars Zeb wrote: I … May 8wchao 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 4Chris, 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 30Chris, 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 15Valentin, 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 ConversationsSelect: All, None, Read, Unread, Starred, Unstarred Regards, Raffaele On Sat, Aug 8, 2009 at 18:50, Raffaele P. Guidi <raffaele.p.guidi@gmail.com>wrote:
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> 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 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
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:
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:
> 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 <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 <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
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> wrote:
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:
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:
> 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 <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 <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
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:
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> wrote: 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:
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:
> 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 <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 <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
_______________________________________________ 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
I did that. And I do find it quite amusing :D On Sat, Aug 8, 2009 at 21:09, Chad Phillips -- Apartment Lines < chad@apartmentlines.com> wrote:
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:
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> wrote:
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:
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:
> 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 <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 <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
_______________________________________________ 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
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:
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 Aug 8, 2009, at 11:59 AM, Brian West wrote:
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...
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 :)
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:
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
participants (9)
-
Alan Chandler
-
Brian West
-
Chad Phillips -- Apartment Lines
-
demuel@thephinix.org
-
Jason White
-
Mark Campbell-Smith
-
Michael Jerris
-
Raffaele P. Guidi
-
Stefan Knoblich