JCT-Enabling Ringback in the PDK US_MF_IO protocol

Application

This note is to takes a user through the process of enabling ringback on a digital T1 CAS to be used by Global call to generate ringback to a calling party 

Procedure Summary

Enabling Ringback is accomplished through editing a variable in the pdk_us_mf_io.cdp, named CDP_IN_EnableRingBack. Once this setting is enabled, the # of rings to use in ringback is set in either the gc_AcceptCall or the gc_AnswerCall function. 

Procedure

Open the pdk_us_mf_io in the document editor. Search for the EnableRingBack variable. Set the value of the variable CDP_IN_EnableRingBack “1”, then save and close the file. Restart the DCM services if you are running DM3 cards. Example of variable follows: 

/* Generate a ring back before answering call. The number of */ /* rings generated is determined by the value passed by */ /* gc_AcceptCall() or gc_AnswerCall() */ All BOOLEAN_t CDP_IN_EnableRingBack = 1

 

Now that Ringback is enabled, you must edit your application to use Ringback. The functions that use ringback are gc_AnswerCall and gc_AcceptCall. 

AnswerCall

Answer Call

int gc_AnswerCall(crn, rings, mode)

 

 

The rings input variable, in this case, specifies the number of rings that will occur between the function call and when the state changes to Connected. This variable is ignored if the gc_AcceptCall was called before gc_AnswerCall, as the call will be immediately answered without ringback if gc_AcceptCall was performed first. If the setting is 0 – 14, that many rings will be performed. If the variable is set for 15 or higher, the function will ring indefinitely. 

AcceptCall 

Accept Call

int gc_AcceptCall(crn, rings, mode)

 

The rings input variable, in this case, specifies the number of rings that will occur until gc_AnswerCall is performed. The rings will stop once gc_AnswerCall is performed, regardless if all rings occurred or not. However, if all rings occur and gc_AnswerCall has not been called, the ringing will stop and will stay silent. If the ring setting is from 0 – 14 rings, these rings will be performed until either they are completed or until gc_AnswerCall is performed. If the variable is set for 15 or higher, the rings will occur indefinately, or until gc_AnswerCall is performed. 

Ideal Use

The Ideal use for this particular function is to insert a ringback sound into a call between processing the DNIS and ANI (through outside applications, etc.) to give a progress indication to the caller while processing occurs. Setting the rings to 15 or higher would allow the rings to continue regardless of how long the pre-call processing takes. 

Important Notes

  • Remember, when using ringback, AcceptCall always voids the ringback setting on AnswerCall. If you wish to use a set amount of rings that always occur before a call is answered, do not call AcceptCall; use AnswerCall to move from the Offered state. 

  • Putting in the number of rings into the AcceptCall function will not guarantee that those many rings will occur, as AnswerCall will interrupt them once called. 

Product List

All Boards and system releases that use the pdk_us_mf_io.cdp file. 

 

Return to Documentation Home I Return to Sangoma Support