Hello everybody, I want to run an global call API based IVR application. I am using digital card DMV600BTEP & ISDN protocol. But while running the app it shows that nr_scroute failed.
I have my gc_config file as follows:
<GC_Config><NumOfPort>4</NumOfPort><port><protocol>ISDN</protocol><dtname>dtiB1T1</dtname><dxname>dxxxB1C1</dxname><direction>1/0</direction></port><port><protocol>ISDN</protocol><dtname>dtiB1T2</dtname><dxname>dxxxB1C2</dxname><direction>1/0</direction></port><port><protocol>ISDN</protocol><dtname>dtiB1T3</dtname><dxname>dxxxB1C3</dxname><direction>1/0</direction></port><port><protocol>ISDN</protocol><dtname>dtiB1T4</dtname><dxname>dxxxB1C4</dxname><direction>1/0</direction></port><port>
My program output is as follows:
gc_GetResourceH success dx_open successnr_scroute(dtiB1T1, SRLDEVICE) failed:Unknown error, No error:P_ISDN:V_dxxxB1C1 (Successfully)(Number of Channel: 6)Successfully opened gc_GetResourceH success dx_open successnr_scroute(dtiB1T2, SRLDEVICE) failed:Unknown error, No error:P_ISDN:V_dxxxB1C2 (Successfully)(Number of Channel: 7)Successfully opened gc_GetResourceH success dx_open successnr_scroute(dtiB1T3, SRLDEVICE) failed:Unknown error, No error:P_ISDN:V_dxxxB1C3 (Successfully)(Number of Channel: 8)Successfully opened gc_GetResourceH success dx_open successnr_scroute(dtiB1T4, SRLDEVICE) failed:Unknown error, No error:P_ISDN:V_dxxxB1C4 (Successfully)(Number of Channel: 9)
I have attched sctools.cpp in my project to compile it directly
my function where I have used nr_scroute is as below
int VoiceChannel :: openChannel(void){ int cclibid; /* cclib id for gc_ErrorValue( ) */ int gc_error; /* GlobalCall error code */ long cc_error; /* Call Control Library error code */ char *msg; /* points */ ret = 0; sr_hold(); sprintf(devname, ""); //sprintf(devname, ":P_%s:V_%s", protocol, dxname); sprintf(devname, ":N_%s:P_ISDN", dtname); if(gc_OpenEx(&ldev, devname, EV_SYNC, (void *)this) != GC_SUCCESS) { exHandle.errorTime = CTime::GetCurrentTime(); sprintf(exHandle.logData , "gc_OpenEx() Failed: Time: [%.2d:%.2d:%.2d]\n\n", exHandle.errorTime.GetHour(), exHandle.errorTime.GetMinute(), exHandle.errorTime.GetSecond()); exHandle.updateLog(exHandle.logData, 1); printf("%s", exHandle.logData); ret = -1; } else { printf("Successfully opened\n"); ret = 0; } if (gc_GetResourceH(ldev, ×loth, GC_NETWORKDEVICE) != GC_SUCCESS) { exHandle.errorTime = CTime::GetCurrentTime(); sprintf(exHandle.logData , "gc_GetVoiceH(): Failed: Time: [%.2d:%.2d:%.2d]\n\n", exHandle.errorTime.GetHour(), exHandle.errorTime.GetMinute(), exHandle.errorTime.GetSecond()); exHandle.updateLog(exHandle.logData, 1); printf("%s", exHandle.logData); ret = -1; } else { printf("\n\n gc_GetResourceH success\n\n"); ret = 0; } if(voiceh=dx_open(dxname,NULL) == -1) { printf("\n\n dx_open failed"); } else { printf("\n\n dx_open success"); } if (nr_scroute(voiceh, SC_VOX,timesloth, SC_DTI,SC_FULLDUP) == -1) { printf( "\n\nnr_scroute(%s, %s) failed:%s, %s\n", ATDV_NAMEP(timesloth), ATDV_NAMEP(voiceh), ATDV_ERRMSGP(timesloth), ATDV_ERRMSGP(voiceh)); //sr_release(); } else { printf("\n\n nr_scroute success"); } sr_release(); return ret;}
What can I do?
Thanks in advance
Hi, Try this nr_scroute(timesloth, SC_DTI, voiceh, SC_VOX, SC_FULLDUP)
Hi,
Try this
nr_scroute(timesloth, SC_DTI, voiceh, SC_VOX, SC_FULLDUP)
Regards, Sudhakar Babu.G +918019127694
"if you have not defined DTISC and FAXSC when compiling the sctools.c file, you cannot use this function to route digital channels, MSI stations, or fax channels."
I just find it and wanna know how will I define DTISC?
In my Sctools class(sctools.cpp copied from sctools.c) some lines' color indicates that DTISC has not been defined.
#ifdef DTISC#include <dtilib.h> ///// very light..mudddy#include <msilib.h> ///// very light muddy....that means these 2 header file has not been included.#endif
Again in the body of the nr_scroute() function all the lines of code in #ifdef DTISC........#endif block are very light...
So u seems to be a very experienced person. Pls reply.
Thanks for all.
You can directly open voice in DMV with gc_OpenEx :N_dtiB1T1:P_ISDN:V_dxxxB1C1.
You should define DTISC and FAXSC - ie. either add those two definitions to your preprocessor definitions in the project settings, or #define directly.
Everything is ok except call is not landing i.e when I call dialing the short code call cant connect to my application...in Mobile i find network busy...
What can i do?