how to connect two asterisk with sip channel?

djking
Joined: Mon 31 of Aug, 2009

how to connect two asterisk with sip channel?

Posted:Mon 31 of Aug, 2009 (07:20 UTC)
how to connect tow asterisk with sip channel? I tried to config it, but it did not work.
my configure like this:
asterisk 1:
sip.conf:
[general]
register=201:201@192.168.2.201(asterisk 2's IP)

[siptrunk_out]
type=peer
username=201
secret=201
host=192.168.2.201
nat=yes

[200]
type=friend
secret=200
quality=yes
host=dynamic
context=test

extensions.conf:
[test]
exten=>_2XX,1,DialSIP/${EXTEN}@siptrunk_out)

asterisk 2:
sip.conf:
[201]
secret=201
type=friend
host=dynamic
context=test

I want to login user 200 at asterisk 1 and dial user 201 at asterisk 2,but it can't.
so,please give me some suggests about the mistakes, thank you very much.
My reference:
http://salzh.spaces.live.com/Blog/cns!E8C1A521178FAE3B!138.entry