From j.dierx at microfilms.fr Mon Oct 8 08:47:24 2007 From: j.dierx at microfilms.fr (=?ISO-8859-1?Q?J=E9r=E9my?= DIERX) Date: Mon, 08 Oct 2007 14:47:24 +0200 Subject: [Telegraph-users] Mongrel and mongrel cluster with Telegraph (and load balancing). Message-ID: <1191847644.6211.11.camel@UBUNTU-PLAN9> Hello, I'm newbie in Telegraph. Currently, my app for test run fine with Webrick but in production, I use mongrel with mongrel clusters for load balancing reasons... So I would like to know how can I use mongrel with Telegraph ? Thanks for your answers. Best regards. Jeremy. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/telegraph-users/attachments/20071008/6655eba4/attachment.html From timuckun at gmail.com Tue Oct 9 17:50:10 2007 From: timuckun at gmail.com (Tim Uckun) Date: Wed, 10 Oct 2007 10:50:10 +1300 Subject: [Telegraph-users] Mongrel and mongrel cluster with Telegraph (and load balancing). In-Reply-To: <1191847644.6211.11.camel@UBUNTU-PLAN9> References: <1191847644.6211.11.camel@UBUNTU-PLAN9> Message-ID: <855e4dcf0710091450y5b5f04b2wbe75bdb915aacd83@mail.gmail.com> > > I'm newbie in Telegraph. Currently, my app for test run fine with Webrick > but in production, I use mongrel with mongrel clusters for load balancing > reasons... So I would like to know how can I use mongrel with Telegraph ? > That's kind of a wrong question to ask. Telegraph runs an AGI and an AMI server. These servers are separated from your rails mongrel or webrick server. If you want load balancing you can get it with a IP load balancer or a round robin DNS and putting it in front of your AGI servers. From carlosve.ucv at gmail.com Mon Oct 29 12:38:44 2007 From: carlosve.ucv at gmail.com (Carlos Garcia Mujica) Date: Mon, 29 Oct 2007 12:38:44 -0400 Subject: [Telegraph-users] Problem with cli_command Message-ID: <860c15960710290938o513bf04g8939fe2389fc3c2e@mail.gmail.com> Hello Guys, I'm getting a problem with the cli_command in telegraph. I'm trying to do a "show channels" cli command. I don't know why Asterisk isn't responding to me. Any ideas? What I'm doing: result = AMI.cli_command("show channels") => #"Command"}, @success=false, @message=nil, @complete=true, @action_id=1193674334.02419> But with no success. Regards, Carlos -- ------------------------------------------------------------------------------------- Universidad Central de Venezuela Facultad de Ciencias Escuela de Computaci?n Carlos Garcia MSN Messenger Service: curdomanaqui at hotmail.com ------------------------------------------------------------------------------------- "Everything should be made as simple as possible, but not simpler." Albert Einstein -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/telegraph-users/attachments/20071029/80a2f01c/attachment.html From carlosve.ucv at gmail.com Mon Oct 29 14:08:15 2007 From: carlosve.ucv at gmail.com (Carlos Garcia Mujica) Date: Mon, 29 Oct 2007 14:08:15 -0400 Subject: [Telegraph-users] Problem with cli_command In-Reply-To: <860c15960710290938o513bf04g8939fe2389fc3c2e@mail.gmail.com> References: <860c15960710290938o513bf04g8939fe2389fc3c2e@mail.gmail.com> Message-ID: <860c15960710291108mf3167d4rbb107af044d37888@mail.gmail.com> I'm reading about my problem, and I found this note at http://www.voip-info.org/wiki/index.php?page=Asterisk+Manager+API+Action+Command: The sequence in the response event doesn't send a carriage return - line feed (\r\n), it only sends a line-feed (\n), if you write a handler who wait for a carriage return - line feed, the result sequence is ignored and send the respond that you mention. Could it be a bug in the code? Please HELP. Best Regards, Carlos On 10/29/07, Carlos Garcia Mujica wrote: > > Hello Guys, > I'm getting a problem with the cli_command in telegraph. > I'm trying to do a "show channels" cli command. > I don't know why Asterisk isn't responding to me. > > Any ideas? > > What I'm doing: > result = AMI.cli_command("show channels") > => # @attributes={:privilege=>"Command"}, @success=false, @message=nil, > @complete=true, @action_id= 1193674334.02419> > > But with no success. > > Regards, > Carlos > > -- > > ------------------------------------------------------------------------------------- > Universidad Central de Venezuela > Facultad de Ciencias > Escuela de Computaci?n > Carlos Garcia > MSN Messenger Service: curdomanaqui at hotmail.com > ------------------------------------------------------------------------------------- > > "Everything should be made as simple as possible, but not simpler." Albert > Einstein -- ------------------------------------------------------------------------------------- Universidad Central de Venezuela Facultad de Ciencias Escuela de Computaci?n Carlos Garcia MSN Messenger Service: curdomanaqui at hotmail.com ------------------------------------------------------------------------------------- "Everything should be made as simple as possible, but not simpler." Albert Einstein -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/telegraph-users/attachments/20071029/65a29efb/attachment.html From carlosve.ucv at gmail.com Mon Oct 29 17:00:03 2007 From: carlosve.ucv at gmail.com (Carlos Garcia Mujica) Date: Mon, 29 Oct 2007 17:00:03 -0400 Subject: [Telegraph-users] Possible Bug when parsing cli_command Message-ID: <860c15960710291400q345632a8w50f27eee1dda0656@mail.gmail.com> Hello Guys, I posted a problem about the cli_command, I need my application to call the "show channels" command, so I started to lookup in the code of telegraph the possible places where the problem might be. I got to the place where the CLI_COMMANDS are parsed, in the ami_server.rb. The problem is that the CLI_COMMANDS are not executed because there is a condition that isn't working. #For cli_command - unformated response if $1 == 'Follows' at line 668 approx. I suspect it's happening because in line 659 approx. there is a condition: elsif line =~ /^Response:\s(.*)#{CRLF}/ || line =~ /^ActionID:\s(.*)#{CRLF}/ this condition is fine, but after that the line is overwritten in the condition: if line =~ /^ActionID:\s(.*)#{CRLF}/ that's why $1 is nil and if $1 == 'Follows' is giving me false, being unable to process the information that Asterisk is sending. I solved my problem modifying the second conditional, it looks like: if line !~ /^Response:\s(.*)#{CRLF}/ && line =~ /^ActionID:\s(.*)#{CRLF}/ instead of if line =~ /^ActionID:\s(.*)#{CRLF}/ then $1 is not overwritten when it shouldn't and the cli_command works just fine. If anyone has another idea or doesn't have this problem doing cli_command("help") please post. Best Regards, Carlos -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/telegraph-users/attachments/20071029/0d737a18/attachment.html From ichverstehe at gmail.com Wed Oct 31 17:12:43 2007 From: ichverstehe at gmail.com (harry versteht) Date: Wed, 31 Oct 2007 22:12:43 +0100 Subject: [Telegraph-users] link_to_dtmf - store pressed digit in variable? Message-ID: <941ff7dd0710311412t74e4fdecm59c84c7ca6a419c0@mail.gmail.com> hello instead of specifying each and every digit and its action, i would like to be able to do something like: voice.link_to_dtmf 'menu' do link pressed_digit, :action => some_action, :id => pressed digit end and then have the pressed digit stored in - yeah, 'pressed_digit'. is that possible? cheers, harry From ichverstehe at gmail.com Wed Oct 31 19:17:50 2007 From: ichverstehe at gmail.com (harry versteht) Date: Thu, 1 Nov 2007 00:17:50 +0100 Subject: [Telegraph-users] When passing object to 'link_to_dtmf', turns nil!? Message-ID: <941ff7dd0710311617j6b8009daq581342ee5a3dc75a@mail.gmail.com> Hello I've got this code: http://pastie.caboo.se/112907 - but it throws this error: NoMethodError (You have a nil object when you didn't expect it! The error occurred while evaluating nil.routes): /Users/harry/audiomin/app/controllers/incoming_controller.rb:41:in `section' I tried to do some basic operations on a @section.routes.each block, outside the link_to_dtmf. Turns out to work fine. What is the issue? Cheers, Harry From ichverstehe at gmail.com Wed Oct 31 19:19:05 2007 From: ichverstehe at gmail.com (harry versteht) Date: Thu, 1 Nov 2007 00:19:05 +0100 Subject: [Telegraph-users] When passing object to 'link_to_dtmf', turns nil!? In-Reply-To: <941ff7dd0710311617j6b8009daq581342ee5a3dc75a@mail.gmail.com> References: <941ff7dd0710311617j6b8009daq581342ee5a3dc75a@mail.gmail.com> Message-ID: <941ff7dd0710311619iafede11y522e22ecf89f12de@mail.gmail.com> > NoMethodError (You have a nil object when you didn't expect it! > The error occurred while evaluating nil.routes): > /Users/harry/audiomin/app/controllers/incoming_controller.rb:41:in `section' That would be line 38, sorry.