Connecting Two Asterisk System


#1

Hi everyone!

I have two server with asterisk. I want to connect these two server’s extensions. I am using chan_sip extensions.
And my Trunk configuration is below:

Trunk 1-(asterisk1) is from where I want to originate the call using extension xxxx.
Trunk1:
type=friend
reinvite=yes
qualify=60000
port=5060
insecure=invite,port
host=xxx.xxx.xx.x(asterisk2 ip)
dtmfmode=rfc2833
disallow=all
context=from-internal
canreinvite=no
allow=g729&alaw

Trunk 2-(asterisk2) is from where I want to originate the call using extension xxxx.
Trunk1:
type=friend
reinvite=yes
qualify=60000
port=5060
insecure=invite,port
host=xxx.xxx.xx.x(asterisk1 ip)
dtmfmode=rfc2833
disallow=all
context=from-internal
canreinvite=no
allow=g729&alaw

In outbound route of asterisk 1 , I am using trunk1.

And incoming route of asterisk2 , is ANY DID on my extension.

But above configuration is not working. My call is not routed to other server(shows FAILED status in CDR).

Thanks,

Sophia


#2

With just the config of the trunks we cant help…

What does your dialplan look like. What does the logging show?


#3

He’s using FreePBX terminology. I think he is using FreePBX and won’t be able to give sensible dialplans. In that case, he needs to use the FreePBX forums.

Although not relevant to the problem at hand.

Please change type=friend to type=peer (actually this could be relevant, if you have the same device names on both machines).

Delete reinvite, as it is meaningless, and, I suspect, was intended to be canreinvite, but that has a conflicting value.

Change canreinvite to directmedia.

Seriously reconsider qualify; it is way outside the sensible range.

Delete insecure=invite. You have no secrets, and, even if you did have, as you control both ends, there is no need for the insecurity that this covers to be worked round.

Delete insecure=port. There is nothing in your configuration that suggests you will receive a port number other than 5060.

Do read the sample sip.conf and redesign the configuration from first principles.


#4

David on the button as always…

But maybe a she… :wink:

Have not met a lot of guys that go by the name of Sophia…