Happy New Year All, Sorry to drag this one up again.. I thought I had resolved this but I haven't.. The dialplan is now as follows;
<action application="set" data="continue_on_fail=true" /> <action application="set" data="hangup_after_bridge=false" /> <action application="set" data="sip_ignore_remote_cause=true" /> <action application="bridge" data="{bypass_media=true}sofia/external/NUMBER@10.0.44.1" /> <action application="log" data="WARNING HC : ${hangup_cause} / BHC: ${bridge_hangup_cause} / OD: ${originate_disposition}" /> <action application="hangup" data="${bridge_hangup_cause}" />
(have also tried <action application="hangup" data="${originate_disposition}" /> as well as not setting the sip_ignore_remote_cause variable) Of interest, perhaps, is that sometimes early media is returned with the 183 Session Progress (usually a recorded message from the remote party explaining the fault) before the call is dropped by the TDM switch with a 480 and Reason header containing an appropriate cause code. I simply want FreeSWITCH to pass the Reason header from the bridge attempt back to the A party unchanged. I had limited success using ${originate_disposition} in the hangup application however this does not work where there's early media (and in any event doesn't return the same q.850 code but it does return something indicative of an error (usually) "NO_USER_RESPONSE" but still with a code 16. SIP Trace (altered to remove some host-identifying information) is available at; http://pastebin.freeswitch.org/14949 Regards, Ross On 10 Nov 2010, at 17:03, Eduardo Nunes Pereira 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@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