Call Between TWO SIP Trunk

Hi
I have two sip trunk that i want to use them both in my asterisk
one of them should be registered with a public ip address and the other with a private ip address behind a router!

want to call from my Local server to this remote server…then what will be sip,extension configuration,please help me…

I tried myself but its channel is not availables…
please check configurration…

=========LocalServer=192.168.1.199====Sip.conf

[general]
port=5060

rtptimeout=0

bindaddr=0.0.0.0

tos=0x184

register =>402:1234@117.253.140.26/204

[204]
username=204
secret=1234
type=Friend
callerid=204
host=Dynamic
canreinvite=yes
NAT=yes
qualify=yes
insecure=port,invite
auth=Md5
dtmfmode=auto
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
context=local
======================Remote==Server==sip.conf====
[general]
port=5060

rtptimeout=0

bindaddr=0.0.0.0

tos=0x184

register =>204:4321@192.168.1.199/402

;###################################################################################

[402]
username=402
type=friend
secret=4321
context=msk_incoming
host=dynamic
qualify=yes
dtmfmode=rfc2833
disallow=all
allow=ulaw

;###################################################################################

[201]
username=201
secret=201
type=Friend
callerid=201
host=Dynamic
canreinvite=yes
nat=no
qualify=yes
insecure=port,invite
auth=Md5
dtmfmode=auto
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
context=local

=====DialPlan===extension.conf==in==Local Server====
[local]
exten=>_XX.,1,Dial(SIP/${EXTEN}@117.253.140.26,30,tT)

i use asterisk 11

I want to call from my Local Asterisk SIP server to Public Asterisk…by registering two extensions…
Please help me

  1. Please fix the problems identified in my reply to your other thread.

Also it looks like I missed the misspelling of dtmfmode and the fact that you had bypassed the sip.conf entry for outbound calls, by using an IP address that was not the sip.conf section name.

  1. I can’t easily work out what your configuration is. It may be complex enough that one will need to know specific information about the routers and their configuration before one can fill in all the details.