well, on analog lines you generally you won't have incoming DID informations; so you'll have all calls routed to extension 's' in the context defined for that channels. By the way, you can check in the dialplan which zap channel number the call is coming in from.
To do this, you have to extract the channel number with some string manipulation:
Zap incoming channel names come in this form
 
Zap/<channum>-<additionaluniqueid>
 
So you have to CUT the channel name two times to obtain the zap channel number.
Example:
 
...suppose call is coming in from channel 4
 
[from-pstn]
;CHANNEL is "Zap/4-some"
exten => s,1,Set(channum=${CUT(CHANNEL|-|1)}) ; channum is now "Zap/4"
exten => s,2,Set(channum=${CUT(channum|/|2)}) ; channum is now "4"
exten => s,3,Gotoif("${channum}"="3"?233|1) ; go to 233 if channel is 3
exten => s,4,Gotoif("${channum}"="4"?234|1) ; go to 234 if channel is 4
... you can add as many as you want...
exten => s,n,Goto(233) ; go to your default extension if channel is different from 
                                   ; the ones specified above
 
...
exten => 233,1,Dial(SIP/233)
exten => 234,1,Dial(SIP/234)
....
 
 
Hope this helps...
 
 
2006/4/26, Andy Green <[EMAIL PROTECTED]>:

Hello,

I have 2 analogue ports on an Alcatel PBX patched to 2 FXO ports on my *@home 2.8 running on top of CentOS.  Both FXO Ports are on ONE Digium card.

What I would like is:

If someone calls extn 281 on my Alcatel PBX it is routed through to Extn 233 on my * thruogh FXO port/module 4 
If someone calls extn 282 on my Alcatel PBX it is routed through to Extn 234 on my * thruogh FXO Port/module 3

I have SIP extn 233 set up.
I have SIP extn 234 set up.

I have one inbound route set up as any DID / any CID with a destination set to 233 (calling 281 from my Alcatel does ring on 233).

I have one zap channel set up in trunks as ZAP/g0.

Current zapata-auto.config:

; Autogenerated by /usr/local/sbin/genzaptelconf -- do not hand edit
; Zaptel Channels Configurations (zapata.conf)
;
; This is not intended to be a complete zapata.conf. Rather, it is intended
; to be #include-d by /etc/zapata.conf that will include the global settings
;
callerid=asreceived
; Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1"
; channel 1, WCTDM, inactive.
; channel 2, WCTDM, inactive.
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel 3
context=from-pstn
group=0
channel => 3
signalling=fxs_ks
; Note: this is a trunk. Create a ZAP trunk in AMP for Channel
4
context=from-pstn
group=0
channel => 4
; Span 2: ZTDUMMY/1 "ZTDUMMY/1 1"

My problem is getting 234 to answer when I dial 282 from the Alcatel as I have nothing set up for it and don't seem to be able to work out how to direct different FXO ports to different * extns.

I am told that my Alcatel is not passing any info (DID number etc) down the line

Any help would be greatfully appreciated.

Regards

Andy Green
IT Manager

GB eye
 Ltd
1 Russell St
Kelham Island
Sheffield
S3 8RW

Tel: 0114 252 1611
Fax: 0114 272 9599

mailto:[EMAIL PROTECTED]
http://www.businessgbeye.com
 


Please read: CHANGE OF COMPANY NAME.

As of 1st January 2006 GB Posters Ltd will be known as GB eye Ltd, please update all records and email addresses:

Please replace everything after the @ in email addresses with gbeye.com (e.g. [EMAIL PROTECTED] is now [EMAIL PROTECTED])

The GB eye Ltd business website can be found at http://www.businessgbeye.com, please update your bookmarks and favourites.

This e-mail is intended for the addressee(s) named above and any other use is prohibited. It may contain confidential information.
If you received this e-mail in error please contact the sender by return e-mail. GB eye Ltd does not accept legal responsibility for
the contents of this message if it has reached you via the Internet. Any opinions expressed are those of the author and are not
necessarily endorsed by GB eye Ltd. Recipients are advised to apply their own virus checks to this message and all incoming
email on delivery.

 

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users



_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to