       track.enabled = enabled
 
   hangUp: ->
-    @_stop()
+    @onHangedUp()
+    @_sendMessage(JSON.stringify(type: 'hangUp'))
+    @_hangedUp = true
 
   # private
 
+  _hangedUp: true
   _localStream: null
   _peerConnection: null
   _peerStarted: false

          candidate: event.candidate.candidate
        )

    peer.addStream(@_localStream)
    peer.addEventListener('addstream', onRemoteStreamAdded, false)
    peer.addEventListener('removestream', onRemoteStreamRemoved, false)

        switch event['type']
          when 'call'
            @remoteUserID = event['remoteUserID']
          when 'hangUp'
            @onHangedUp()
            @_hangedUp = true
            @_sendMessage(JSON.stringify(type: 'hangUpAnswer'))
            @_stop()
          when 'hangUpAnswer'
            @_stop()
          when 'offer'
            @_onOffer(event)
          when 'answer'
