[asterisk-users] dialed peer number
Atis
atis at BEST.eu.org
Thu Aug 30 07:52:36 CDT 2007
On 8/30/07, Vieri <rentorbuy at yahoo.com> wrote:
> I am trying to retrieve the "dialed peer number" but
> it seems that ${DIALEDPEERNUMBER} is "broken".
> Also, I know that I could extract the dialed number
> from the ${CHANNEL} variable but this only works for
> SIP and maybe IAX (untested). However, it doesn't work
> for ZAP. All I get when using ZAP is something like
> "Zap/1-1" (for SIP I would get "SIP/4053-082fc408" and
> that allows me to extract the dialed extension
> "4053").
>
> How can I get the dialed number when using a ZAP
> channel?
> (using asterisk 1.2.17)
It's already noted in documentation that dialed peer number is broken:
http://www.voip-info.org/wiki/view/Asterisk+variables
As i understand you need to get number that is dialed. You would have
it in incoming context's, in variable ${EXTEN}. Then you can store it
in some other variable. For example
[default]
exten => _XXX,1,Set(__dialed_peer=${EXTEN})
exten => _XXX,n,Answer()
...
and then use ${dialed_peer} anywhere within inherited channels.
Regards,
Atis
--
Atis Lezdins,
IT Responsible of BEST Riga,
atis at BEST.eu.org
ICQ: 142239285
Skype: atis.lezdins
Cell Phone: +371 28806004 [Tele2, Latvia]
Work phone: +1 800 7502835 [Toll free, USA]
?BEST? -> www.BEST.eu.org
More information about the asterisk-users
mailing list