Difference between revisions of "M2 disable Q.850 Reason header"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with 'By default M2 includes Reason header in SIP BYE responses:<br><br> ''BYE sip:370123456789@192.168.0.152:5061 SIP/2.0''<br> ''Via: SIP/2.0/UDP 192.168.0.76;rport;branch=z9hG4bK3Z…')
 
Line 37: Line 37:
  </include>
  </include>


Finally, reload Freeswitch:<br>
Finally, reload Freeswitch (calls will not be interrupted):<br>


  fs_cli -x 'reloadxml'
  fs_cli -x 'reloadxml'

Revision as of 09:08, 15 July 2016

By default M2 includes Reason header in SIP BYE responses:

BYE sip:370123456789@192.168.0.152:5061 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.76;rport;branch=z9hG4bK3Zrv20HHeyacF
Max-Forwards: 70
From: "370123456789" <sip:370123456789@192.168.0.76>;tag=v0Ue8B69apBBm
To: <sip:370123456789@192.168.0.152:5061>;tag=1706d10c
Call-ID: 1ee7c716-c50b-1234-78a6-080027b06215
CSeq: 93950057 BYE
User-Agent: M2 Switch
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Reason: Q.850;cause=16;text="NORMAL_CLEARING"
Content-Length: 0

It is possible to remove this header by modifying /usr/local/freeswitch/conf/dialplan/m2.xml config file. Add two lines above 'm2_radius_auth':

<action application="set" data="disable_q850_reason=true"/>
<action application="export" data="disable_q850_reason=true"/>

After modification, config file should look like this:

<?xml version="1.0" encoding="utf-8"?>

<include>
  <context name="m2">
    <extension name="m2_default">
      <condition>
        <action application="set" data="disable_q850_reason=true"/>
        <action application="export" data="disable_q850_reason=true"/>
        <action application="m2_radius_auth"/>
        <action application="lua" data="m2_process_response.lua"/>
        <action application="hangup"/>
      </condition>
    </extension>
  </context>
</include>

Finally, reload Freeswitch (calls will not be interrupted):

fs_cli -x 'reloadxml'