Here you go:

<condition field="destination_number" expression="^(?:5824)(44(1|2)\d+)$" break="on-true">
  <action inline="true" application="set" data="bypass_media=false"/>
  <action inline="true" application="set" data="prpoxy_media=false"/>
  <action inline="true" application="set" data="disable_q850_reason=true"/>
  <action inline="true" application="set" data="hangup_after_bridge=false"/>
  <action inline="true" application="set" data="sip_ignore_remote_cause=true"/>
  <action application="bridge" data="sofia/gateway/sip.xx.xx.com/$1"/>
  <action inline="true" application="set" data="bridge_hangup_cause=NORMAL_CIRCUIT_CONGESTION"/>
  <action inline="true" application="set" data="hangup_cause=NORMAL_CIRCUIT_CONGESTION"/>
  <action application="bridge" data="error/normal_circuit_congestion"/>
  <action application="hangup" data="NORMAL_CIRCUIT_CONGESTION"/>
</condition>

As you can see, I am trying to rewrite the hangup codes in a multitude of ways and places, but still exhibit the same behaviour.

Any help appreciated.

Regards,

Ahmed.

2010/1/12 Steven Ayre <steveayre@gmail.com>
Can you show us the dialplan extension you're trying?

Thanks,
-Steve

2010/1/12 Ahmed Naji <a.alalousi@gmail.com>:
> Hi Michael,
>
> This is exactly what I'm doing, but it's just not happening.
>
> Thanks,
>
> Ahmed.
>
>
> 2010/1/12 Michael Collins <msc@freeswitch.org>
>>
>>
>> On Mon, Jan 11, 2010 at 4:18 AM, Ahmed Naji <a.alalousi@gmail.com> wrote:
>>>
>>> Dear All,
>>>
>>> I posted a thread re the subject but didn't get any joy, so perhaps
>>> second time lucky.
>>>
>>> I need to rewrite a couple of hangup causes to mean NORMAL_CONGESTION and
>>> no matter which variables I set, this isn't happening. The idea is to
>>> control what codes are returned to an end point after a successful bridge,
>>> as well as deal with what codes are returned if the bridge is unsuccessful
>>> (e.g. user_busy, originator_cancel ...etc).
>>>
>>> I've had limited success by setting hangup_after_bridge=false then
>>> bridging to error/<required_code>. This, however only works when the B-leg
>>> terminates the call after a successful answer. Any other codes are not
>>> rewritten.
>>>
>>> I've also tried playing with the bridge_hangup_code and hangup_code
>>> variables prior and after bridging, still no joy. I have also set
>>> sip_ignore_remote_cause=true prior to entering the bridge, as well
>>> explicitly in vars.xml.
>>>
>>> By the way, I'm running in proxy-media mode, but I did try it with
>>> bypass-media as well. Same symptoms, same behaviour.
>>>
>>> Any help with this would be highly appreciated.
>>>
>> Well, I do know that when you do a hangup in the dialplan you can pass an
>> optional cause as well:
>> <action application="hangup" data="USER_BUSY"/>
>> If you are doing the hanging up then you have a fair amount of control...
>> -MC
>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Ahmed Naji
>
> _______________________________________________
> 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
>
>

_______________________________________________
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



--
Ahmed Naji