[Freeswitch-users] Change response code

Steven Ayre steveayre at gmail.com
Thu Oct 17 13:02:48 MSD 2013


<action application="set" data="hangup_after_bridge=true"/>
<action application="bridge" data="sofia/your/dialstring"/>
<action application="hangup" data="34"/>

This'll hangup on a successful bridge (answer) but continue to the hangup
on a failed bridge. The 34 hangup is the ISDN clearing cause - see
http://wiki.freeswitch.org/wiki/Hangup_Causes (you can use enumeration
names or the numbers).

34 NORMAL_CIRCUIT_CONGESTION will return 503 Service Unavailable, with the
34 cause in a Reason header. See http://tools.ietf.org/html/rfc3398 for the
full list of mappings. Note it's not a 1:1 mapping so 34 maps to 503 and
maps back to 41 without the Reason header to override that to provide the
34.

If instead you're only wanting to control the SIP code use the respond app.
The Reason header'll probably come from the SIP->ISDN mapping in the above
RFC.

If you want to selectively control what response to send based on the
bridge's hangup cause, transfer to another context where the extensions
each check the hangup cause to pick which hangup to use.
${bridge_hangup_cause} is probably the variable you'd want to check.

-Steve



On 17 October 2013 02:18, Andre <andretodd at verizon.net> wrote:

> HI, how would I change the response code back to my customer?****
>
> ** **
>
> Let’s say I receive a 500 from my provider and I wanted to tell my
> customer it’s a 503, how would I do that?****
>
> Andre****
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131017/7a4a7a23/attachment.html 


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