View Full Version : SOS : Sample code for Call Transfer

12-27-09, 03:41 AM
could any one help me with sample "C" code for Transfer of calls to a fixed number

the original call is always incoming... I need to tfr that call to the same number if the user chooses to speak to that fixed number(by pressing some digit) . The original call is from an E1 trunk from an analog PBX

I just need the code for calling calltransfer, using the original call handle and handle returned for second call later to release both the calls.

12-30-09, 11:39 AM
E1 call transfer:
Transfering a call using E1 isdn lines.
Your options are:
1) 1B transfer
2) 2B transfer
3) Selecting a second channel to make the second call and connect the 2 channels together.
If you would like to use 1B or 2B transfer method, the pbx must be able to support this feature.

Pika AoB product:
If this is an AoB product (primenetMM), then you can get sample code for 1B and 2B transfers on the sample code page at Pika's web site (Sample Code - DSP based (AoB)). Look for E1 1B transfer and E1 2B transfer sample code.
Remember to use this type of transfer your pbx must support it.

Pika AoH product:
For AoH there is no sample code available for 1B or 2B transfers.
If you are using the high level api/Grand Prix, Pika does not support this feature yet.
Selecting a second channel to make the second call and connect the 2 channels together is your best option.
If you can, the option to implement the 1B or 2B transfer at the AoH low level is there but as mentioned Pika does not have any sample code for you to reference.

01-06-10, 05:25 AM
Could u help me with sample code for siezing a channel for making a call... the first call is incoming.... i need to sieze a second channel to connect the first call to.... im using tha sample code ivr for the purpose

it seems Aoh HMP supports call tfr on analog & cas chs.... the function takes in first call handle, call info, call settings and returns the handle of the second call which actually uses the same channel as the first call. Here im confused about handling the callhandle info with ref to global structure given in the ivr sample code.

02-04-10, 07:49 AM

Maybe you should first read the documentation of the AOH API ? White Books, Programming Guide then API Reference.

You can find some code examples to help you doing these stuff.

There is no "Ready To Run" C Apps for those kinds of thing.

You have to :
- Accept Call,
- Playing Sound,
- If Digit Event arrives :
- Initiating a call on a new channel to your number,
- connecting both channels (incoming and outgoing),
- When Disconnect arrives on a channel, Disconnect the other.

There is examples for all those tasks that you have to fit whith your needs.

And for best performance, maybe you should seize all your channels when you launch your app.

Good Luck, Guillaume.