adhearsion / punchblock

Telephony middleware library for Ruby
adhearsion.com/punchblock
MIT License
40 stars 34 forks source link

punchblock does not send directed presence even if root_domain is set in config/adhearsion.rb #142

Closed crienzo closed 11 years ago

crienzo commented 11 years ago

I am currently using the feature/new_rayo branch of punchblock.

configuration:

Use with Rayo (eg Voxeo PRISM)

# config.punchblock.username = "usera@rayo.grasshopper.com" # Your XMPP JID for use with Rayo config.punchblock.password = "1" # Your XMPP password config.punchblock.host = "fs6.grasshopper.com" config.punchblock.root_domain = "rayo.grasshopper.com"

What I see in my server log:

14cd02f8-a2bf-11e2-aefd-634ea54d4d99 2013-04-11 11:47:14.599507 [DEBUG] mod_rayo.c:499 usera@rayo.grasshopper.com/fs6-10297 RECV <presence/>
benlangfeld commented 11 years ago

Can I see trace level Adhearsion logs of the same piece?

crienzo commented 11 years ago
[2013-04-11 11:55:12] TRACE Adhearsion::Initializer: OS: linux-gnu - RUBY: ruby 1.9.3
[2013-04-11 11:55:12] TRACE Adhearsion::Initializer: Environment: {"SSH_AGENT_PID"=>"2176", "KDE_MULTIHEAD"=>"false", "HOSTNAME"=>"fs6", "rvm_bin_path"=>"/home/crienzo/.rvm/bin", "DM_CONTROL"=>"/var/run/xdmctl", "GPG_AGENT_INFO"=>"/tmp/gpg-RVIayI/S.gpg-agent:2209:1", "GEM_HOME"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385", "rvm_error_clr"=>"\e[31m", "SHELL"=>"/bin/bash", "TERM"=>"xterm", "XDG_MENU_PREFIX"=>"kde4-", "rvm_notify_clr"=>"\e[32m", "XDG_SESSION_COOKIE"=>"fe4dfe0c37362e837c7ec76e0000000c-1365685746.562855-1235942966", "HISTSIZE"=>"1000", "XDM_MANAGED"=>"method=classic", "IRBRC"=>"/home/crienzo/.rvm/rubies/ruby-1.9.3-p385/.irbrc", "GTK2_RC_FILES"=>"/etc/gtk-2.0/gtkrc:/home/crienzo/.gtkrc-2.0::/home/crienzo/.kde/share/config/gtkrc-2.0", "KONSOLE_DBUS_SERVICE"=>":1.33", "GS_LIB"=>"", "GTK_RC_FILES"=>"/etc/gtk/gtkrc:/home/crienzo/.gtkrc::/home/crienzo/.kde/share/config/gtkrc", "WINDOWID"=>"39845914", "OLDPWD"=>"/home/crienzo/ahn/tester/log", "QTDIR"=>"/usr/lib64/qt-3.3", "QTINC"=>"/usr/lib64/qt-3.3/include", "MY_RUBY_HOME"=>"/home/crienzo/.rvm/rubies/ruby-1.9.3-p385", "KDE_FULL_SESSION"=>"true", "USER"=>"crienzo", "LS_COLORS"=>"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:", "__array_start"=>"0", "rvm_reset_clr"=>"\e(B\e[m", "rvm_path"=>"/home/crienzo/.rvm", "SSH_AUTH_SOCK"=>"/tmp/ssh-bXIaYW2077/agent.2077", "SESSION_MANAGER"=>"local/unix:@/tmp/.ICE-unix/2253,unix/unix:/tmp/.ICE-unix/2253", "escape_flag"=>"1", "rvm_prefix"=>"/home/crienzo", "DESKTOP_SESSION"=>"default", "MAIL"=>"/var/spool/mail/crienzo", "PATH"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385/bin:/opt/apache-maven/bin:/opt/java/bin:/home/crienzo/.rvm/gems/ruby-1.9.3-p385@global/bin:/home/crienzo/.rvm/rubies/ruby-1.9.3-p385/bin:/home/crienzo/.rvm/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/local/sbin:/usr/sbin:/sbin:/home/crienzo/bin", "PWD"=>"/home/crienzo/ahn/tester", "KDE_SESSION_UID"=>"500", "LANG"=>"en_US.UTF-8", "KDE_IS_PRELINKED"=>"1", "KDEDIRS"=>"/usr", "_second"=>"1", "KONSOLE_DBUS_SESSION"=>"/Sessions/4", "HISTCONTROL"=>"ignoredups", "SSH_ASKPASS"=>"/usr/bin/ksshaskpass", "rvm_version"=>"1.18.8 (stable)", "rvm_debug_clr"=>"\e[35m", "HOME"=>"/home/crienzo", "COLORFGBG"=>"15;0", "SHLVL"=>"3", "KDE_SESSION_VERSION"=>"4", "LANGUAGE"=>"", "XCURSOR_THEME"=>"default", "_first"=>"0", "LOGNAME"=>"crienzo", "CVS_RSH"=>"ssh", "QTLIB"=>"/usr/lib64/qt-3.3/lib", "XDG_DATA_DIRS"=>"/usr/share/kde-settings/kde-profile/default/share:/usr/local/share:/usr/share", "DBUS_SESSION_BUS_ADDRESS"=>"unix:abstract=/tmp/dbus-buPfO2mncR,guid=8f407ee826ca3115bac1407b00000021", "GEM_PATH"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385:/home/crienzo/.rvm/gems/ruby-1.9.3-p385@global", "LESSOPEN"=>"|/usr/bin/lesspipe.sh %s", "WINDOWPATH"=>"1", "PROFILEHOME"=>"", "DISPLAY"=>":0.0", "QT_PLUGIN_PATH"=>"/home/crienzo/.kde/lib64/kde4/plugins/:/usr/lib64/kde4/plugins/", "rvm_warn_clr"=>"\e[33m", "RUBY_VERSION"=>"ruby-1.9.3-p385", "G_BROKEN_FILENAMES"=>"1", "XAUTHORITY"=>"/var/run/kdm/.Xauth2xmz5z", "_"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385/bin/ahn", "_ORIGINAL_GEM_PATH"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385:/home/crienzo/.rvm/gems/ruby-1.9.3-p385@global", "BUNDLE_GEMFILE"=>"/home/crienzo/ahn/tester/Gemfile", "BUNDLE_BIN_PATH"=>"/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/bin/bundle", "RUBYOPT"=>"-I/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/bundler-1.2.4/lib -rbundler/setup"}
[2013-04-11 11:55:12] TRACE Adhearsion::Initializer:   # ******* Configuration for punchblock **************

  # The domain at which to address calls [AHN_PUNCHBLOCK_CALLS_DOMAIN]
  config.punchblock.calls_domain       = nil

  # The amount of time to wait for a connection [AHN_PUNCHBLOCK_CONNECTION_TIMEOUT]
  config.punchblock.connection_timeout = 60

  # The default TTS voice to use. [AHN_PUNCHBLOCK_DEFAULT_VOICE]
  config.punchblock.default_voice      = nil

  # Enable or disable Punchblock connectivity to a Voice server [AHN_PUNCHBLOCK_ENABLED]
  config.punchblock.enabled            = true

  # Host punchblock needs to connect (where rayo/asterisk/freeswitch is located) [AHN_PUNCHBLOCK_HOST]
  config.punchblock.host               = "fs6.grasshopper.com"

  # The media engine to use. Defaults to platform default. [AHN_PUNCHBLOCK_MEDIA_ENGINE]
  config.punchblock.media_engine       = nil

  # The domain at which to address mixers [AHN_PUNCHBLOCK_MIXERS_DOMAIN]
  config.punchblock.mixers_domain      = nil

  # Authentication credentials [AHN_PUNCHBLOCK_PASSWORD]
  config.punchblock.password           = "1"

  # Platform punchblock shall use to connect to the Telephony provider. Currently supported values:
  # - :xmpp
  # - :asterisk
  # - :freeswitch [AHN_PUNCHBLOCK_PLATFORM]
  config.punchblock.platform           = :xmpp

  # Port punchblock needs to connect [AHN_PUNCHBLOCK_PORT]
  config.punchblock.port               = 5222

  # The number of times to (re)attempt connection to the server [AHN_PUNCHBLOCK_RECONNECT_ATTEMPTS]
  config.punchblock.reconnect_attempts = Infinity

  # Delay between connection attempts [AHN_PUNCHBLOCK_RECONNECT_TIMER]
  config.punchblock.reconnect_timer    = 5

  # The root domain at which to address the server [AHN_PUNCHBLOCK_ROOT_DOMAIN]
  config.punchblock.root_domain        = "rayo.grasshopper.com"

  # Authentication credentials [AHN_PUNCHBLOCK_USERNAME]
  config.punchblock.username           = "usera@rayo.grasshopper.com"

  # ******* Configuration for platform **************

  # Lifetime of a call after it has hung up [AHN_PLATFORM_AFTER_HANGUP_LIFETIME]
  config.platform.after_hangup_lifetime = 30

  # Active environment. Supported values: development, production, staging, test [AHN_PLATFORM_ENVIRONMENT]
  config.platform.environment           = :development

  # Folder to include the own libraries to be used. Adhearsion loads any ruby file
  # located into this folder during the bootstrap process. Set to nil if you do not
  # want these files to be loaded. This folder is relative to the application root folder. [AHN_PLATFORM_LIB]
  config.platform.lib                   = "lib"

  # Log configuration [AHN_PLATFORM_LOGGING]
  config.platform.logging

  # A log formatter to apply to all active outputters. If nil, the Adhearsion default formatter will be used. [AHN_PLATFORM_LOGGING_FORMATTER]
  config.platform.logging.formatter     = nil

  # Supported levels (in increasing severity) -- :trace < :debug < :info < :warn < :error < :fatal [AHN_PLATFORM_LOGGING_LEVEL]
  config.platform.logging.level         = :trace

  # An array of log outputters to use. The default is to log to stdout and log/adhearsion.log.
  # Each item must be either a string to use as a filename, or a valid Logging appender (see http://github.com/TwP/logging) [AHN_PLATFORM_LOGGING_OUTPUTTERS]
  config.platform.logging.outputters    = ["log/adhearsion.log"]

  # Adhearsion process name, useful to make it easier to find in the process list
  # Pro tip: set this to your application's name and you can do "killall myapp"
  # Does not work under JRuby. [AHN_PLATFORM_PROCESS_NAME]
  config.platform.process_name          = "ahn"

  # Adhearsion application root folder [AHN_PLATFORM_ROOT]
  config.platform.root                  = "/home/crienzo/ahn/tester"

[2013-04-11 11:55:12] TRACE Adhearsion::Initializer: Gem versions: ["rake 10.0.4", "i18n 0.6.1", "multi_json 1.7.2", "activesupport 3.2.13", "adhearsion-loquacious 1.9.3", "bundler 1.2.4", "timers 1.1.0", "celluloid 0.13.0", "countdownlatch 1.0.0", "deep_merge 1.0.0", "ffi 1.6.0", "future-resource 1.0.0", "connection_pool 1.0.0", "rubinius-core-api 0.0.1", "rubinius-actor 0.0.2", "girl_friday 0.11.2", "has-guarded-handlers 1.5.0", "little-plugger 1.1.3", "logging 1.8.1", "coderay 1.0.9", "method_source 0.8.1", "slop 3.4.4", "pry 0.9.12", "eventmachine 1.0.3", "nokogiri 1.5.9", "niceogiri 1.1.1", "blather 0.8.4", "nio4r 0.4.3", "celluloid-io 0.13.0", "ruby_ami 1.3.2", "json 1.7.7", "ruby_fs 1.0.5", "ruby_speech 1.1.0", "state_machine 1.1.2", "punchblock 1.8.0", "thor 0.18.0", "adhearsion 2.3.0", "diff-lcs 1.2.1", "rspec-core 2.13.1", "rspec-expectations 2.13.0", "rspec-mocks 2.13.0", "rspec 2.13.0"]
[2013-04-11 11:55:12] INFO  Adhearsion::Initializer: Setting RAILS_ENV to "development"
[2013-04-11 11:55:12] INFO  Adhearsion::PunchblockPlugin::Initializer: Starting connection to server
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: USING JID: usera@rayo.grasshopper.com/fs6-10507
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/stream/client.rb:12:in `start') <stream:stream to='rayo.grasshopper.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (stream) <stream:stream xmlns:db="jabber:server:dialback" xmlns:stream="http://etherx.jabber.org/streams" from="rayo.grasshopper.com" id="31c0e0b8-a2c0-11e2-af01-634ea54d4d99" lang="en" version="1.0"/>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl">
    <mechanism>PLAIN</mechanism>
  </mechanisms>
</stream:features>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/stream/features/sasl.rb:177:in `authenticate') <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="PLAIN">dXNlcmFAcmF5by5ncmFzc2hvcHBlci5jb20AdXNlcmEAMQ==</auth>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (success) <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/stream/client.rb:12:in `start') <stream:stream to='rayo.grasshopper.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (stream) <stream:stream xmlns:db="jabber:server:dialback" xmlns:stream="http://etherx.jabber.org/streams" from="rayo.grasshopper.com" id="31c1ff16-a2c0-11e2-af02-634ea54d4d99" lang="en" version="1.0"/>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (features) <stream:features xmlns:stream="http://etherx.jabber.org/streams">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/>
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
</stream:features>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/stream/features/resource.rb:39:in `bind') <iq type="set" id="blather0002">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
    <resource>fs6-10507</resource>
  </bind>
</iq>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (iq) <iq type="result" id="blather0002">
  <bind xmlns="urn:ietf:params:xml:ns:xmpp-bind">
    <jid>usera@rayo.grasshopper.com/fs6-10507</jid>
  </bind>
</iq>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: USING JID: usera@rayo.grasshopper.com/fs6-10507
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/stream/features/session.rb:40:in `session') <iq type="set" id="blather0004" to="rayo.grasshopper.com">
  <session xmlns="urn:ietf:params:xml:ns:xmpp-session"/>
</iq>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (iq) <iq from="rayo.grasshopper.com" type="result" id="blather0004"/>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/client/client.rb:149:in `write') <iq type="get" id="blather0006">
  <query xmlns="jabber:iq:roster"/>
</iq>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: RECEIVING (iq) <iq type="error" id="blather0006" to="usera@rayo.grasshopper.com/fs6-10507" from="rayo.grasshopper.com">
  <query xmlns="jabber:iq:roster"/>
  <error type="modify">
    <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
  </error>
</iq>
[2013-04-11 11:55:12] TRACE Punchblock::Connection::XMPP: SENDING: (/home/crienzo/.rvm/gems/ruby-1.9.3-p385/gems/blather-0.8.4/lib/blather/client/client.rb:149:in `write') <presence/>
[2013-04-11 11:55:12] INFO  Punchblock::Connection::XMPP: Connected to XMPP as usera@rayo.grasshopper.com/fs6-10507
[2013-04-11 11:55:12] INFO  Adhearsion::PunchblockPlugin::Initializer: Connected to Punchblock server
[2013-04-11 11:55:12] INFO  Adhearsion::Process: Transitioning from booting to running with 0 active calls due to booted event.
[2013-04-11 11:55:12] INFO  Adhearsion::Initializer: Adhearsion v2.3.0 initialized in "development"!
[2013-04-11 11:55:12] INFO  Adhearsion::Console: Launching Adhearsion Console