Query on using local channels with originate + CDR issue

408 views
Skip to first unread message

Vijay Bhaskar Reddy R

unread,
Jan 7, 2012, 3:29:27 AM1/7/12
to Adhearsion
Hi All,

I am new to adhearsion and need your help regarding the following
scenario.

Call Alice's number, and present IVR menu. If Alice presses digit 1,
then dial Bob's Number

I am using Adhearsion AMI Originate API to place a call on one leg,
and on the other leg connecting it to an extension in dialplan and
presenting the
IVR menu. After receiveing the input from from Alice, Bob's number is
dialed from dialplan.
This works fine, But call details for the call A(Originated by
AMI) are not logged to CDR, only call details for call B are logged to
CDR.

I tried using local channel in Originate API, then dial the number A
from the dial plan. This approach fixes the CDR issue, But IVR menu
starts playing as soon as local channel is answered but before the
call is actually answered by Alice. Because of this, Alice can not
hear the IVR menu welcome prompt message from the beginning.

Please let me know if you have any ides to fix the above.

Thanks
Vijay

kp666

unread,
Jan 8, 2012, 2:31:43 PM1/8/12
to Adhearsion
If ur using asterisk 1.6 u would have to set the right alias in
cdr_mysql.conf

eg: http://pastie.org/private/isn4yxvge9gceup5lc2pdg

Vijay Bhaskar Reddy R

unread,
Jan 8, 2012, 5:15:27 PM1/8/12
to adhea...@googlegroups.com
thanks for the quick reply.  I will give it a try with mysql and let you know. 

I am using Asterisk 1.8 and CSV file for storing CDR.

Thanks
Vijay

--
You received this message because you are subscribed to the Google Groups "Adhearsion" group.
To post to this group, send email to adhea...@googlegroups.com.
To unsubscribe from this group, send email to adhearsion+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adhearsion?hl=en.


Ben Klang

unread,
Jan 9, 2012, 8:16:27 AM1/9/12
to adhea...@googlegroups.com
Personally, I try to avoid using Local channels wherever possible because they make the CDR much more difficult to follow and they can introduce strange behavior like the early answer you experienced.

The reason you were only receiving one CDR record is because Asterisk was treating it as a single call.  When you Originate, you are setting up two legs of the same call (from Asterisk's perspective).  There are at least two ways to deal with this:

1) Your reporting tool can be smart enough to realize that the same call should result in two billing records since it connects two customers

2) Alternatively, if you really need two CDR entries, then try using the ForkCDR dialplan application.  You can call it like this from Adhearsion:

execute 'ForkCDR'

This will result in the original CDR being detached from the new CDR.  On the second leg you can then set whatever channel variables you like, such as caller ID, so that the two entries have whatever different information you require.  See https://wiki.asterisk.org/wiki/display/AST/Application_ForkCDR

/BAK/
-- 
Ben Klang

Mojo Lingo -- Voice applications that work like magic
Twitter: @MojoLingo

Please let me know if you have any ides to fix the above.

Thanks
Vijay

Reply all
Reply to author
Forward
0 new messages