[asterisk-users] dialed peer number

Vieri rentorbuy at yahoo.com
Thu Aug 30 12:36:19 CDT 2007


--- Atis <atis at BEST.eu.org> wrote:

> 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.

Thanks Atis,

that's what I ended up doing and it's fine for my
purpose.
However, I'm still having some trouble trying to
understand why Asterisk does not log the ZAP number as
is otherwise the case for SIP. A description of this
problem is at:
http://lists.digium.com/pipermail/asterisk-users/2007-August/193645.html
I could get around the problem by knowing how to tweak
lastapp or lastdata but I still didn't get the trick.
Anyway, thank you for your feedback.

Vieri



      ____________________________________________________________________________________
Shape Yahoo! in your own image.  Join our Network Research Panel today!   http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 





More information about the asterisk-users mailing list