Trunking 2 asterisk server with sip trunk

Hi David,
I’ve changed my sip.conf according to your suggestion, but stil fails to make a call from serverA<—>serverB
Logger shows unvailable channel
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
==Everyone is busy/congested at this time (1:0/0/1)
–Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’

—My Dialplan----

serverA
/etc/asterisk/chan_dahdi.conf

[trunkgroups]

[channels]
usecallerid =yes
hidecallerid-no
callwaiting=yes
threewaycalling=yes
transfer=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0

;FXS Modules
group=1
signalling=fxo_ks
context=internal
channel=1-4

;FXO Modules
group=2
echocancel=yes
signalling=fxs_ks
context=incoming
channel=5-8

/etc/asterisk/sip.conf
[general]
allowguest=no

[serverB]
type=peer
host=192.168.20.1
username=serverA
secret=welcome
context=incoming
disallow=all
allow=ulaw

/etc/asterisk/extensions.conf
[globals]
[general]
autofallthrough=yes
[internal]
exten=>100,1,Dial(DAHDI/1,20,rt)
exten=>101,1,Dial(DAHDI/2,20,rt)
exten=>102,1,Dial(DAHDI/3,20,rt)
exten=>103,1,Dial(DAHDI/4,20,rt)
exten=>_2XX,1,Dial(SIP/${EXTEN}@serverB)

[incoming]
include=>internal

serverB
/etc/asterisk/chan_dahdi.conf

[trunkgroups]

[channels]
usecallerid =yes
hidecallerid-no
callwaiting=yes
threewaycalling=yes
transfer=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0

;FXS Modules
group=1
signalling=fxo_ks
context=internal
channel=1-4

;FXO Modules
group=2
echocancel=yes
signalling=fxs_ks
context=incoming
channel=5-8

/etc/asterisk/sip.conf
[general]
allowguest=no

[serverA]
type=peer
host=192.168.10.1
username=serverB
secret=welcome
context=incoming
disallow=all
allow=ulaw

/etc/asterisk/extensions.conf
[globals]
[general]
autofallthrough=yes
[internal]
exten=>200,1,Dial(DAHDI/1,20,rt)
exten=>201,1,Dial(DAHDI/2,20,rt)
exten=>202,1,Dial(DAHDI/3,20,rt)
exten=>203,1,Dial(DAHDI/4,20,rt)
exten=>_1XX,1,Dial(SIP/${EXTEN}@serverA)

[incoming]
include=>internal

It’s not a dial plan problem. You will need to increase the tracing level. sip set debug on, in case it is actually sending any SIP and core set debug 5, to see if there is some local reason why it thinks it is unavailable.

David,

This is what I’m getting from the log

mpv6CLI> sip set debug on
SIP Debugging enabled
– Starting simple switch on ‘DAHDI/2-1’
– Executing [100@internal:1] Dial(“DAHDI/2-1”, “DAHDI/1,20,rt”) in new stack
– Called DAHDI/1
– DAHDI/1-1 is ringing
– DAHDI/1-1 is ringing
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’
== Spawn extension (internal, 100, 1) exited non-zero on ‘DAHDI/2-1’
– Hanging up on ‘DAHDI/2-1’
– Hungup ‘DAHDI/2-1’
– Starting simple switch on ‘DAHDI/1-1’
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
Really destroying SIP dialog ‘42dbd46b23383d8d562b9cdd64496b6e@127.0.1.1:5060’ Method: INVITE
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’
– Starting simple switch on ‘DAHDI/1-1’
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
Really destroying SIP dialog ‘06b1bf6720c84d3a59cb6ac65e75de50@127.0.1.1:5060’ Method: INVITE
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’
– Hanging up on ‘DAHDI/1-1’
– Hungup 'DAHDI/1-1’
mpv6
CLI> core set debug 5
Core debug was 0 and is now 5
– Starting simple switch on ‘DAHDI/1-1’
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
Really destroying SIP dialog ‘4c0891ac43ebb12c5bb9ae703e9cb85f@127.0.1.1:5060’ Method: INVITE
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’
– Hanging up on ‘DAHDI/1-1’
– Hungup 'DAHDI/1-1’
mpv6*CLI>

