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

Markus Bönke mbodbg at gmx.net
Fri Mar 17 13:59:25 MSK 2017


Thanks, for the hint. I did a couple of tests and it seems to work. However I’m not sure, is it guaranteed that the „respond“ is never executed when the socket get’s connected? Or is there a possibility that depending on the esl commands (e.g set continue_on_fail variable or something else) sent to the socket, the respond application is executed after the socket has been disconnected?

Thanks

Markus

> Am 15.03.2017 um 11:35 schrieb KSrigo <ksrigo at gmail.com>:
> 
> 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
> 
> 
> _________________________________________________________________________
> 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