How to change 9 seconds timer of app_fax_detect.2.1.2.3.tcl to 6 only?

Version 1
    This document was generated from CDN thread

    Created by: Sherif Mansour on 28-02-2012 04:07:07 AM
    9 seconds is too much, I want
    to  change it to 6 seconds by replacing the "9" in the script by "6"
    but it  is still 9 seconds as it is..
     
    I am not a developer at all so thats why I am having some difficulties.  I ran some applications debugs on the GW but still did not help that much..
     
    Any help will be much appreciated. thanks in advance.

    Subject: RE: How to change 9 seconds timer of app_fax_detect.2.1.2.3.tcl to 6 only?
    Replied by: Anusha Kannappan on 28-02-2012 04:47:43 AM
    Hi Sherif,

    Even if we change the harcoded time from 9 to 6 in the script, it will be over written by the following procedure that is being called for calculating the duration of cng tone detection. It is making use of the 'The leg tonedetect command which enables or disables the detection of specific tones during a call'.


    proc start_cng_detection {} {
      global CALL_ID
      global MIN_CNG_DETECTION_TIME

      #Start CNG detection
      # Returns the minimum time (in seconds) required to detect the CNG tone
      set MIN_CNG_DETECTION_TIME [leg tonedetect leg_incoming enable cng]
      set MIN_CNG_DETECTION_TIME [string trim $MIN_CNG_DETECTION_TIME]

    puts "\[Call $CALL_ID\] Start CNG detection"
    }


    Also the required minimum time is computed by Number Cycles times the minimum time required for that specific tone. In our script it is not set which is taking the default value of 1 cycle.

    Thanks,
    Anusha

    Subject: RE: How to change 9 seconds timer of app_fax_detect.2.1.2.3.tcl to 6 only?
    Replied by: Yaw-Ming Chen on 28-02-2012 11:04:07 AM
    One thing you can try is to force it not over written by comment out "set MIN_CNG_DETECTION_TIME [leg tonedetect leg_incoming enable cng]" this line (change to
    # set MIN_CNG_DETECTION_TIME [leg tonedetect leg_incoming enable cng]

    Don't know what will happen but at least you can try.


    #Start CNG detection
    # Returns the minimum time (in seconds) required to detect the CNG tone
    # set MIN_CNG_DETECTION_TIME [leg tonedetect leg_incoming enable cng]
    set MIN_CNG_DETECTION_TIME [string trim $MIN_CNG_DETECTION_TIME]

    Subject: RE: How to change 9 seconds timer of app_fax_detect.2.1.2.3.tcl to 6 only?
    Replied by: Sherif Mansour on 28-02-2012 08:21:39 AM
    Hi Anusha,

    Thanks for your reply, but sorry for my low developing skills, does that mean it cannot be changed? How (if possible) can I edit the procedure start_cng_detection to let the CNG tone detection last only for 6 seconds?

    Thanks a lot for your cooperation.
    Sherif Mansour

    Subject: RE: How to change 9 seconds timer of app_fax_detect.2.1.2.3.tcl to 6 only?
    Replied by: Sherif Mansour on 05-03-2012 08:00:20 AM
    Thanks Yaw-Ming, problem is that the only way to test is on live environment, so am not sure how i will do it, but I will think of something and get back to you, thanks a lot.