[Freeswitch-users] Change Hangup Cause on Socket Error!

KSrigo ksrigo at gmail.com
Wed Mar 15 13:35:52 MSK 2017


try this

<extension name="dialplanserver">
    <condition field="destination_number" expression="^(\\+\d{5,20})$">
       <action application="info"/>
       <action application="set" data="continue_on_fail=true"/>
       <action application="socket" data="192.168.1.23:8040 async full"/>
       <action application="respond" data="503 Service Unavailable"/>
   </condition>
</extension>


> On Mar 14, 2017, at 10:18 PM, Markus Bönke <mbodbg at gmx.net> wrote:
> 
> 
> Hello,
> 
> In our dialplan we are using an external service to to handle calls. So our dialplan looks like:
> 
> <extension name="dialplanserver">
>     <condition field="destination_number" expression="^(\\+\d{5,20})$">
>        <action application="info"/>
>        <action application="socket" data="192.168.1.23:8040 async full"/>
>    </condition>
> </extension>
> 
> In the case the external service which is posted by the socket application is down, I can see a "Socket Error!“ error message in the log. The call ends with 480 - "Temporarily Unavailable".
> 
> ...
> [ERR] mod_event_socket.c:454 Socket Error!
> ...
> [DEBUG] mod_sofia.c:549 Responding to INVITE with: 480
> ...
> 
> Is it somehow possible to force hangup cause 503 - "Service Unavailable" instead of 480 - "Temporarily Unavailable" in case of a Socket Error?
> 
> Thanks and regards
> 
> Markus
> 
> 
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services: 
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
> 
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.freeswitch.org
> http://www.cluecon.com
> 
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list