Single Trunk Routing

Top  Previous  Next
Solution Integration > PBXs > BT Call Server > Example Configurations > Route Configuration

 

Web UI > Configuration > Trunks
 

; Trunk template

 

[trunk-defaults](!)

type = wizard

transport = transport-tcp                                ; Explicit transport configuration to use

endpoint/allow = !all,ulaw,alaw                        ; Media Codec(s) to allow

endpoint/context = incoming                        ; Dialplan context to use

endpoint/dtmf_mode = auto                                ; DTMF is sent as RFC 4733 if the other side supports it or as INBAND if not.

endpoint/direct_media = yes                        ; Enable direct media (peer to peer RTP)

;endpoint/tos_audio = ef                                ; Sets TOS for audio streams (QoS)

;endpoint/cos_audio = 5                                ; Sets COS for audio streams (QoS)

aor/qualify_frequency = 30                        ; Interval at which to qualify an AoR (SIP Options Ping)

 

; Trunk to CUCM

 

[CUCM](trunk-defaults)

remote_hosts = IP_address_PBX:5060

identify/match = IP_address_PBX

 

 

Web UI > Configuration > Route (Dial Plan)
 

; Context for incoming calls.

 

[incoming]

exten => _X.,1,Dial(PJSIP/${EXTEN},300)                ; Call the internal extension

exten => _X.,n,Congestion(10)                        ; Play congestion tone if line is unavailable

 

; Exact duplicate of above, but note the "+" in "exten => _+X." which caters for +(Plus) dialing, e.g. +44xxxxxxxxxx

; Require both if using + dialing

 

exten => _+X.,1,Dial(PJSIP/${EXTEN},300)        ; Call the internal extension

exten => _+X.,n,Congestion(10)                        ; Play congestion tone if line is unavailable

 

; Context for outgoing calls

 

[outbound]

exten => _X.,1,GotoIf($[${DEVICE_STATE(PJSIP/${EXTEN})} != INVALID]?10:15)         ; Check dialed number locally registered, else route to trunk

exten => _X.,10,Dial(PJSIP/${EXTEN},300)                                                ; Call local extension if number registered

exten => _X.,n,Congestion(10)                                                                ; Play congestion tone if line is unavailable

exten => _X.,15,Dial(PJSIP/${EXTEN}@CUCM,300)                                                ; Dial through the trunk

exten => _X.,n,Congestion(10)                                                                ; Play congestion tone if line is unavailable

 

; Exact duplicate of above, but note the "+" in "exten => _+X." which caters for +(Plus) dialing, e.g. +44xxxxxxxxxx

; Require both if using + dialing

 

exten => _+X.,1,GotoIf($[${DEVICE_STATE(PJSIP/${EXTEN})} != INVALID]?10:15)        ; Check dialed number locally registered, else route to trunk

exten => _+X.,10,Dial(PJSIP/${EXTEN},300)                                                ; Call local extension if number registered

exten => _+X.,n,Congestion(10)                                                                ; Play congestion tone if line is unavailable

exten => _+X.,15,Dial(PJSIP/${EXTEN}@CUCM,300)                                        ; Dial through the trunk

exten => _+X.,n,Congestion(10)                                                                ; Play congestion tone if line is unavailable