0

ErrorException: Outbound call can not complete

I just started getting an intermittent problem.  I start the script and when attempting to make a call I sometimes get this exception.  This never used to happen at all and this code hasn't changed.

 

I attached the log file and the calling code is below.    Is there something I can do to prevent this? 

 

Thanks,

Ross

 

Here's the call code:

 

  def makeTheCall()

    #call ['+19178607374'], {

    call ['+' + @fromNumb],  {

      :timeout => 30.0,

      :callerID => '18557594477',

      :onAnswer => lambda {

        #say "<speak><prosody rate='-0%'>Hello.  We will now call " + @connectToName + "</prosody></speak>"

        say "Hello.  We will now call " + @connectToName

        log "@"*5+"session number one: " + $currentCall.sessionId

        setCallObj($currentCall)

        log "@"*5+"saving session id "

        @sessionId = $currentCall.sessionId

        log "@"*5+"creating shared obj "

        #sharedObj = SharedObj.new()

        log "@"*5+"add my obj "

        @sharedObj.appendCaller(self)

        log "@"*5+"create_conference_id"

        @sharedObj.create_conference_id()

        log "@"*5+"setting session id "

        @sharedObj.setSessionId($currentCall.sessionId)

        log "@"*5+"creating callee "

        callee = createCallee()

        log "@"*5+"adding shared obj "

        callee.setSharedObj(@sharedObj)

        log "@"*5+"creating event checker "

        #Utils.eventTrigger($currentCall)

        eventChecker = Utils.new()

        callee.check_this_favorite(eventChecker)

        eventChecker.wait_for_event(@callerName, 500)

        if callee.isConnected() == false

          say @connectToName + " is not available you can stay on the line for more options or make another selection on the website. "

          callAnotherListing()

        else

          call_loop()

        end

      },

      :onTimeout => lambda {

        log "Call timed out" },

      :onCallFailure => lambda {

        log "Call could not be complete as dialed" }

    }

  end

9 comments

Please sign in to leave a comment.