Peer to peer call ended after 2 seconds ,registerd in public

Dear All ,

I have two peers 100,202
registered in my server mention domain as my public ip xxx.xxx.xx.xx ,I have used port forwarding
in my router
mentioned TCP/UDP port as 5000 t0 6000 & 10000 to 20000

now the peers are registered while am making a call from peer to peer call rings but call ended after 3 seconds
and not able to hear the voice also…

I can’t identify the problem…let me know any configuration issue…or my softphone issue or whatever
am using Xlite and 3cx softphones

my sip.conf

[general]
externip=xxx.xxx.xxx.xx
bindport=5060
tcpenable=yes
rtptimeout=1000
udpbindaddr=0.0.0.0
tcpbindaddr=0.0.0.0
tcpauthtimeout=30
tcpauthlimit=100
rtpholdtimeout=300
nat=force_rport
autoframing=yes
bindaddr=0.0.0.0
localnet=192.168.1.197/255.255.255.0
rtcachefriends=yes
disallow=all
allow=ulaw
allow=alaw
allow=ilbc
allow=g729
allow=gsm
allow=g723
allowguest=no
alwaysauthreject=yes
trustrpid=yes
sendrpid=yes
disallowed_methods=UPDATE
callerid=unknown
context=from-outside
mohinterpret=default
canreinvite=no
allowsubscribe=yes
notifyhold=yes
notifyringing=yes
callcounter=yes
videosupport=no
t38pt_udptl=no
tos_sip=cs3
tos_audio=ef
tos_video=af41
tos_text=af41
cos_sip=3
cos_audio=5
cos_video=4
cos_text=3
pedantic=no

[100]
username=100
secret=100
type=Friend
callerid=100
host=Dynamic
nat=no
auth=Md5
qualify=yes
directmedia=no
insecure=no
canreinvite=no
dtmfmode=auto
port=5060
allow=ulaw,alaw,g729,gsm
Callgroup=1
pickupgroup=1-9,13
context=from-internal
mailbox=ay@gmail.com

[202]
username=202
secret=202
type=Friend
qualify=yes
port=5064
callerid=202
host=Dynamic
NAT=no
auth=Md5
dtmfmode=auto
canreinvite=no
allow=ulaw,alaw,g729,gsm
Callgroup=1
pickupgroup=1-9,13
context=from-internal
mailbox=ay@gmail.com
=================rtp.conf===========================================================
[general]
rtpstart=10000
rtpend=50000

post a sip trace. and i look, as you are using an old version of asterisk, due that you are using a deprecated option (careinvite). And setting NAT=no wont help a lot.

canreinvite= was renamed to directmedia= in Asterisk 1.6.2 to more accurately describe what this setting does. See also the closely related setting directrtpsetup.

