def originate url, args={}, &block
      extension = args.delete(:extension)
      dialplan  = args.delete(:dialplan)
      context   = args.delete(:context)

      vars = args.map {|k,v| "#{k}=#{v}"}.join(",")

      arg_string = "{#{vars}}" + 
        [url, extension, dialplan, context].compact.join(" ")
      command "originate", arg_string, &block
    end
def originate url, args={}, &block
      extension = args.delete(:extension)
      dialplan  = args.delete(:dialplan)
      context   = args.delete(:context)

      vars = args.map {|k,v| "#{k}=#{v}"}.join(",")

      arg_string = "{#{vars}}" + 
        [url, extension, dialplan, context].compact.join(" ")
      command "originate", arg_string, &block
    end
Access the hash table that comes with FreeSWITCH.
 @example
   socket.hash :insert, :realm, :key, "value"
   socket.hash :select, :realm, :key
   socket.hash :delete, :realm, :key
 Originate a new call.
 @example Minimum options
   socket.originate 'sofia/user/coltrane', :extension => "1234"
 @example With :dialplan and :context
 @see http://wiki.freeswitch.org/wiki/Mod_commands#originate