Call transfer on DAHDI channells

All channels on Asterisk configured as DAHDI channels.After customer make payment I want to transfer the customer to the representative who interact customer before.

I try to make it by Dial() command. This is the dialplan

exten => s,1,Set(TRFNUM=${CALLERID(num)}) exten => s,2,Set(TRFNAME=${CALLERID(name)}) exten => s,3,AGI(agi:// exten => s,4,Dial(DAHDI/1/${TRFNUM}&DAHDI/2/${TRFNUM}&DAHDI/3/${TRFNUM}&DAHDI/4/${TRFNUM}&DAHDI/5/${TRFNUM}&DAHDI/6/${TRFNUM}&DAHDI/7/${TRFNUM}&DAHDI/8/${TRFNUM},30) exten => s,5,Hangup

For example: Call comes to DAHDI/1 after the payment DAHDI/1 dial all channels one them Answer the others Hangup. DAHDI/1 bridge call by with DAHDI/2. However, although Customer and representative close phones, Channels do not Hangup. They stay Busy.

Where do i make mistake. I should hangup call channels or find another way to transfer.

You have two priority 1s and no priority 3 (most people use n).

We have no idea what your AGI script does.

Parallel dialing the same number on all you PSTN lines is anti-social.

You appear to be trying to call the customer back whilst they are still on the incoming call. That will give busy or confuse the customer.

Sorry, i correct the priority mistake. Actually, agi make credit card payment, and after agi complete, two Dahdi make bridge and provide call back to representetive. Howover after conversation, although customer and repretitive hangup their phones channel are kept busy. Dial plan stack at line 4. :frowning:

Sounds like your PSTN operator doesn’t provide disconnect supervision, or you haven’t configured it properly.

Note, with disconnect supervision working, if the customer hangs up, the all will stop there. I think you have some misunderstanding about what happens, and what you can do, after a caller hangs up.

I wrote what i saw at CLI:

–Called 2/7024
–DAHDI/2-1 answered DAHDI/1-1
–Native bridging DAHDI/1-1 and DAHDI/2-1

and it stops here. After bridge dialplan stacked, even if both of them close their phones. I use “core restart now” command to make channel available.

When i restart dahdi service it give an error:

Running dahdi_cfg: DAHDI_ATTACH_ECHOCAN failed on channel 1: Invalid argument (22)

Does the problem above prevent diconnect supervision ?

No. The preferred way of doing disconnect solution is a DC condition on the line (removal of battery voltage). The alternative method supported by Asterisk is to listen for a continuous tone. If the calling network cannot provide either of these, only the callee can clear. You must enable the appropriate one, in dahdi.conf, for it to be used.