Can you post a SIP trace of this happening? That looks pretty interesting. Use pastebin.freeswitch.org and put the URL of the pb post in this email thread.
-MC

On Mon, Dec 3, 2012 at 5:10 AM, Adam Kuśmirek <amkusmirek@gmail.com> wrote:
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







_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.org