Login
|
Register
Home
Corporate Blog
Media & Downloads
Forums
Groups
Developers
Company
Find an API
Support
Training
Software
Manuals
Document Finder
Forums
»
Developer Forums
»
Dialogic Global Call and R4 APIs
»
cannot able to play a wave file
cannot able to play a wave file
rated by 0 users
This post has 35 Replies | 3 Followers
Posts
19
Points 440
Reply
Jefy
Posted: 06-04-2008 5:11 PM
rated by 0 users
Hi,
We are using intel dialogic D/240JCT-T1 Card.
We are using global functions for call controlling (gc_Open,gc_acceptcall, etc).
After accepting a call we are going to play a welcome message wave file, but we cannot able to play this wave file.
We are using "dx_play" API for playing a wave file.
But this API returning an error "Bad device/global parameter number."
How to correct this issue???
Jefy
| Post Points: 170
Posts
91
Points 1,100
Reply
david beyer
replied on
06-04-2008 8:31 PM
rated by 0 users
I don't see you mentioning that you're opening up the voice device with dx_open and that you pass that handle to the play function. The voice device would be something like dxxxB1C1.
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 11:33 AM
rated by 0 users
The code given below is use for opening a T1 device , open a voice channel and attach that channel to global call line device. But i cannot able to attach Voicesys channel into global line device. gc_AttachResource API return an error.
Error value is 137 - "CCLIB specific"
please check it...
LINEDEV ldev; /* GlobalCall line device handle */
int voiceh; /* Voice channel number */
int lineno, brds, tslots; /* Number of lines, boards and time slots */
int gc_error; /* GlobalCall Error */
int cclibid; /* CC Library ID */
long cc_error; /* Call Control Library error code */
char *msg; /* pointer to error message string */
/*
* Open line device for 1st network time slot on dtiB1 using inbound
* Brazilian R2 protocol [E-1 CAS].
*/
if (gc_Start(NULL) != GC_SUCCESS)
{
// sprintf(str, "gc_Start(startp = NULL) Failed");
// printandlog(ALL_DEVICES, GC_APIERR, NULL, str, 0);
return 0;
}
if (gc_Open(&ldev, ":N_dtiB1T1:P_ISDN", 0) == GC_SUCCESS) {
voiceh = dx_open("dxxxB1C1", NULL);
if (voiceh != -1)
{
if (gc_AttachResource(ldev, voiceh, NULL, NULL, GC_VOICEDEVICE,
EV_ASYNC ) == GC_SUCCESS)
{
/*
* Proceed to route the voice and network resources together,
* and then generate or wait for a call on the line device, 'ldev'.
*/
}
else
{
/* process gc_AttachResource( ) error return as shown */
gc_ErrorValue( &gc_error, &cclibid, &cc_error);
gc_ResultMsg( LIBID_GC, (long) gc_error, &msg);
printf ("Error on Device handle: 0x%lx, ErrorValue: %d - %s\n",
ldev, gc_error, msg);
return(gc_error);
}
}
else
{
/* Process dx_open( ) error */
}
}
else
{
/* process error from gc_Open( ) using gc_ErrorValue( ) */
/* and gc_ResultMsg( ) */
}
Jefy
| Post Points: 5
Posts
477
Points 6,458
Reply
Jeff Mason
replied on
06-05-2008 11:44 AM
rated by 0 users
Hi Jefy,
The reason for the failure is that gc_AttachResource is not supported on Springware, its only for DM3 boards. You need to follow a different method in this case. That being use dx and dti routing functions to make the dti device from the gc line (obatined thru gc_getnetworkh) and route that with voice device for full or half duplex route.
Jeff
| Post Points: 5
Posts
22
Points 230
Reply
Jerry
replied on
06-05-2008 1:45 PM
rated by 0 users
I don't know much about JCT boards but please look at the thread "Conference on springware". Might give you some clues.
Regards,
Jerry.
| Post Points: 5
Posts
834
Points 12,570
Reply
Leonid Pilifosov
replied on
06-05-2008 2:48 PM
rated by 0 users
Hi,
You cannot call any dx_xxx function on a device handle obtained via gc_Open. with this handle you can only call gc_XXX functions
There are 2 posible ways:
- you pass a voice device name to your gc_Open string, like :V_dxxxB1C1. In this case, after gc_Open successfully terminated, use gc_GetVoiceH(gc_handle, &voice_handle), and then use this voice_handle for dx_play etc
- you don't pas the voice name to gc_Open. In this case, use dx_open:
voice_handle = dx_open("dxxxB1C1",0).
In both cases after xx_Open you must call gc_GetXmitSlot to obtain the digital from timeslot info (dti_slot), and dx_getxmitslot to get a voice transmit time slot on the bus (vox_slot). Store these values somewhere, you won't need to call these 2 again.
Then you do dx_listen(voice_handle, dti_slot) and gc_Listen(gc_handle, vox_slot).
Now you are ready to play, record etc
Thanks, Leonid
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 3:50 PM
rated by 0 users
Hi,
Can you give me a sample code of this???
Thanks
Jefy
| Post Points: 5
Posts
834
Points 12,570
Reply
Leonid Pilifosov
replied on
06-05-2008 3:57 PM
rated by 0 users
GC_Simple_SW.zip
Here you are, some simple and quite dirty code I found in my archive. Should work, though. Fix FrontEnd.cpp around gc_Open to reflect your protocol an channel per span.
Thanks, Leonid
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 5:12 PM
rated by 0 users
Hi Leonid,
Thank You
I have changed gc_Open and compiled.
we are opening with device name is ":N_dtiB1T1:P_ISDN"
When running i am getting one error given below.
13:53:25.14 MEDIA dtiB1T1 Network TS = 4 gc_Attach failed:
13:53:29.983 ERR dtiB1T1 gcError = Function is not supported,ccRe
sult = 5388872
13:53:29.983 ERR dtiB1T1 ccValue = 0xa
please help me...
Thanks
Jefy
| Post Points: 5
Posts
834
Points 12,570
Reply
Leonid Pilifosov
replied on
06-05-2008 5:23 PM
rated by 0 users
Ignore this error, gc_Attach is not supported on Springware ISDN. You can also comment it out in FrontEnd.cpp, line 103.
Do you get an UNBLOCK event? Is your protocols ISDN? Please provide more info should you continue getting errors, and attach or paste the application log.
Thanks, Leonid
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 5:40 PM
rated by 0 users
Hi Leonid,
I have commented and run.
i have got the UNBLOCK event. I am using ISDN protocol.
But the application is not accepting the incoming calls.
This is log we are getting in console.
14:22:33.695 MEDIA dtiB1T1 Network TS = 4
14:22:34.773 MEDIA dtiB1T1 dx_listen(4)=0
14:22:34.773 PSTN dtiB1T1 dti_Listen(0)=0
14:22:35.476 PSTN dtiB1T1 GCEV_UNBLOCKED
14:22:35.476 PSTN dtiB1T1 gc_WaitCall(EV_ASYNC) = 0
Thank You
Jefy
| Post Points: 5
Posts
834
Points 12,570
Reply
Leonid Pilifosov
replied on
06-05-2008 5:47 PM
rated by 0 users
main.zip
Does it open only 1 channel? It's supposed to open thyem all.
Try attached, please.
Thanks, Leonid
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 6:03 PM
rated by 0 users
log.txt
Hi Leonid,
I have replaced attached two cpp files, and i have changed the "maxCalls = 23".
And i run the application, but the application not accepting the calls.
i have attached the log
please check it.....
Thank you
Jefy
| Post Points: 5
Posts
834
Points 12,570
Reply
Leonid Pilifosov
replied on
06-05-2008 6:14 PM
rated by 0 users
Yes, I don't see any calls either. Can you get an ISDN trace? you can use isdiag.exe utility from dialogic/bin
Go to command line, type isdiag 1 1 t s r and use the menu to start a trace.
Make a call, stop the trace, locate the created trace file. Then use pritrace.exe from dialogic/bin (command line) to convert this file to ASCII mode, passing your nbewly created .log file as an argument. And then please attach this file here. I'm not sure calls are hitting the box.
Thanks, Leonid
| Post Points: 5
Posts
19
Points 440
Reply
Jefy
replied on
06-05-2008 6:30 PM
rated by 0 users
1traceA.log
Hi Leonid,
I have run Isdiag.exe two time with different command line parameter.
1. ISdiag.exe 1 1 t s r
2. ISdiag.exe 1 1 t s v
in 2'nd case accepting calls. But in 1'st case not accetping the calls.
I have attached 2 log files in these two conditions.
Thank You
Jefy
| Post Points: 5
Previous
|
Next
Page 1 of 3 (36 items) 1
2
3
Next >
|
RSS