EvoluxBR / greenswitch

Battle proven FreeSWITCH Event Socket Protocol client implementation with Gevent
Other
126 stars 50 forks source link

Is raised NotConnectedError instead of OutboundSessionHasGoneAway when the caller hangs up the call at the same time that OutboundSessionServer accept the connection #57

Open evangilo opened 4 years ago

evangilo commented 4 years ago

greenswitch traceback

Traceback (most recent call last):
  File "/tmp/myenv/myapp.py", line 218, in run
    self.outbound_session.myevents()
  File "/tmp/myenv/greenswitch/esl.py", line 354, in myevents
    self.send('myevents')
  File "/tmp/myenv/greenswitch/esl.py", line 200, in send
    raise NotConnectedError()
NotConnectedError"

FreeSWITCH logs

1249502:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:938 (sofia/internal/99999999@127.0.0.1:5063) State REPORTING
1249476:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 EXECUTE sofia/internal/99999999@127.0.0.1:5063 socket(127.0.0.1:5009 async full)
1249477:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.388313 [NOTICE] mod_event_socket.c:450 Trying host: 127.0.0.1:5009
1249484:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] sofia.c:7084 Channel sofia/internal/99999999@127.0.0.1:5063 entering state [terminated][487]
1249486:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [NOTICE] sofia.c:8273 Hangup sofia/internal/99999999@127.0.0.1:5063 [CS_EXECUTE] [ORIGINATOR_CANCEL]
1249492:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_session.c:2815 sofia/internal/99999999@127.0.0.1:5063 skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
1249493:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:650 (sofia/internal/99999999@127.0.0.1:5063) State EXECUTE going to sleep
1249494:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/99999999@127.0.0.1:5063) Running State Change CS_HANGUP (Cur 82 Tot 1784367)
1249495:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:850 (sofia/internal/99999999@127.0.0.1:5063) Callstate Change RINGING -> HANGUP
1249496:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:852 (sofia/internal/99999999@127.0.0.1:5063) State HANGUP
1249497:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] mod_sofia.c:438 Channel sofia/internal/99999999@127.0.0.1:5063 hanging up, cause: ORIGINATOR_CANCEL
1249498:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:60 sofia/internal/99999999@127.0.0.1:5063 Standard HANGUP, cause: ORIGINATOR_CANCEL
1249499:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:852 (sofia/internal/99999999@127.0.0.1:5063) State HANGUP going to sleep
1249500:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:619 (sofia/internal/99999999@127.0.0.1:5063) State Change CS_HANGUP -> CS_REPORTING
1249501:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:584 (sofia/internal/99999999@127.0.0.1:5063) Running State Change CS_REPORTING (Cur 82 Tot 1784367)
1249502:5bce88c8-b17d-11ea-8c20-6d30b33a4e74 2020-06-18 13:04:17.488328 [DEBUG] switch_core_state_machine.c:938 (sofia/internal/99999999@127.0.0.1:5063) State REPORTING