TQ
-nordin

Something funny there. The trace clearly indicates that an INVITE was constructed, but it hasn’t appeared in the trace!!!

David,
Any suggestion.
Why it is comeout with
Really destroying SIP dialog ‘42dbd46b23383d8d562b9cdd64496b6e@127.0.1.1:5060’ Method: INVITE ?

The really destroying message is normal for that debug/verbosity level. The significance of it is that it did actually send an INVITE, so the CHANUNAVAIL response is not due to lack of registration or failing to find a sip.conf entry.

I wonder if you are not getting the trace because you don’t have the right categories in logger.conf, for the message stream that you are using. I normally enable full, with all categories, and copy from the file, rather than using the console output.

How to i enable full, with all categories, and copy from the file, rather than using the console output ?
Could you give me your logger.conf setting

Just uncomment the one in the sample.

The standard location for logs is /var/log/asterisk.

David,
This is what I’m getting after I’ve configure the logger.conf

[Oct 9 11:31:44] DTMF[3442]: channel.c:4134 __ast_read: DTMF begin ‘2’ received on DAHDI/1-1
[Oct 9 11:31:44] DTMF[3442]: channel.c:4138 __ast_read: DTMF begin ignored ‘2’ on DAHDI/1-1
[Oct 9 11:31:44] DTMF[3442]: channel.c:4049 __ast_read: DTMF end ‘2’ received on DAHDI/1-1, duration 140 ms
[Oct 9 11:31:44] DTMF[3442]: channel.c:4118 __ast_read: DTMF end passthrough ‘2’ on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4134 __ast_read: DTMF begin ‘0’ received on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4138 __ast_read: DTMF begin ignored ‘0’ on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4049 __ast_read: DTMF end ‘0’ received on DAHDI/1-1, duration 178 ms
[Oct 9 11:31:45] DTMF[3442]: channel.c:4118 __ast_read: DTMF end passthrough ‘0’ on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4134 __ast_read: DTMF begin ‘0’ received on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4138 __ast_read: DTMF begin ignored ‘0’ on DAHDI/1-1
[Oct 9 11:31:45] DTMF[3442]: channel.c:4049 __ast_read: DTMF end ‘0’ received on DAHDI/1-1, duration 204 ms
[Oct 9 11:31:45] DTMF[3442]: channel.c:4118 __ast_read: DTMF end passthrough ‘0’ on DAHDI/1-1
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
[Oct 9 11:31:45] ERROR[3442]: rtp_engine.c:331 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded?
Really destroying SIP dialog ‘65d3419168e9d3af230b277c49d37061@127.0.1.1:5060’ Method: INVITE
[Oct 9 11:31:45] WARNING[3442]: app_dial.c:2341 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’
– Hanging up on ‘DAHDI/1-1’
– Hungup 'DAHDI/1-1’
mpv6*CLI>

Subscriber absent ?

Missing module, or broken rtp.conf.

Subscriber absent would normally mean not registered, but in this case, I would say it was a secondary error.

] ERROR[3442]: rtp_engine.c:331 ast_rtp_instance_new: No RTP engine was found. Do you have one loaded?

How to check the RTP engine is loaded?

I don’t know. I think multiple RTP engines is a new feature, so I don’t know what module name to look for.

I would first look for load time error messages.

Sorry, How to look for load time error messages ?

At the beginnig of the full log, when starting.

Hi,

I still not able to make a call from one asterik server to another asterisk server,
Below is the log file for both server

serverA

