[asterisk-users] How to capture destination number when receive call through ZAP

Rob Hillis rob at hillis.dyndns.org
Mon Mar 24 03:23:03 CDT 2008


A standard PSTN line will not give you the number that is connected to 
it - Asterisk has no way of knowing what it is.  What I mean by matching 
the zap channel to the number is that if you know that the phone number 
123 is connected to Zap channel 1, then when you get a call in on Zap/1, 
then the line that was called was 123.

An E1 line /can/ give you the details of the phone number that was 
called, if your provider supplies it.


mark morreny wrote:
> Dear Rob and all,
> I also tried $CHANNEL before but it returned:
>
>   -- Executing [s at incoming:8] NoOp("Zap/1-1", "channel = Zap/1-1") in 
> new stack
>
> It still does not give me the dialed number.   Could you explain how 
> to match it again the zap channel to extract the dialed number?
> Will I be able to get the dialed number if I am using a E1 line? 
>
> Thanks,
> Mark
>
> On Mon, Mar 24, 2008 at 2:29 PM, Rob Hillis <rob at hillis.dyndns.org 
> <mailto:rob at hillis.dyndns.org>> wrote:
>
>     The only method I'm familiar with for an analogue line to signal
>     which number was called is a very old service that loops the line
>     first and then dials the number.  The only way to capture this
>     would be to handle the incoming line as a standard extension with
>     a different context.  I've only run in to one of these services
>     myself - and that was attached to a legacy PABX.  I seriously
>     doubt you'd be able to order these services any more.
>
>     If this is a standard PSTN service, the only way you know which
>     number has been called is by matching it against the zap channel
>     that the call has been received on.  The ${EXTEN} variable won't
>     tell you this as you've already found out - you'll need to examine
>     ${CHANNEL} and match the channel to the connected DID yourself.
>
>
>
>     mark morreny wrote:
>>     Hi all,
>>
>>     I am using Digium PCI board to receive PSTN call through regular
>>     phone line.  It is no problem for me to receive calls, but I am
>>     not able to capture the destination number through the ZAP channel
>>
>>
>>     exten => s, n, Verbose(1|destination to ${EXTEN}  )
>>
>>
>>     ${EXTEN} returns 's' instead of the actual destination number. 
>>     Since I have multiple phone numbers, I want to be able to route
>>     different calls to different places. 
>>
>>     Is this possible to do with Asterisk?
>>
>>     Thanks,
>>     Mark
>>     ------------------------------------------------------------------------
>>     _______________________________________________ -- Bandwidth and
>>     Colocation Provided by http://www.api-digital.com --
>>     asterisk-users mailing list To UNSUBSCRIBE or update options
>>     visit: http://lists.digium.com/mailman/listinfo/asterisk-users
>
>     _______________________________________________
>     -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
>     asterisk-users mailing list
>     To UNSUBSCRIBE or update options visit:
>       http://lists.digium.com/mailman/listinfo/asterisk-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080324/9e82623f/attachment.htm 


More information about the asterisk-users mailing list