[asterisk-users] How to extract channel-id of a user or peer

Sherwood McGowan sherwood.mcgowan at gmail.com
Thu Jul 29 14:22:25 CDT 2010


On Thu, Jul 29, 2010 at 10:37 AM, Danny Nicholas <danny at debsinc.com> wrote:
> From: asterisk-users-bounces at lists.digium.com
> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Nasir Javaid
> Subject: [asterisk-users] How to extract channel-id of a user or peer
>
> my question is how can i get channel-id of a user or peer. I tried using
> ChanIsAvail(username). this works correctly when user and asterisk are on
> Local LAN. But my asterisk server is on public ip and users are behind nat,
> and so this method says unknow host when used on public asterisk server.
> I also tried built-in variable ${CHANNEL}, but this returns the channel-id
> of the calling channel. but i want channel-id of called user.
>
> perhaps ${CALLERID(DNID)}
>
> --
> _____________________________________________________________________
> -- 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
>

${BRIDGEPEER}  is probably a good way to do what you want.. if Channel
A calls Channel B, and you want Channel A to "get" the channelID of
Channel B, as long as the two channels are bridged, ${BRIDGEPEER} will
do what you want



More information about the asterisk-users mailing list