mpv6CLI> sip set debug on
SIP Debugging enabled
mpv6
CLI> core set debug 5
Core debug was 0 and is now 5
– Starting simple switch on ‘DAHDI/1-1’
[Oct 10 03:02:19] DTMF[2491]: channel.c:4134 __ast_read: DTMF begin ‘2’ received on DAHDI/1-1
[Oct 10 03:02:19] DTMF[2491]: channel.c:4138 __ast_read: DTMF begin ignored ‘2’ on DAHDI/1-1
[Oct 10 03:02:19] DTMF[2491]: channel.c:4049 __ast_read: DTMF end ‘2’ received on DAHDI/1-1, duration 153 ms
[Oct 10 03:02:19] DTMF[2491]: channel.c:4118 __ast_read: DTMF end passthrough ‘2’ on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4134 __ast_read: DTMF begin ‘0’ received on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4138 __ast_read: DTMF begin ignored ‘0’ on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4049 __ast_read: DTMF end ‘0’ received on DAHDI/1-1, duration 191 ms
[Oct 10 03:02:20] DTMF[2491]: channel.c:4118 __ast_read: DTMF end passthrough ‘0’ on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4134 __ast_read: DTMF begin ‘0’ received on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4138 __ast_read: DTMF begin ignored ‘0’ on DAHDI/1-1
[Oct 10 03:02:20] DTMF[2491]: channel.c:4049 __ast_read: DTMF end ‘0’ received on DAHDI/1-1, duration 204 ms
[Oct 10 03:02:20] DTMF[2491]: channel.c:4118 __ast_read: DTMF end passthrough ‘0’ on DAHDI/1-1
– Executing [200@internal:1] Dial(“DAHDI/1-1”, “SIP/200@serverB”) in new stack
== Using SIP RTP CoS mark 5
Audio is at 17156
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 192.168.20.1:5060:
INVITE sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Date: Tue, 09 Oct 2012 19:02:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 247

v=0
o=root 1257314443 1257314443 IN IP4 10.10.10.2
s=Asterisk PBX SVN-branch-1.8-r373532
c=IN IP4 10.10.10.2
t=0 0
m=audio 17156 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


-- Called SIP/200@serverB

<— SIP read from UDP:10.10.10.1:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;received=10.10.10.2;rport=5060
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 INVITE
Server: Asterisk PBX SVN-branch-1.8-r373131
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="1b096009"
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Transmitting (NAT) to 10.10.10.1:5060:
ACK sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Content-Length: 0


Audio is at 17156
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 10.10.10.1:5060:
INVITE sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Authorization: Digest username=“serverA”, realm=“asterisk”, algorithm=MD5, uri="sip:200@192.168.20.1", nonce=“1b096009”, response="87db817c0683d74332d952de3a16910e"
Date: Tue, 09 Oct 2012 19:02:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 247

v=0
o=root 1257314443 1257314444 IN IP4 10.10.10.2
s=Asterisk PBX SVN-branch-1.8-r373532
c=IN IP4 10.10.10.2
t=0 0
m=audio 17156 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv


<— SIP read from UDP:10.10.10.1:5060 —>
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;received=10.10.10.2;rport=5060
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 INVITE
Server: Asterisk PBX SVN-branch-1.8-r373131
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Transmitting (NAT) to 10.10.10.1:5060:
ACK sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 ACK
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Content-Length: 0


[Oct 10 03:02:20] WARNING[2480]: chan_sip.c:20537 handle_response_invite: Received response: “Forbidden” from '“asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c’
Scheduling destruction of SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ in 32000 ms (Method: INVITE)
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘DAHDI/1-1’ status is ‘CHANUNAVAIL’
– Hanging up on ‘DAHDI/1-1’
– Hungup 'DAHDI/1-1’
Really destroying SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ Method: INVITE
mpv6*CLI>

serverB

mpv5CLI> sip set debug on
SIP Debugging enabled
mpv5
CLI> core set debug 5
Core debug was 0 and is now 5

<— SIP read from UDP:10.10.10.2:5060 —>
INVITE sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Date: Tue, 09 Oct 2012 19:02:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 247

v=0
o=root 1257314443 1257314443 IN IP4 10.10.10.2
s=Asterisk PBX SVN-branch-1.8-r373532
c=IN IP4 10.10.10.2
t=0 0
m=audio 17156 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
— (14 headers 11 lines) —
Sending to 10.10.10.2:5060 (NAT)
Using INVITE request as basis request - 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
No matching peer for ‘asterisk’ from ‘10.10.10.2:5060’
[Oct 10 03:02:22] NOTICE[2460]: chan_sip.c:22795 handle_request_invite: Sending fake auth rejection for device “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c

