hi,
i’m an asterisk newbie. i have some questions regarding completion of my dial-plan. i tried to read asterisk documents and manuals, but it was somehow too detailed and complicated for me and i couldn’t find my answers. i googled too but had no luck. so now i’m asking you guys:
i’m having two PBXes (PBX1 and PBX2) connected to my asterisk (AST) via E1 lines. i managed to setup my asterisk in a way that if any user from PBX2 calls an “_1.” number, asterisk sends call to PBX1. and if a user from PBX1 calls an “_2.” number, asterisk sends call to PBX2. and now it works OK and i can dial PBX1 clients from PBX2 and vice-versa.
this is my current asterisk configuration:
asterisk/dahdi-channels.conf :
group=0,11
context=line1
switchtype = qsig
signalling = pri_net
channel => 1-15,17-31
group=0,12
context=line2
switchtype = qsig
signalling = pri_net
channel => 32-46,48-62
asterisk/extensions.conf
[line1]
exten => _2.,1,Dial(DAHDI/i2/${EXTEN})
[line2]
exten => _1.,1,Dial(DAHDI/i1/${EXTEN})
now i have two questions, regarding completion of dial-plans:
1- if i wanted to change dial-plan, so that if filters incoming calls, (similar to cisco’s “incoming-pattern” command) what changes should i make to my dialplan? (for example, suppose: i want only PBX2 clients which their numbers start with 222 could dial PBX1 clients. what changes should i do to my “exten => _1.,1,Dial(DAHDI/i1/${EXTEN})” dial-plan?)
2- suppose i want to add a specified prefix to dialed number. (for example, suppose: i want if a client of PBX2 called “12345”, router adds “999” to it and sends “99912345” to PBX1. what changes should i do in above dial-plan?)
thank you for your time.