Nasir Javaid
2010-Jul-30 07:13 UTC
[asterisk-users] asterisk-users Digest, Vol 72, Issue 81
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 follows Dial(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" <danny at debsinc.com> > Subject: Re: [asterisk-users] How to extract channel-id of a user or > peer > To: "'Asterisk Users Mailing List - Non-Commercial Discussion'" > <asterisk-users at lists.digium.com> > Message-ID: <201007291515.o6TFFv8t025793 at mail.debsinc.com> > Content-Type: text/plain; charset="us-ascii" > > 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)} > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20100730/cad58ada/attachment.htm