Hi everyone How can I get the current calls details in asterisk.if I use cli commad core show channels,there is two channels of each call.But the requirement is, need to get caller ,calee,starttime ,duration of the current calls.This value should be proper for call forward,call transfer ,and scenarios.Please help me on this. Thanks Nikhil
Am 02.02.2011 04:34, schrieb Nikhil:> Hi everyone > How can I get the current calls details in asterisk.if I use cli > commad core show channels,there is two channels of each call.But the > requirement is, need to get caller ,calee,starttime ,duration of the > current calls.This value should be proper for call forward,call > transfer ,and scenarios.Please help me on this. > > ThanksTry this: bash# /usr/sbin/asterisk -rx "core show channels verbose"
Any suggestions .. On 02/02/2011 09:04 AM, Nikhil wrote:> Hi everyone > How can I get the current calls details in asterisk.if I use cli > commad core show channels,there is two channels of each call.But the > requirement is, need to get caller ,calee,starttime ,duration of the > current calls.This value should be proper for call forward,call > transfer ,and scenarios.Please help me on this. > > Thanks > Nikhil > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
Hi Thorsten Thanks of reply. The command core show verbose is working. but the problem is, for one call we can see 2 results,there is no common field on these two.How I parse these result to get the proper values.(Caller,callee,starttime,duration). Thanks nikhil On 02/02/2011 03:11 PM, Thorsten G?llner wrote:> Am 02.02.2011 04:34, schrieb Nikhil: >> Hi everyone >> How can I get the current calls details in asterisk.if I use cli >> commad core show channels,there is two channels of each call.But the >> requirement is, need to get caller ,calee,starttime ,duration of the >> current calls.This value should be proper for call forward,call >> transfer ,and scenarios.Please help me on this. >> >> Thanks > Try this: > > bash# /usr/sbin/asterisk -rx "core show channels verbose" > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > >
On Wed, 2011-02-02 at 09:04 +0530, Nikhil wrote:> Hi everyone > How can I get the current calls details in asterisk.if I use cli > commad core show channels,there is two channels of each call.But the > requirement is, need to get caller ,calee,starttime ,duration of the > current calls.This value should be proper for call forward,call transfer > ,and scenarios.Please help me on this. > > Thanks > NikhilFor one of each pair channels do core show channel <channel name>> > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Ishfaq Malik Software Developer PackNet Ltd Office: 0161 660 3062
thanks for reply.. I know these commands .But my requirement is I should show the current call details to GUI eg: Caller Callee Starttime Duration 101 104 2010-12-21 12:24:34 PM 10 Now tel me how I get these values by give commands to asterisk. Thanks Nikhil On 02/02/2011 03:58 PM, Ishfaq Malik wrote:> On Wed, 2011-02-02 at 09:04 +0530, Nikhil wrote: >> Hi everyone >> How can I get the current calls details in asterisk.if I use cli >> commad core show channels,there is two channels of each call.But the >> requirement is, need to get caller ,calee,starttime ,duration of the >> current calls.This value should be proper for call forward,call transfer >> ,and scenarios.Please help me on this. >> >> Thanks >> Nikhil > For one of each pair channels do > core show channel<channel name> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> New to Asterisk? Join us for a live introductory webinar every Thurs: >> http://www.asterisk.org/hello >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users
Use the asterisk AMI to send a sequence of commands to the asterisk box and then parse the results to the output of your choice. http://www.voip-info.org/wiki/view/Asterisk+manager+API So, for instance, you could write a function that first does a core show channels via the AMI and then does core show channel <channel name> for the channels returned storing only the information you require On Wed, 2011-02-02 at 16:40 +0530, Nikhil wrote:> thanks for reply.. > I know these commands .But my requirement is I should show the current > call details to GUI > eg: > > Caller Callee Starttime Duration > > 101 104 2010-12-21 12:24:34 PM 10 > > Now tel me how I get these values by give commands to asterisk. > > Thanks > Nikhil > > > On 02/02/2011 03:58 PM, Ishfaq Malik wrote: > > On Wed, 2011-02-02 at 09:04 +0530, Nikhil wrote: > >> Hi everyone > >> How can I get the current calls details in asterisk.if I use cli > >> commad core show channels,there is two channels of each call.But the > >> requirement is, need to get caller ,calee,starttime ,duration of the > >> current calls.This value should be proper for call forward,call transfer > >> ,and scenarios.Please help me on this. > >> > >> Thanks > >> Nikhil > > For one of each pair channels do > > core show channel<channel name> > >> -- > >> _____________________________________________________________________ > >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > >> New to Asterisk? Join us for a live introductory webinar every Thurs: > >> http://www.asterisk.org/hello > >> > >> asterisk-users mailing list > >> To UNSUBSCRIBE or update options visit: > >> http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users-- Ishfaq Malik Software Developer PackNet Ltd Office: 0161 660 3062
Well, for me it seems to be simple: Just parse "core show channels verbose". If you "see" 2 lines per call the field "Channel" should be unique. After parsing write it to a flat file or to a database which you query in your gui/webinterface. Am 02.02.2011 12:10, schrieb Nikhil:> thanks for reply.. > I know these commands .But my requirement is I should show the current > call details to GUI > eg: > > Caller Callee Starttime Duration > > 101 104 2010-12-21 12:24:34 PM 10 > > Now tel me how I get these values by give commands to asterisk. > > Thanks > Nikhil > > > On 02/02/2011 03:58 PM, Ishfaq Malik wrote: >> On Wed, 2011-02-02 at 09:04 +0530, Nikhil wrote: >>> Hi everyone >>> How can I get the current calls details in asterisk.if I use cli >>> commad core show channels,there is two channels of each call.But the >>> requirement is, need to get caller ,calee,starttime ,duration of the >>> current calls.This value should be proper for call forward,call >>> transfer >>> ,and scenarios.Please help me on this. >>> >>> Thanks >>> Nikhil >> For one of each pair channels do >> core show channel<channel name> >>> -- >>> _____________________________________________________________________ >>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>> http://www.asterisk.org/hello >>> >>> asterisk-users mailing list >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-users > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- Thorsten G?llner OVM Office Voice Media GmbH Herderstrasse 68 40237 D?sseldorf Tel.: +49(0)211 / 618 57 53 Fax: +49(0)211 / 618 57 54
On Wed, Feb 02, 2011 at 03:29:37PM +0530, Nikhil wrote:> Thanks of reply. The command core show verbose is working. but the > problem is, for one call we can see 2 results,there is no common field > on these two.Take a closer look at the output. The link between the 2 can be found by matching channel==dstchannel for all channels. -- Daniel Tryba