user_onhook.c

来自「ipt网关源码」· C语言 代码 · 共 29 行

C
29
字号
#include <srllib.h>
#include <dxxxlib.h>
#include <dm3comp.h>
#include <stdio.h>

BOOL pstnOnHook(int channel);

void user_onhook(int channel)
{
     BOOL rBool;
	//使用同步停止通道
	  if (dx_stopch(channel, EV_SYNC)==-1) {
      	  printf("Error in stop channel %d !\n",channel);
	  }
		 /* Set PSTN on-hook */
			    rBool = pstnOnHook(channel);
			    if(rBool==DM3FAIL) {
				    //gateFATAL(channel,(Session[channel].LogFile,"\tError setting on hook for channel %d in Wait For Disconnect\n",
					//		channel));
					printf("Error setting on hook for channel %d in Wait For Disconnect\n",channel);

					if (dx_sethook(channel,DX_ONHOOK,EV_SYNC) == -1) {
                           printf("Error in set channel %d on hook SYNC!\n",channel);		 
					   }
				//	   gateUpdate(pCamelSession,GATE_WAIT_CALL);
			    }  

       
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?