Thanks alot guys for the good information, I apologize for the spoon feeding requests but I had my first contact with Asterisk PBX only last week.
Now, back to my configuration. I had no idea that I have to have to configure voip.ms as separate extension into sip.conf. That creates a little confusion into my head how to deal with contexts. Before, it was simple: I create multiple voip.ms extensions with one default context. Based on your suggestions, this is what i have now in my configuration files:
sip.conf
[quote][general]
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
localnet = 192.168.1.0/24
externip = 70.51.13.39
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456:voipmspassword@montreal.voip.ms:5060
mwi => 123456:voipmspassword@montreal.voip.ms:5060
[authentication]
auth = 123456:voipmspassword@montreal.voip.ms
cisco
type=friend
context = default
host = dynamic
canreinvite = yes
cisco_usecallmanager = yes
nat = no
trustrpid = yes
sendrpid = no
[color=#0000FF]; !!! Using a template style because later on, I will add more extensions[/color]
101
secret = blah
voipms
type = peer
context = voipms
host = montreal.voip.ms
fromdomain = montreal.voip.ms
allow = !all,ulaw
insecure = invite
canreinvite = no
nat = yes
trustrpid = yes
sendrpid = yes
201
callbackextension = 101
defaultuser = 123456
fromuser = 123456
secret = voipmspassword
remotesecret = blah[/quote]
extensions.conf
[quote][general]
static = yes
writeprotect = yes
clearglobalvars = no
[globals]
CONSOLE = Console/dsp
IAXINFO = guest
TRUNK = DAHDI/G2
TRUNKMSD = 1
[default]
[color=#0000FF]; !!! I have no idea if I need to add something here[/color]
[voipms]
include => ext201in
include => ext201out
[ext201in]
exten => 5143602121,1,Answer()
[ext201out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@201)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@201)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@201)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@201)
exten => _00.,n,Hangup()[/quote]
This is what I want to achieve: have my Cisco phone with 3 DID lines on it.
I disabled ALG on my router. I still need your help to see if my logic is right. I looked at the documentation and I’m not sure if callbackextension and remotesecret should be used to push back the 201 voip.ms info to 101. What I don’t understand is how calls are pushed from 101 to 201 and viceversa.
Again, thank you for your help.