I´ve implemented 3 asterisks servers connected with sip trunk, in the first one i have the numbers 100,101,… an so on, on the second one i have 200, 201… and so on, the same on the third one. In this moment i have configurated my extensions.conf so i can call directly from 100 to 200 by just typing the number, what i want is to have a dial code so if 100 wants to call 200 it has to dial 02200, for example.
My extensions.conf so far:
[usuarios]
;Calls inside the trunk
exten => _10X,1,Dial(SIP/${EXTEN})
same => n,Hangup()
;Outgoing calls to Asterisk_B
exten => _20X,1,Answer
same => n,Wait(1)
same => n,Dial(SIP/Trunk_Asterisk_B/${EXTEN})
same => n,Hangup()
;Incoming calls from Asterisk_B
[Entrantes_Trunk_Asterisk_B]
exten => 101,1,Dial(SIP/101)
same => n,Hangup()
exten => 102,1,Dial(SIP/102)
same => n,Hangup()