<div>thanks for your reply but i think ${BRIDGEPEER} will work only when both channels are connected. i want to get channel-id before dialing so that i can dial using that channel id.</div>
<div> </div>
<div> </div>
<div> </div>
<div>> ${BRIDGEPEER} is probably a good way to do what you want.. if Channel<br>> A calls Channel B, and you want Channel A to "get" the channelID of<br>> Channel B, as long as the two channels are bridged, ${BRIDGEPEER} will<br>
> do what you want</div>
<div> </div>
<div>>> perhaps ${CALLERID(DNID)}<br>>><br></div>
<div>>>> my question is how can i get channel-id of a user or peer. I tried using<br>>>> ChanIsAvail(username). this works correctly when user and asterisk are on<br>>>> Local LAN. But my asterisk server is on public ip and users are behind nat,<br>
>>> and so this method says unknow host when used on public asterisk server.<br>>>> I also tried built-in variable ${CHANNEL}, but this returns the channel-id<br>>>> of the calling channel. but i want channel-id of called user.<br>
<br></div>