0
votes

I'm trying to complete software which does all call logic via AMI on it's own using Asterisk only as interface to VOIP, SIP/GSM. Almost everything works great, but...:

Here is my scenario: - incoming call is forwarded to announcement and then to MOH forever - my app decides which extensions to dial (7777) using AMI Action: Originate - once somebody picks up on extension, his/her channel (SIP/306-xxxxx for example) is bridged with waiting call's channel using AMI Action: Bridge

Until this point everything is working fine, both connected parties can hear each other, recording on demand works. All is fine.

Now I'm trying to make assisted transfer to another extension (Atxfer) using AMI on one of the bridged channels. And it doesn't work. I got couple of ami events about DTMF's on a channel (audio is muted while they are played). Every DTMF digit couses quick Bridge:unlink and Bridge:link event on AMI.

I tried to change dtmfmode, upgrade from asterisk 1.8 to 11 (asterisk now) and it always was the same.

While having this problems with Atxfer blind transfer on those channels works (using AMI Action: Redirect).

full log shows nothing something like this:

[2013-11-11 20:24:57] DEBUG[9457]: features.c:3740 feature_interpret: Feature interpret: chan=SIP/306-00000017, peer=SIP/GTS-00000016, code=*2, sense=1, features=0, dynamic=apprecord#apprecord

1

1 Answers

0
votes

I recommend you read some asterisk book for beginner like ORelly's "Asterisk the future of telephony".

In you case correct solution is use asterisk Dial command for first channel instead of second call creation.

It is not clear how you do transfer using AMI. If you want do it via ami(which is VERY bad way), you have do something like following

  • On transfer request(digit) unbridge channels. Better put it in AsyncAGI after that.

  • Collect digits where to transfer using Read command

  • Transfer to new destination

  • If fail bridge again

NOTE: You resulting application will be really buggy and not scalable. AMI interface is not designed to do such things and work very bad when you have alot of actions and channels running on same box. So you have test your app under hi concurrent load to ensure it work(or more likly not work).