收藏 分销(赏)

dialogic 摘挂机的检测.doc

上传人:pc****0 文档编号:6626002 上传时间:2024-12-17 格式:DOC 页数:6 大小:34KB
下载 相关 举报
dialogic 摘挂机的检测.doc_第1页
第1页 / 共6页
dialogic 摘挂机的检测.doc_第2页
第2页 / 共6页
点击查看更多>>
资源描述
Disconnect Supervision When the caller hangs up, Dialogic card does not detect the disconnection. Why? Most of the PBXs and switches today do not use loop current drop to notify the other party of the disconnection. Instead, They use "disconnect tone", which is usually the same as busy tone. Disconnect tone will be sent to the called party as soon as the calling party hangs up. For local calls, however, the disconnect tone is usually sent to the calling party 30 seconds after the called party hangs up. Dialogic cards, by default, is enabled to detect loop current drop. However, disconnect tone supervision is not enabled. How to implement Disconnect Tone Supervision? There are two ways of implementation: Advanced Tone Feature (driver approach) Global Tone Detection (application approach) 1. Advanced Tone Feature This feature is currently available on DOS, Windows 95 and Windows NT (Streams version SDK only). This method makes use of Tone Set File created by PBXpert or PBXpert/32. By simply using appropriate TSF file, you can make your system to work on any analog switches or PBXs. To enable this feature, do the following: For Windows NT: Click Start/Programs/Dialogic System Software/Advanced Tone Features program item. Then tick Disconnect Tone Supervision and Tone Set File Enabled buttons on the Advanced Tone Features window. Lastly, specify the TSF file to be used. For Windows 95: Similar to that of Windows NT. The path is Start/Programs/Dialogic Development Package/Configuration Manager. Then click Advanced button on the Dialogic Configuration Manager window. For DOS: After Dialogic voice driver is loaded, run TONEDNLD.EXE program to overwrite the default tone definitions contained in the driver with those contained in the TSF file. genload d40drv -h<hardware interrupt> TONEDNLD -f<path><filename.tsf> -h<hardware interrupt> After ATF is enabled, the default tone definitions contained in the driver are overwritten with those contained in the TSF file. When the disconnect tone is detected, an LCOFF event will be generated, as if it is a loop current drop event. The example in asynchronous callback model below shows how to terminate dx_play() function upon detection of disconnect tone. void start_playback (int index) { DV_TPT tpt[1] = {0}; dx_clrtpt(tpt,1); tpt[0].tp_type = IO_EOT; tpt[0].tp_termno = DX_LCOFF; tpt[0].tp_length = 1; tpt[0].tp_flags = TF_LCOFF; : if (dx_play(Channel[index].voxhdl, &Channel[index].iott, tpt, EV_ASYNC) == -1) { : } int play_handler (void) { : device = sr_getevtdev(0); cause = ATDX_TERMMSK(device); if (cause & TM_LCOFF){ printf("Play terminated due to Loop Current Drop\n"); disconnect(device); : } Make sure you do not enable DM_LCOFF with dx_setevtmsk(), otherwise TDX_CST event will be generated and captured by CST handler. 2. Global Tone Detection This approach can be used in all platforms. You need to add codes into your application to detect the specified disconnect tone(s). To make your application more portable across PBXs, I suggest that you make your application read a parameter file in which the disconnect tone definitions is defined. The example below shows you how to do it: #define POTS_DISCTONE 201 void main(int argc, char *argv[]) { : for(n=0; n<NumOfChannels; n++) if (dx_deltones(Channel[n].voxhdl) == -1) process_error(Channel[n].voxhdl, "dx_deltones"); // Singapore disconnect tone 425 Hz, 750 ms on, 750 ms off if (dx_bldstcad(POTS_DISCTONE,425,30,75,6,75,6,2) == -1) process_error(Channel[n].voxhdl, "dx_bldstcad"); for(n=0; n<NumOfChannels; n++) if (dx_addtone(Channel[n].voxhdl,NULL,0) == -1) process_error(Channel[n].voxhdl,"dx_addtone"); : } You can disconnect the line either with TPT or CST handler. 2.1 Use TPT to terminate playback or recording then disconnect the line. void start_playback (int index) { DV_TPT tpt[1] = {0}; dx_clrtpt(tpt,1); tpt[0].tp_type = IO_EOT; tpt[0].tp_termno = DX_TONE; tpt[0].tp_length = POTS_DISCTONE; tpt[0].tp_flags = TF_TONE; tpt[0].tp_data = DX_TONEON; : if (dx_play(Channel[index].voxhdl, &Channel[index].iott, tpt, EV_ASYNC) == -1) { : } int play_handler (void) { : device = sr_getevtdev(0); cause = ATDX_TERMMSK(device); if (cause & TM_TONE){ printf("Play terminated due to Loop Current Drop\n"); disconnect(device); : } 2.2 Use CST handler to disconnect the line. int cst_hndlr(void) { DX_CST *cstp; device = sr_getevtdev(0); cstp = sr_getevtdatap(0); switch (cstp->cst_event){ case DE_TONEON: if (cstp->cst_data == POTS_DISCTONE) { voxstate = ATDX_STATE(device); if ((voxstate==CS_PLAY)||(voxstate==CS_RECD)) { /* if in record or play, stop activity on voice channel*/ if (dx_stopch(device, EV_ASYNC)==-1) printf("ERROR: dx_stopch() failed\n"); } disconnect(device); : } Attachments: Demo program Home | What's New | Search | FAQs | Feedback Product Installation | Sample Code | Technical Notes | Technical Tips | Release Notes | Application Notes Problem Tracking Reports | Download Page | Discussion Web | Software Releases | Online Resources © 1997 by Dialogic Corporation Dialogic World Headquarters 1515 Route 10 Parsippany, NJ 07054 USA Technical Support Email: custeng@ Technical Support Hotline: 973-993-1443 Technical Support Fax: 973-993-8387
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 百科休闲 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服