Method: SetHookFlashDuration


Function:

 

Set the duration of the Hool-Flash generation for a voice modem line.

     

Parameters:

 

Duration(Long):

The duration of the hook-flash in milli-second.


AtCmd
(String):

The AT COMMAND string used to set the hook-flash duration.Most modems recognize "ats29=X" as the command. X is the 1/10 of the duration in milli-second. For example, "ats29=20" will set the duration 200 ms. If this parameter is passed with an empty string, it will use the default command string "ats29=X" as the command string, X will be replace with a value of the 1/10 of the first parameter Duration. Otherwise it will use AtCmd as the command.

 

     

Description:

 

SetHookFlashDuration only affect voice modems. If you are using a voice board, you should set the Hook-Flash duration in the TSP configuration dialog instead. This method should be called before Initialize called. When the Initialize is called, it will add the AT COMMAND string to the corresponding area of every modem in registry, and it will take effect. Methods involved by Hook-Flash including

StartTransfer CompleteTransfer, CancelTransfer,BlindTransfer, Hold, Unhold,SwapHold will be affected by this method.

     

Dependencies:

 

None

     

Events Raised:

 

None

     

Relevances:

 

SetDigitDuration StartTransfer CompleteTransfer, CancelTransfer,BlindTransfer, Hold, Unhold,SwapHold

Sample Code In Visual Basic:

'The following example show how to use SetHookFlashDuratioin and SetDigitDuration.

Sub Form_Load()

va.SetHookFlashDuration 200,"" ' You can also use va.SetHookFlashDuration 20,"ats29=20"

va.SetDigitDuration 400,"" 'You can also use va.SetDigitDuration 400,"at+vtd=40"

va.Initialize ""

End Sub