<— Reliably Transmitting (NAT) to 10.10.10.2:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;received=10.10.10.2;rport=5060
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 INVITE
Server: Asterisk PBX SVN-branch-1.8-r373131
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="1b096009"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ in 32000 ms (Method: INVITE)
Scheduling destruction of SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:10.10.10.2:5060 —>
ACK sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK4ddb161b;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Content-Length: 0

<------------->
— (10 headers 0 lines) —

<— SIP read from UDP:10.10.10.2:5060 —>
INVITE sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 INVITE
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Authorization: Digest username=“serverA”, realm=“asterisk”, algorithm=MD5, uri="sip:200@192.168.20.1", nonce=“1b096009”, response="87db817c0683d74332d952de3a16910e"
Date: Tue, 09 Oct 2012 19:02:20 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 247

v=0
o=root 1257314443 1257314444 IN IP4 10.10.10.2
s=Asterisk PBX SVN-branch-1.8-r373532
c=IN IP4 10.10.10.2
t=0 0
m=audio 17156 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv
<------------->
— (15 headers 11 lines) —
Sending to 10.10.10.2:5060 (NAT)
Using INVITE request as basis request - 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
No matching peer for ‘asterisk’ from ‘10.10.10.2:5060’
[Oct 10 03:02:22] NOTICE[2460]: chan_sip.c:22795 handle_request_invite: Sending fake auth rejection for device “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c

<— Transmitting (NAT) to 10.10.10.2:5060 —>
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;received=10.10.10.2;rport=5060
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 INVITE
Server: Asterisk PBX SVN-branch-1.8-r373131
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ in 32000 ms (Method: INVITE)

<— SIP read from UDP:10.10.10.2:5060 —>
ACK sip:200@192.168.20.1 SIP/2.0
Via: SIP/2.0/UDP 10.10.10.2:5060;branch=z9hG4bK0e10fae9;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@10.10.10.2;tag=as7fb1f03c
To: sip:200@192.168.20.1;tag=as2c8fbc41
Contact: sip:asterisk@10.10.10.2:5060
Call-ID: 30d915eb5749688d60243a7940d46632@10.10.10.2:5060
CSeq: 103 ACK
User-Agent: Asterisk PBX SVN-branch-1.8-r373532
Content-Length: 0

<------------->
— (10 headers 0 lines) —
Really destroying SIP dialog ‘30d915eb5749688d60243a7940d46632@10.10.10.2:5060’ Method: INVITE
mpv5*CLI>

From the serverB log , it show that INVITE message from serverA, been rejected due to unathorized. Below is both serverA &
serverB sip.conf.

serverA

/etc/asterisk/sip.conf
[general]
allowguest=no

[serverB]
type=peer
host=192.168.10.1
username=serverA
secret=welcome
context=incoming
disallow=all
allow=ulaw

serverB

[general]
allowguest=no

[serverA]
type=peer
host=192.168.10.1
username=serverB
secret=welcome
context=incoming
disallow=all
allow=ulaw

I think my both sip.conf works fine. Anything else ?

To be compatible with the trace, this needs to be changed:

[serverA]
type=peer
host=[color=#FF0000]10.10.10.2[/color]

Why the address differs from the one you expected is a problem for you to solve.

Tq David for your help. Now both pots phones in each side of server are able to make a call to other pots phone .
[img]

          serverA                               serverB
          ----------                            ----------

Pots | | | | Pots
100 ------| |10.10.10.1 10.10.10.2| |------ 200
101 ------| |----------------------------| |-------201
102-------| | | |-------202
103-------| | | |-------203
---------- ---------
|192.168.10.1 |192.168.20.2
| |
| |
| |
------------- -------------
| Lan Switch | |Lan Switch |
-------------- -------------
| |
|192.168.10.100 |192.168.20.100
------------- ------------
| IP Phone | | IP Phone |
------------- ------------
[/img]

Both asterisk server in reside in the same router as shown as above.
Both 10.10.10.1 and 10.10.10.2 are the router trunks.
So i thought of using of using the second ip 192.168.10.100 & 192.168.20.100 as IP for both servers.