ARI & Dialing SIP URIs

Hi, I’m trying to dial a SIP URI w/ ARI and just simply place them on hold for now.
The call does go out to the SIP URI, however when the call is answered it throws this error:

[2021-02-18 22:59:27] ERROR[23529]: res_http_websocket.c:567 ws_safe_read: Error reading from web socket: Connection reset by peer
[2021-02-18 22:59:27] WARNING[23529]: ari/ari_websockets.c:126 ast_ari_websocket_session_read: WebSocket read error: Connection reset by peer
 Deactivating Stasis app 'cr-zero'
 Shutting down application 'cr-zero'
  == WebSocket connection from '10.8.0.6:52847' forcefully closed due to fatal write error
 Destroying Stasis app cr-zero

and the call is destroyed.

This does work for internal calls though, just not SIP. Here’s the JS code that I’m using:

  ari.start('cr-zero');

  const chan0 = await ari.channels.originate({
    endpoint: 'SIP/user@sip.linphone.org',
    //extension: '6208',
    callerId: 'PBX <00>',
    context: 'from-internal',
    priority: 1,
    app: 'cr-zero',
  });
  chan0.on('StasisStart', async (event, channel) => {
    channel.answer();
    channel.hold();
  });

Thanks!

It would seem as though that something happened on the node.js side as it closed the connection. What that is, I do not know. Have you looked at it?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.