nr_scroute failed in ISDN protocol

rated by 0 users
This post has 6 Replies | 2 Followers

Top 150 Contributor
Posts 43
Points 750
biased36 Posted: 06-16-2009 7:41 AM

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 success

nr_scroute(dtiB1T1, SRLDEVICE) failed:Unknown error, No error
:P_ISDN:V_dxxxB1C1 (Successfully)(Number of Channel: 6)

Successfully opened


 gc_GetResourceH success



 dx_open success

nr_scroute(dtiB1T2, SRLDEVICE) failed:Unknown error, No error
:P_ISDN:V_dxxxB1C2 (Successfully)(Number of Channel: 7)

Successfully opened


 gc_GetResourceH success



 dx_open success

nr_scroute(dtiB1T3, SRLDEVICE) failed:Unknown error, No error
:P_ISDN:V_dxxxB1C3 (Successfully)(Number of Channel: 8)

Successfully opened


 gc_GetResourceH success



 dx_open success

nr_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, &timesloth, 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

Top 75 Contributor
Posts 81
Points 969

Hi,

Try this

nr_scroute(timesloth, SC_DTI, voiceh, SC_VOX, SC_FULLDUP)

Regards, Sudhakar Babu.G 

  • | Post Points: 20
Top 150 Contributor
Posts 43
Points 750

"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.

  • | Post Points: 35
Top 75 Contributor
Posts 81
Points 969

Hi,

 You can directly open voice in DMV with gc_OpenEx  :N_dtiB1T1:P_ISDN:V_dxxxB1C1.

Regards, Sudhakar Babu.G 

  • | Post Points: 5
Top 25 Contributor
Posts 155
Points 2,164
Dialogic Employee

You should define DTISC and FAXSC - ie. either add those two definitions to your preprocessor definitions in the project settings, or #define directly.

  • | Post Points: 20
Top 150 Contributor
Posts 43
Points 750

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?

  • | Post Points: 20
Top 100 Contributor
Male
Posts 55
Points 776

Hi All,

I try to use this nr_scroute() function and got unknown error.

 

Thanks,

Pijushcse.

  • | Post Points: 5
Page 1 of 1 (7 items) | RSS