SIP trunk for FXO ports

I do have file extensions.conf where option trunk presented as:
[globals]
TRUNK=Zap/2g
TRUNKMSD=1 ; This option cuts digits if need

I also have number of registered FXO peers: 701,702,703 etc.

Questions:

  1. What do I have to set into extentions.conf to create trunk?
    This trunk hase to have and use defined FXO peers.
  2. How to dial through this trunk after it is created?

For instance, regular option:
exten => _XXX,1,Dial(SIP/${EXTEN}@701,)
exten => _XXX,2,Dial(SIP/${EXTEN}@702,)
exten => _XXX,3,Dial(SIP/${EXTEN}@703,)
is not solution.

I need to create trunk and then refer to it during dialing.

Thanks.

Hi,

Can you post your zaptel.conf and zapata.conf and what hardware are you using?

TRUNK is just a label or variable name. I could say MYBIGFATPIPE=Zap/g2

;extensions.conf
exten => _X.,1,Dial(${GLOBAL(MYBIGFATPIPE)}/${EXTEN:0})

;zapata.conf
context=outgoing
group=2
signalling=fxs_ks
channel=>1-24

;From extensions.conf
;
; Note the ‘g2’ in the TRUNK variable above. It specifies which group (defined
; in zapata.conf) to dial, i.e. group 2, and how to choose a channel to use in
; the specified group. The four possible options are:
;
; g: select the lowest-numbered non-busy Zap channel
; (aka. ascending sequential hunt group).
; G: select the highest-numbered non-busy Zap channel
; (aka. descending sequential hunt group).
; r: use a round-robin search, starting at the next highest channel than last
; time (aka. ascending rotary hunt group).
; R: use a round-robin search, starting at the next lowest channel than last
; time (aka. descending rotary hunt group).