[Home]

Summary:ASTERISK-24147: ARI: channel hangup crashes asterisk process
Reporter:Edvin Vidmar (edvinv)Labels:
Date Opened:2014-07-31 07:39:56Date Closed:2014-08-22 11:29:43
Priority:CriticalRegression?
Status:Closed/CompleteComponents:. I did not set the category correctly.
Versions:12.4.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) backtrace.txt
Description:Asterisk crashes when executing following ARI sequence:
- wait for call
- create bridge
- answer channel
- add channel to bridge
- play sound

Now before playing ends if I hang-up channel or execute hangup on channel in code, asterisk will crash.

And here is the trace of ARI rest and socket communication.

debugger listening on port 5858
{noformat}
14:04:08: (1) [/asterisk/ari-events] Starting WebSocket at: ws://edvin:a@10.1.1.5:8088/ari/events?app=crossty.
14:04:08: (2) [/asterisk/ari-events] WebSocket opened successfully.
14:04:18: (4) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "StasisStart",
.    "timestamp": "2014-07-30T14:04:16.453+0200",
.    "args": [
.      "testarg"
.    ],
.    "channel": {
.      "id": "1406721856.0",
.      "state": "Ring",
.      "name": "SIP/2001-00000000",
.      "caller": {
.        "name": "",
.        "number": "2001"
.      },
.      "connected": {
.        "name": "",
.        "number": ""
.      },
.      "accountcode": "",
.      "dialplan": {
.        "context": "crossty-customers",
.        "exten": "100",
.        "priority": 2
.      },
.      "creationtime": "2014-07-30T14:04:16.452+0200"
.    }
.  }
14:04:18: (6) [/asterisk/ari/request] POST /ari/bridges HTTP/1.1
14:04:18: (6) [/asterisk/ari/response] HTTP/1.1 200 OK
.  {
.    "id": "7c4759e8-d8c3-4485-8789-f290f8212f5f",
.    "channels": [],
.    "name": "",
.    "technology": "simple_bridge",
.    "bridge_class": "base",
.    "creator": "Stasis",
.    "bridge_type": "mixing"
.  }
14:04:18: (8) [/asterisk/ari/request] POST /ari/channels/1406721856.0/answer HTTP/1.1
14:04:19: (9) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "ChannelStateChange",
.    "timestamp": "2014-07-30T14:04:16.653+0200",
.    "channel": {
.      "id": "1406721856.0",
.      "state": "Up",
.      "name": "SIP/2001-00000000",
.      "caller": {
.        "name": "",
.        "number": "2001"
.      },
.      "connected": {
.        "name": "",
.        "number": ""
.      },
.      "accountcode": "",
.      "dialplan": {
.        "context": "crossty-customers",
.        "exten": "100",
.        "priority": 2
.      },
.      "creationtime": "2014-07-30T14:04:16.452+0200"
.    }
.  }
14:04:19: (8) [/asterisk/ari/response] HTTP/1.1 204 No Content
.  null
14:04:19: (B) [/asterisk/ari/request] POST /ari/bridges/7c4759e8-d8c3-4485-8789-f290f8212f5f/addChannel?channel=1406721856.0 HTTP/1.1
14:04:19: (B) [/asterisk/ari/response] HTTP/1.1 204 No Content
.  null
14:04:19: (C) [/asterisk/ari/request] POST /ari/channels/1406721856.0/play?media=sound%3Ademo-instruct HTTP/1.1
14:04:19: (C) [/asterisk/ari/response] HTTP/1.1 201 Created
.  {
.    "id": "616e6722-4837-4b2a-9036-e8f01f7ce097",
.    "media_uri": "sound:demo-instruct",
.    "target_uri": "channel:1406721856.0",
.    "language": "en",
.    "state": "queued"
.  }
14:04:19: (D) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "ChannelEnteredBridge",
.    "bridge": {
.      "id": "7c4759e8-d8c3-4485-8789-f290f8212f5f",
.      "channels": [
.        "1406721856.0"
.      ],
.      "name": "",
.      "technology": "simple_bridge",
.      "bridge_class": "base",
.      "creator": "Stasis",
.      "bridge_type": "mixing"
.    },
.    "timestamp": "2014-07-30T14:04:16.869+0200",
.    "channel": {
.      "id": "1406721856.0",
.      "state": "Up",
.      "name": "SIP/2001-00000000",
.      "caller": {
.        "name": "",
.        "number": "2001"
.      },
.      "connected": {
.        "name": "",
.        "number": ""
.      },
.      "accountcode": "",
.      "dialplan": {
.        "context": "crossty-customers",
.        "exten": "100",
.        "priority": 2
.      },
.      "creationtime": "2014-07-30T14:04:16.452+0200"
.    }
.  }
14:04:19: (E) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "PlaybackStarted",
.    "playback": {
.      "id": "616e6722-4837-4b2a-9036-e8f01f7ce097",
.      "media_uri": "sound:demo-instruct",
.      "target_uri": "channel:1406721856.0",
.      "language": "en",
.      "state": "playing"
.    }
.  }
14:04:21: (10) [/asterisk/ari/request] DELETE /ari/channels/1406721856.0 HTTP/1.1
14:04:21: (10) [/asterisk/ari/response] HTTP/1.1 204 No Content
.  null
14:04:21: (11) [/asterisk/ari-events] WebSocket message received.
.  {
.    "channel": {
.      "id": "1406721856.0",
.      "state": "Up",
.      "name": "SIP/2001-00000000",
.      "caller": {
.        "name": "",
.        "number": "2001"
.      },
.      "connected": {
.        "name": "",
.        "number": ""
.      },
.      "accountcode": "",
.      "dialplan": {
.        "context": "crossty-customers",
.        "exten": "100",
.        "priority": 2
.      },
.      "creationtime": "2014-07-30T14:04:16.452+0200"
.    },
.    "cause": 32,
.    "timestamp": "2014-07-30T14:04:18.885+0200",
.    "soft": true,
.    "type": "ChannelHangupRequest",
.    "application": "crossty"
.  }
14:04:21: (12) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "PlaybackFinished",
.    "playback": {
.      "id": "616e6722-4837-4b2a-9036-e8f01f7ce097",
.      "media_uri": "sound:demo-instruct",
.      "target_uri": "channel:1406721856.0",
.      "language": "en",
.      "state": "done"
.    }
.  }
14:04:21: (14) [/asterisk/ari-events] WebSocket message received.
.  {
.    "application": "crossty",
.    "type": "StasisEnd",
.    "timestamp": "2014-07-30T14:04:18.886+0200",
.    "channel": {
.      "id": "1406721856.0",
.      "state": "Up",
.      "name": "SIP/2001-00000000",
.      "caller": {
.        "name": "",
.        "number": "2001"
.      },
.      "connected": {
.        "name": "",
.        "number": ""
.      },
.      "accountcode": "",
.      "dialplan": {
.        "context": "crossty-customers",
.        "exten": "100",
.        "priority": 2
.      },
.      "creationtime": "2014-07-30T14:04:16.452+0200"
.    }
.  }
{noformat}

Comments:By: Edvin Vidmar (edvinv) 2014-07-31 07:42:01.307-0500

Backtrace of asterisk crash.