Hi All

I have Freeswitch connected to SIP Trunk from local Service Provider.
Service Provider has NGN platform based on Broadworks applications.
When making failed outbound connections I never get SIP responses with hangup cause, but they play 20 sec. voice announcement (eg. unallocated number ...) and send 487 Request Terminated containing Reason header after that.

---> INVITE
<--- 100 Trying
<---  183 Session Progress
<---  183 Session Progress with header Reason: Q.850;cause=?
<---  20 sec. voice announcement
<---  487 Request Terminated with header Reason: Q.850;cause=?
---> ACK

I'd like to hangup the call after 183 Session Progress containing header Reason: Q.850;cause=?.

First i tried execute_on_media and execute_on_pre_answer, but the scripts are triggered only for the first 183 Session Progress that does not contain Reason header.

Then I tried  to resolve the problem by connecting to Outbound Socket, but I can see only one CHANNEL_PROGRESS_MEDIA event  for the first 183 Session Progress.

Can anyone help ?

Regards Adam