Hello,
 
I have a problem whereby when a private client rings a public client only the public user can hear voice and when the public user rings the private user, no audio is transmitted. After looking at the messages I have have determined that the contact header and sdp part of the invite contains the private address of the natted client. This would lead me to believe that the registration process is incorrect. My problem is that I believe my script should handle the registration process correctly and I suspect that the following code is being skipped: I tried changing it to nat_uac_test("19") and fix_nated_sdp("3") but that didnt help.
 
if (nat_uac_test("3")){
  if (method == "REGISTER" || ! search("^Record-Route:")){
   log("Log: Someone trying to register from private IP,rewriting\n");
   fix_nated_contact(); #Rewrite contact with source IP
   if (method == "INVITE"){
    fix_nated_sdp("1"); #Add direction=active to SDP
    force_rtp_proxy();
   };
   force_rport(); # Add rport parameter to topmost Via
   setflag(6); # Mark as Nated
  };
 };
 
I have included the log message below and my ser.cfg as an attachment. Please let me know where I could be going wrong.
 
Thank you,
Vivienne.
 

2093 (private) ringing 2092 (public)

 

U 84.203.148.14:5060 -> 84.203.148.146:5060

  INVITE sip:2092@84.203.148.146 SIP/2.0..Via: SIP/2.0/UDP 172.16.3.31;branch

  =z9hG4bK1a48edc121f5bc1f..From: "2093" <sip:2093@84.203.148.146>;tag=2dc376

  dcd4655094..To: <sip:2092@84.203.148.146>..Contact: <sip:2093@172.16.3.31>.

  .Supported: replaces..Call-ID: 44e1ae63c476fbff@172.16.3.31..CSeq: 10327 IN

  VITE..User-Agent: Grandstream BT100 1.0.5.18..Max-Forwards: 70..Allow: INVI

  TE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE..Content-Type: applic

  ation/sdp..Content-Length: 362....v=0..o=2093 8000 0 IN IP4 172.16.3.31..s=

  SIP Call..c=IN IP4 172.16.3.31..t=0 0..m=audio 5004 RTP/AVP 0 8 4 18 2 15 9

  9 9..a=sendrecv..a=rtpmap:0 PCMU/8000/3..a=rtpmap:8 PCMA/8000/3..a=rtpmap:4

   G723/8000/3..a=rtpmap:18 G729/8000/3..a=rtpmap:2 G726-32/8000/3..a=rtpmap:

  15 G728/8000/3..a=rtpmap:99 iLBC/8000/3..a=fmtp:99 mode=20..a=rtpmap:9 G722

  /8000/3..a=ptime:20..

 

U 84.203.148.146:5060 -> 84.203.148.14:5060

  SIP/2.0 100 trying -- your call is important to us..Via: SIP/2.0/UDP 172.16

  .3.31;branch=z9hG4bK1a48edc121f5bc1f;rport=5060;received=84.203.148.14..Fro

  m: "2093" <sip:2093@84.203.148.146>;tag=2dc376dcd4655094..To: <sip:2092@84.

  203.148.146>..Call-ID: 44e1ae63c476fbff@172.16.3.31..CSeq: 10327 INVITE..Se

  rver: Sip EXpress router (0.8.14 (i386/linux))..Content-Length: 0..Warning:

   392 84.203.148.146:5060 "Noisy feedback tells:  pid=4732 req_src_ip=84.203

  .148.14 req_src_port=5060 in_uri=sip:2092@84.203.148.146 out_uri=sip:2092@1

  57.190.74.151 via_cnt==1"....

 

