thanks for your reply but i did not meant that. ${CALLERID(DNID)} will
return then number which i don't want. what i want is channel-id like if we
have a user named "nasir", then we dial it as followsDial(SIP/nasir) but actual channel-id that asterisk uses is something like " nasir-2b487e9". and on the asterisk cli we can check this when call is answered or hangup, asterisk attaches some random id with username. i am dialing sip uri using "Dial(SIP/119.26.18.235:5062)" which causes changed INVITE adn TO headers, so i want to get the channel-id that asterisk internally uses do dial it. if we use ChanIsAvail(SIP/nasir) or ChanIsAvail(SIP/192.168.0.10:5062) this works on Local LAN and it returns "SIP/192.168.0.10:5062-3fe934f4" , but when asterisk is on Live Ip and users are behind Router then this function gives error of unknow host. so i want to know if there is any other function that does this job. so what is want is to get this channel-id ( like nasir-2487e9) and dial it like Dial(SIP/nasir-2487e9) or Dial(SIP/119.26.18.235:5062-34e984b)" hope this clears what i wanna do. > Message: 8 > Date: Thu, 29 Jul 2010 10:37:07 -0500 > From: "Danny Nicholas" <[email protected]> > Subject: Re: [asterisk-users] How to extract channel-id of a user or > peer > To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="us-ascii" > > From: [email protected] > [mailto:[email protected]] 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