– Executing [s@Context_Dial:5] Dial(“SIP/100-00000006”, “SIP/202,50,TtrwkG”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Called SIP/202
– SIP/202-00000007 is ringing
> 0x7f5314014880 – Probation passed - setting RTP source address to 123.237.130.2:6034
Got RTP packet from 123.237.130.2:6034 (type 00, seq 003216, ts 1817900, len 000160)
> 0x7f5314014880 – Probation passed - setting RTP source address to 123.237.130.2:6034
Got RTP packet from 123.237.130.2:6034 (type 00, seq 003217, ts 1818060, len 000160)
Got RTP packet from 123.237.130.2:6034 (type 00, seq 003218, ts 1818220, len 000160)
Got RTP packet from 123.237.130.2:6034 (type 00, seq 003219, ts 1818380, len 000160)
– SIP/202-00000007 answered SIP/100-00000006
== Spawn extension (Context_Dial, s, 5) exited non-zero on ‘SIP/100-00000006’
=================================sip debu report==========================================

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REGISTER, SUBSCRIBE, NOTIFY, REFER, INFO, MESSAGE
Content-Type: application/sdp
Supported: replaces
User-Agent: 3CXPhone 6.0.26523.0
Content-Length: 404

v=0
o=3cxVCE 335487720 62354595 IN IP4 123.237.130.2
s=3cxVCE Audio Call
c=IN IP4 123.237.130.2
t=0 0
m=audio 4042 RTP/AVP 3 8 0 101
a=rtpmap:3 GSM/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
m=video 4040 RTP/AVP 34
c=IN IP4 123.237.130.2
a=rtpmap:34 H263/90000
a=fmtp:34 QCIF=1;CIF=1;SQCIF=1;CIF4=1
a=sendrecv
<------------->
— (13 headers 18 lines) —
Sending to 123.237.130.2:5010 (NAT)
Sending to 123.237.130.2:5010 (NAT)
Using INVITE request as basis request - MmRiYmY3OWRmNWQzYzUzNzc0NWU2NTQ4NzIyMzRkZWU.
Found peer ‘100’ for ‘100’ from 123.237.130.2:5010

<— Reliably Transmitting (NAT) to 123.237.130.2:5010 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.23:5010;branch=z9hG4bK-d8754z-cb7dc840b4222021-1—d8754z-;received=123.237.130.2;rport=5010
From: "100"sip:100@192.168.1.197:5060;tag=fb07ec50
To: sip:202@192.168.1.197:5060;tag=as57da4779
Call-ID: MmRiYmY3OWRmNWQzYzUzNzc0NWU2NTQ4NzIyMzRkZWU.
CSeq: 1 INVITE
Server: Asterisk PBX 11.5.1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="468fbdd6"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘MmRiYmY3OWRmNWQzYzUzNzc0NWU2NTQ4NzIyMzRkZWU.’ in 103296 ms (Method: INVITE)

<— SIP read from UDP:123.237.130.2:7682 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.197:5060;branch=z9hG4bK028ab261;rport=5060
Contact: sip:192.168.1.23:7682
To: sip:202@123.237.130.2:7682;rinstance=ac46a4bc432d98ce;tag=f34c8c02
From: "asterisk"sip:asterisk@192.168.1.197:5060;tag=as4827cb78
Call-ID: 1ffd2a0551882f171101e854674bc2a4@117.253.164.200:5060
CSeq: 102 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1011s stamp 41150
Content-Length: 0

<------------->
— (12 headers 0 lines) —
Really destroying SIP dialog ‘1ffd2a0551882f171101e854674bc2a4@117.253.164.200:5060’ Method: OPTIONS

<— SIP read from UDP:123.237.130.2:5010 —>
ACK sip:202@192.168.1.197:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.23:5010;branch=z9hG4bK-d8754z-cb7dc840b4222021-1—d8754z-;rport
Max-Forwards: 70
To: sip:202@192.168.1.197:5060;tag=as57da4779
From: "100"sip:100@192.168.1.197:5060;tag=fb07ec50
Call-ID: MmRiYmY3OWRmNWQzYzUzNzc0NWU2NTQ4NzIyMzRkZWU.
CSeq: 1 ACK
Content-Length: 0

<------------->

this is happening call answered then after 2 seconds call ended…
and not hear the voice also…am using Xlite and 3cx softphones

The SIP trace is incomplete. You need to take it from the full log (which you need to enable in logger.conf).

Dear David,

Please help how to set up peer to peer call through public ip…

my corrent set up is

through wimax am doing a portforwarding to my server ip 192.168.1.197
am open ports in this wimax
udp 4000 to 6000
tcp 80 to 82
udp 6000 to 40000


let me know if have public ip xxx.xxx.xxx.xx for my server 192.168.1.197
Am able to open the server from putty by this ip xxx.xxx.xxx.xx:81 port ok

Let me know the configuration to register a peer …
am trying to make a call from two softphones both are registere in the same server xxx.xxx.xx.xx
help me to make complete configuration in sip.conf,rtp.conf etc…and in xlite and 3cx phone