U 84.203.148.146:5060 -> 157.190.74.151:5060

  INVITE sip:2092@157.190.74.151 SIP/2.0..Via: SIP/2.0/UDP 84.203.148.146;bra

  nch=z9hG4bK77bc.b54ca216.0..Via: SIP/2.0/UDP 172.16.3.31;rport=5060;receive

  d=84.203.148.14;branch=z9hG4bK1a48edc121f5bc1f..From: "2093" <sip:2093@84.2

  03.148.146>;tag=2dc376dcd4655094..To: <sip:2092@84.203.148.146>..Contact: <

  sip:2093@84.203.148.14:5060>..Supported: replaces..Call-ID: 44e1ae63c476fbf

  f@172.16.3.31..CSeq: 10327 INVITE..User-Agent: Grandstream BT100 1.0.5.18..

  Max-Forwards: 69..Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SU

  BSCRIBE..Content-Type: application/sdp..Content-Length: 443....v=0..o=2093

  8000 0 IN IP4 172.16.3.31..s=SIP Call..c=IN IP4 84.203.148.1484.203.148.146

  ..t=0 0..m=audio 35006 RTP/AVP 0 8 4 18 2 15 99 9..a=sendrecv..a=rtpmap:0 P

  CMU/8000/3..a=rtpmap:8 PCMA/8000/3..a=rtpmap:4 G723/8000/3..a=rtpmap:18 G72

  9/8000/3..a=rtpmap:2 G726-32/8000/3..a=rtpmap:15 G728/8000/3..a=rtpmap:99 i

  LBC/8000/3..a=fmtp:99 mode=20..a=rtpmap:9 G722/8000/3..a=ptime:20..a=direct

  ion:active..a=oldmediaip:172.16.3.31..a=nortpproxy:yes..

 

U 84.203.148.146:5060 -> 157.190.74.150:5060

  INVITE sip:2092@157.190.74.150 SIP/2.0..Via: SIP/2.0/UDP 84.203.148.146;bra

  nch=z9hG4bK77bc.b54ca216.1..Via: SIP/2.0/UDP 172.16.3.31;rport=5060;receive

  d=84.203.148.14;branch=z9hG4bK1a48edc121f5bc1f..From: "2093" <sip:2093@84.2

  03.148.146>;tag=2dc376dcd4655094..To: <sip:2092@84.203.148.146>..Contact: <

  sip:2093@84.203.148.14:5060>..Supported: replaces..Call-ID: 44e1ae63c476fbf

  f@172.16.3.31..CSeq: 10327 INVITE..User-Agent: Grandstream BT100 1.0.5.18..

  Max-Forwards: 69..Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SU

  BSCRIBE..Content-Type: application/sdp..Content-Length: 443....v=0..o=2093

  8000 0 IN IP4 172.16.3.31..s=SIP Call..c=IN IP4 84.203.148.1484.203.148.146

  ..t=0 0..m=audio 35006 RTP/AVP 0 8 4 18 2 15 99 9..a=sendrecv..a=rtpmap:0 P

  CMU/8000/3..a=rtpmap:8 PCMA/8000/3..a=rtpmap:4 G723/8000/3..a=rtpmap:18 G72

  9/8000/3..a=rtpmap:2 G726-32/8000/3..a=rtpmap:15 G728/8000/3..a=rtpmap:99 i

  LBC/8000/3..a=fmtp:99 mode=20..a=rtpmap:9 G722/8000/3..a=ptime:20..a=direct

  ion:active..a=oldmediaip:172.16.3.31..a=nortpproxy:yes..

 

U 157.190.74.151:5060 -> 84.203.148.146:5060

  SIP/2.0 100 Trying..Via: SIP/2.0/UDP 84.203.148.146;branch=z9hG4bK77bc.b54c

  a216.0..Via: SIP/2.0/UDP 172.16.3.31;rport=5060;received=84.203.148.14;bran

  ch=z9hG4bK1a48edc121f5bc1f..From: "2093" <sip:2093@84.203.148.146>;tag=2dc3

  76dcd4655094..To: <sip:2092@84.203.148.146>..Call-ID: 44e1ae63c476fbff@172.

  16.3.31..CSeq: 10327 INVITE..User-Agent: Grandstream BT100 1.0.5.18..Conten

  t-Length: 0....

 

U 157.190.74.151:5060 -> 84.203.148.146:5060

  SIP/2.0 180 Ringing..Via: SIP/2.0/UDP 84.203.148.146;branch=z9hG4bK77bc.b54

  ca216.0..Via: SIP/2.0/UDP 172.16.3.31;rport=5060;received=84.203.148.14;bra

  nch=z9hG4bK1a48edc121f5bc1f..From: "2093" <sip:2093@84.203.148.146>;tag=2dc

  376dcd4655094..To: <sip:2092@84.203.148.146>;tag=10bdf2044401a257..Call-ID:

   44e1ae63c476fbff@172.16.3.31..CSeq: 10327 INVITE..User-Agent: Grandstream

  BT100 1.0.5.18..Content-Length: 0....

 

Send instant messages to your online friends http://uk.messenger.yahoo.com