[asterisk-bugs] [JIRA] (ASTERISK-24147) ARI: channel hangup crashes asterisk process

Richard Mudgett (JIRA) noreply at issues.asterisk.org
Thu Jul 31 10:56:56 CDT 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-24147?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Mudgett updated ASTERISK-24147:
---------------------------------------

    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}



  was:
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
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"
.    }
.  }





> ARI: channel hangup crashes asterisk process
> --------------------------------------------
>
>                 Key: ASTERISK-24147
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24147
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: . I did not set the category correctly.
>    Affects Versions: 12.4.0
>            Reporter: Edvin Vidmar
>            Severity: Blocker
>         Attachments: backtrace.txt
>
>
> 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}



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list