signalwire / signalwire-ruby

MIT License
9 stars 11 forks source link

Example for calling sip endpoints #84

Closed ryanwi closed 2 years ago

ryanwi commented 2 years ago

Call this sip example with

 SIGNALWIRE_PROJECT_KEY=[your project] SIGNALWIRE_TOKEN=[your token] bundle exec ruby examples/relay/calling/sip_send.rb

Does not appear to handle sip?

D, [2022-04-29T09:57:48.908343 #23151] DEBUG -- SignalWire: RECV: {
  "jsonrpc": "2.0",
  "id": "cd6e22ab-0580-4886-9d14-7cc4a18d1d44",
  "result": {
    "requester_nodeid": "a9661c67-da35-4967-907d-1c788c52af56@2815e920-5abc-4c39-9741-45b86d8d98d9.carriers",
    "responder_nodeid": "2815e920-5abc-4c39-9741-45b86d8d98d9@carriers",
    "result": {
      "call_id": "644093c7-e3d5-4a81-b0fd-7c20cdf82331",
      "code": "400",
      "message": "from_number error"
    }
  }
}
ryanwi commented 2 years ago

After adding device_type: "sip", now get

    "result": {
      "call_id": "c74bb7fc-b5b0-49bf-83cf-37f138589f63",
      "code": "400",
      "message": "call_device_sip error"
    }
ryanwi commented 2 years ago

Sounds like we need to switch from using calling.begin, which as been deprecated, to calling.dial