[Freeswitch-users] Using "Reason" from hangup

Steven Ayre steveayre at gmail.com
Wed Nov 10 12:09:08 PST 2010


Try:

<action application="set" data="hangup_on_bridge=false" />
<action application="bridge" data="..." />
<action application="set"
data="sip_bye_h_X-Remote-Reason=${bridge_hangup_cause}" />
<action application="hangup" />

It won't have any effect if the A-leg hangs up though (the call will
end during the bridge so won't reach the sip_h set).

If the B-leg hangs up it'll take the B-leg cause and set it in a
X-Remote-Reason header of the BYE to the A-leg. Note the bye needs
sip_bye_h_ not the usual sip_h_ prefix.

-Steve



On 10 November 2010 18:34, Santiago Soares <santiagosoares at gmail.com> wrote:
> I want to do something like this, but using another header instead of Reason
> header.
> Is it possible?
>
> Santiago Soares
> Fone: (41) 8488-0537
>
>
> On Wed, Nov 10, 2010 at 3:03 PM, Eduardo Nunes Pereira
> <eduardonunesp at gmail.com> wrote:
>>
>> If you use hangup after a bridge FreeSWITCH overrides the cause with
>> the cause recieved from the bridge application. You can avoid this
>> using sip_ignore_remote_cause=true
>>
>> On Wed, Nov 10, 2010 at 12:25 PM, Ross McKillop
>> <ross at ossiantelecom.co.uk> wrote:
>> > I have a FreeSWITCH box acting as a gateway between other servers
>> > and a TDM switch, primarily for accounting purposes - The TDM switch
>> > accurately sets a Reason header as follows;
>> >
>> >> SIP/2.0 480 Temporarily Unavailable.
>> >> Reason: Q.850;cause=31.
>> >
>> > This is then passed by FreeSWITCH back to the A party as
>> >
>> >> SIP/2.0 480 Temporarily Unavailable.
>> >> Reason: Q.850;cause=16;text="NORMAL_CLEARING".
>> >
>> > Is there any way to get FreeSWITCH to use the Reason header from
>> > the failed B leg when replying to the A party ?
>> >
>> > I tried setting continue_on_fail=true and hangup_after_bridge=false
>> > and then adding a line after the bridge in the dialplan to hangup with
>> > the bridge hangup cause e.g.;
>> >
>> >> <action application="hangup" data="${bridge_hangup_cause}" />
>> >
>> >
>> > But that hasn't affected the behaviour at all.
>> >
>> > Regards,
>> > Ross
>> >
>> > _______________________________________________
>> > 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
>> >
>>
>>
>>
>> --
>> Eduardo Nunes Pereira
>> cel.: (48) 9989-2997
>> email: eduardonunesp at gmail.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
>
>
> _______________________________________________
> 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
>
>



More information about the FreeSWITCH-users mailing list