I have done what you have said:
Now the cli has changed to:
xchange*CLI>
-- Executing [s@mainmenu:1] AGI("SIP/27878059381-b7e3a700", "selintra|CheckState|") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
-- AGI Script selintra completed, returning 0
-- Sent into invalid extension 's' in context 'extensions' on SIP/27878059381-b7e3a700
-- Executing [i@extensions:1] PlayTones("SIP/27878059381-b7e3a700", "congestion") in new stack
== Auto fallthrough, channel 'SIP/27878059381-b7e3a700' status is 'UNKNOWN'
-- Executing [h@extensions:1] Hangup("SIP/27878059381-b7e3a700", "") in new stack
== Spawn extension (extensions, h, 1) exited non-zero on 'SIP/27878059381-b7e3a700'
xchange*CLI>
This shows for trunk state:
Peer vphone not found.
New Sip Debug on attempted call:
<--- SIP read from 196.41.5.20:5060 --->
INVITE sip:s@192.168.2.11 SIP/2.0
Via: SIP/2.0/UDP 196.41.5.20:5060;branch=z9hG4bKi9mkiu205040ue4000c1.1
From: "+27823344624" <sip:27823344624@196.3.175.142:5060;user=phone>;tag=SDdvt5301-GR52RWG346-34
To: "27878059381@vphone.co.za" <sip:27878059381@vphone.co.za:5060>
Call-ID: SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
CSeq: 1 INVITE
Contact: <sip:27823344624@196.41.5.20:5060;transport=udp>
Remote-Party-ID: "+27823344624" <sip:27823344624@196.3.175.142:5060>;party=calling;screen=yes;Privacy=off
max-forwards: 69
Allow: ACK, NOTIFY, OPTIONS, REFER, INFO, BYE, CANCEL, INVITE
Content-Type: application/sdp
Content-Length: 391
v=0
o=Clarent 101664 101665 IN IP4 196.41.5.20
s=Clarent C5CM
c=IN IP4 196.41.5.20
t=0 0
m=audio 20404 RTP/AVP 18 96 100 101 102 103 104 105
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=rtpmap:100 AC100/8000
a=rtpmap:101 AC101/8000
a=rtpmap:102 AC102/8000
a=rtpmap:103 AC103/8000
a=rtpmap:104 AC104/8000
a=rtpmap:105 AC105/8000
<------------->
--- (12 headers 16 lines) ---
Sending to 196.41.5.20 : 5060 (no NAT)
Using INVITE request as basis request - SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
Found peer 'vphone.co.za'
Found RTP audio format 18
Found RTP audio format 96
Found RTP audio format 100
Found RTP audio format 101
Found RTP audio format 102
Found RTP audio format 103
Found RTP audio format 104
Found RTP audio format 105
Peer audio RTP is at port 196.41.5.20:20404
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 96
Found unknown media description format AC100 for ID 100
Found unknown media description format AC101 for ID 101
Found unknown media description format AC102 for ID 102
Found unknown media description format AC103 for ID 103
Found unknown media description format AC104 for ID 104
Found unknown media description format AC105 for ID 105
Capabilities: us - 0x10c (ulaw|alaw|g729), peer - audio=0x100 (g729)/video=0x0 (nothing), combined - 0x100 (g729)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1 (telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 196.41.5.20:20404
Looking for s in mainmenu (domain 192.168.2.11)
list_route: hop: <sip:27823344624@196.41.5.20:5060;transport=udp>
<--- Transmitting (no NAT) to 196.41.5.20:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 196.41.5.20:5060;branch=z9hG4bKi9mkiu205040ue4000c1.1;received=196.41.5.20
From: "+27823344624" <sip:27823344624@196.3.175.142:5060;user=phone>;tag=SDdvt5301-GR52RWG346-34
To: "27878059381@vphone.co.za" <sip:27878059381@vphone.co.za:5060>
Call-ID: SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s@192.168.2.11>
Content-Length: 0
<------------>
-- Executing [s@mainmenu:1] AGI("SIP/27878059381-0a0512f0", "selintra|CheckState|") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
-- AGI Script selintra completed, returning 0
-- Sent into invalid extension 's' in context 'extensions' on SIP/27878059381-0a0512f0
-- Executing [i@extensions:1] PlayTones("SIP/27878059381-0a0512f0", "congestion") in new stack
Audio is at 192.168.2.11 port 16674
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
xchange*CLI>
<--- Transmitting (no NAT) to 196.41.5.20:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 196.41.5.20:5060;branch=z9hG4bKi9mkiu205040ue4000c1.1;received=196.41.5.20
From: "+27823344624" <sip:27823344624@196.3.175.142:5060;user=phone>;tag=SDdvt5301-GR52RWG346-34
To: "27878059381@vphone.co.za" <sip:27878059381@vphone.co.za:5060>;tag=as00673717
Call-ID: SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s@192.168.2.11>
Content-Type: application/sdp
Content-Length: 260
v=0
o=root 22469 22469 IN IP4 192.168.2.11
s=session
c=IN IP4 192.168.2.11
t=0 0
m=audio 16674 RTP/AVP 18 96
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------>
== Auto fallthrough, channel 'SIP/27878059381-0a0512f0' status is 'UNKNOWN'
-- Executing [h@extensions:1] Hangup("SIP/27878059381-0a0512f0", "") in new stack
== Spawn extension (extensions, h, 1) exited non-zero on 'SIP/27878059381-0a0512f0'
Scheduling destruction of SIP dialog 'SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2' in 32000 ms (Method: INVITE)
xchange*CLI>
<--- Reliably Transmitting (no NAT) to 196.41.5.20:5060 --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 196.41.5.20:5060;branch=z9hG4bKi9mkiu205040ue4000c1.1;received=196.41.5.20
From: "+27823344624" <sip:27823344624@196.3.175.142:5060;user=phone>;tag=SDdvt5301-GR52RWG346-34
To: "27878059381@vphone.co.za" <sip:27878059381@vphone.co.za:5060>;tag=as00673717
Call-ID: SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s@192.168.2.11>
Content-Length: 0
<------------>
xchange*CLI>
<--- SIP read from 196.41.5.20:5060 --->
ACK sip:s@192.168.2.11 SIP/2.0
Via: SIP/2.0/UDP 196.41.5.20:5060;branch=z9hG4bKi9mkiu205040ue4000c1.1
CSeq: 1 ACK
From: "+27823344624" <sip:27823344624@196.3.175.142:5060;user=phone>;tag=SDdvt5301-GR52RWG346-34
To: "27878059381@vphone.co.za" <sip:27878059381@vphone.co.za:5060>;tag=as00673717
Call-ID: SDdvt5301-028a4583a0f803ab0160ee3260a808fe-4u0uam2
Max-Forwards: 69
Content-Length: 0
<------------->
--- (8 headers 0 lines) ---
[Feb 18 12:11:41] NOTICE[4641]: chan_sip.c:7403 sip_reregister: -- Re-registration for 27878059381@vphone.co.za
REGISTER 12 headers, 0 lines
Reliably Transmitting (no NAT) to 196.41.5.20:5060:
REGISTER sip:vphone.co.za SIP/2.0
Via: SIP/2.0/UDP 192.168.2.11:5060;branch=z9hG4bK1a84dfb7;rport
From: <sip:27878059381@vphone.co.za>;tag=as667fe3be
To: <sip:27878059381@vphone.co.za>
Call-ID: 1e22280f53c1c9655ddb66e14ad4fc84@vphone.co.za
CSeq: 105 REGISTER
User-Agent: Asterisk PBX
Max-Forwards: 70
Expires: 160
Contact: <sip:s@192.168.2.11>
Event: registration
Content-Length: 0
---
xchange*CLI>
<--- SIP read from 196.41.5.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.2.11:5060;received=41.240.194.28;branch=z9hG4bK1a84dfb7;rport=5060
From: <sip:27878059381@vphone.co.za>;tag=as667fe3be
To: <sip:27878059381@vphone.co.za>;tag=SDqjjid99-
Call-ID: 1e22280f53c1c9655ddb66e14ad4fc84@vphone.co.za
CSeq: 105 REGISTER
Contact: <sip:s@192.168.2.11>;expires=90
User-Agent: Asterisk PBX
Expires: 90
Event: registration
Allow: ACK, NOTIFY, OPTIONS, REFER, INFO, BYE, CANCEL, INVITE
Content-Length: 0
<------------->
--- (12 headers 0 lines) ---
Scheduling destruction of SIP dialog '1e22280f53c1c9655ddb66e14ad4fc84@vphone.co.za' in 32000 ms (Method: REGISTER)
[Feb 18 12:11:41] NOTICE[4641]: chan_sip.c:12491 handle_response_register: Outbound Registration: Expiry for vphone.co.za is 90 sec (Scheduling reregistration in 75 s)