[Asterisk-Users] Problem with show channels
Moises Silva
moises.silva at gmail.com
Fri Jan 6 14:22:22 MST 2006
It may seems hard at the beginning, but after a little bit of thinking
it turns to be PHP class of about 100 lines to parse it. I guess is
not good to ask that the output is parsed to be shown to end users in
a fancy web interface. The command line show low level things, like
the application where the channel is. A "call" can be composed of only
1 channel (ie, checking voicemail), 2 channels (what is commonly known
as a call, in reality is a source channel that was bridged with other
channel), and more than 3 channels, like when using meetme(). So
basically you have a source channel and an application. In a common
Dial() the application argument happens to be other channel, so both
channels are bridged. In your interface you can show Source Number
(extracted from the source channel), Status ( taken from the source
channel property status, check channel.c to consult All the possible
status ), and application arguments, that depending on the application
is the way it will be shown to the end user, if its a conference, you
can tell "In conference room Number 33", if its other extension, you
can just say "calling to extension 33".
Regards.
On 1/6/06, Douglas Garstang <dgarstang at oneeighty.com> wrote:
> I have a question on this. It isn't readily obvious to me, upon issueing a 'sip show channels' command which call legs are related to which call.
>
> For example:
>
> *CLI> sip show channels
> Peer User/ANR Call ID Seq (Tx/Rx) Form Hold Last Message
> 192.168.10.121 a00090601 29a98b1708f 00102/00000 g729 No Tx: ACK
> 192.168.10.4 a00090301 c08e095b-c1 00101/00001 g729 No Rx: ACK
>
> Apart from the fact it's obvious here because there's one call, how can you determine that these are the same call? The 'show channels' command is a little easier, but still cryptic. It appears that the format isn't standard and interpreting this from a script would be difficult. It would be nice if some identifier was printed. Maybe 'From number' and 'To number' or the call-id for the call.
>
> *CLI> show channels
> Channel Location State Application(Data)
> SIP/a00090601-14cf (None) Up Bridged Call(SIP/a00090301-403
> SIP/a00090301-4033 3250076 at Company1:1 Up Dial(SIP/a00090601|20|tr)
> 2 active channels
> 1 active call
>
>
> -----Original Message-----
> From: Kevin P. Fleming [mailto:kpfleming at digium.com]
> Sent: Friday, January 06, 2006 12:05 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [Asterisk-Users] Problem with show channels
>
>
> Jerry Geis wrote:
>
> > Is there another wayin the manager API I'm not aware of to get this
> > information?
>
> No, I was mistaken. Matt Florell's response about using 'show channels
> concise' is probably the best way to go, since it produces output
> designed for automated interpretation.
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
>
--
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"
More information about the asterisk-users
mailing list