[OpenSIPS-Users] Question about NAT

Travis Manson-Drake travism at simplybits.com
Mon Mar 14 18:49:55 CET 2016


Hello Aqs Younas & Johan,

Johan,

I will look into the NAT helped module. Thank you

Ags Younas,

In regards to a SIP trace, here’s an Ngrep from the proxy during a failed inbound call.

filter: ( port 5060 ) and (ip or ip6)
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  OPTIONS sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK369ef5fc;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplyb
  its.net>;tag=as513ef045..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 5f0e695a2414a083392f035a664b75e2 at simplybits.net..CSeq:
   102 OPTIONS..User-Agent: Asterisk PBX 1.8.16.0..Date: Mon, 14 Mar 2016 17:45:49 GMT..Session-Expires: 1800..Min-SE: 90..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SU
  BSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK369ef5fc;rport=5060..From: "asterisk" <sip:asterisk@
  simplybits.net>;tag=as513ef045..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-64f3..Call-ID: 5f0e695a2414a083392f035a664b75e2 at simplybits.net..
  CSeq: 102 OPTIONS..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 67.212.200.130:5060 -> 192.168.7.10:5060
  OPTIONS sip:7117salesdemo at 172.16.52.64:5062 SIP/2.0..Via: SIP/2.0/UDP 67.212.200.130:5060;branch=z9hG4bK37364630;rport..Max-Forwards: 70..From: "Anonymous" <sip:Anonymous at s
  implybits.com>;tag=as7ad74f1d..To: <sip:7117salesdemo at 172.16.52.64:5062>..Contact: <sip:Anonymous at 67.212.200.130:5060>..Call-ID: 66416e0d0e3041ff603e8a6e2d7dfeec at simplybits
  .com..CSeq: 102 OPTIONS..User-Agent: Asterisk PBX 1.8.16.0..Date: Mon, 14 Mar 2016 17:46:06 GMT..Session-Expires: 1800..Min-SE: 90..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE
  , REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..Content-Length: 0....
#
U 192.168.7.10:5060 -> 67.212.200.130:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 67.212.200.130:5060;received=67.212.200.130;branch=z9hG4bK37364630;rport=5060..From: "Anonymous" <sip:Anonym
  ous at simplybits.com>;tag=as7ad74f1d..To: <sip:7117salesdemo at 172.16.52.64:5062>;tag=5908d5f0711c965e818db56f317e379b-f8fb..Call-ID: 66416e0d0e3041ff603e8a6e2d7dfeec at simplybit
  s.com..CSeq: 102 OPTIONS..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  INVITE sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK2ece0068;rport..Max-Forwards: 70..From: "WIRELESS CALLER" <sip:5203905516
  @simplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:5203905516 at 162.211.48.59:5060>..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplybits.
  net..CSeq: 102 INVITE..User-Agent: Asterisk PBX 1.8.16.0..Date: Mon, 14 Mar 2016 17:46:08 GMT..Session-Expires: 1800..Min-SE: 90..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE,
  REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..P-Asserted-Identity: "WIRELESS CALLER" <sip:5203905516 at simplybits.net>..Content-Type: application/sdp..
  Content-Length: 263....v=0..o=root 1445681752 1445681752 IN IP4 162.211.48.59..s=Asterisk PBX 1.8.16.0..c=IN IP4 162.211.48.59..t=0 0..m=audio 13132 RTP/AVP 0 9 101..a=rtpm
  ap:0 PCMU/8000..a=rtpmap:9 G722/8000..a=rtpmap:101 telephone-event/8000..a=fmtp:101 0-16..a=ptime:20..a=sendrecv..
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 100 Giving a try..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK2ece0068;rport=5060..From: "WIRELESS CALLER" <sip:5203905516 at simplybits.n
  et>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplybits.net..CSeq: 102 INVITE..Server: OpenSIPS (1.11.5-notls (x86_
  64/linux))..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK2ece0068;rport=5060..From: "WIRELESS CALLER" <sip:52
  03905516 at simplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-7a59..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplyb
  its.net..CSeq: 102 INVITE..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  ACK sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK2ece0068;rport..Max-Forwards: 70..From: "WIRELESS CALLER" <sip:5203905516 at si
  mplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-7a59..Contact: <sip:5203905516 at 162.211.48.59:5060>..Call-ID: 038a1
  51833f6f5513c7923dc2c38a452 at simplybits.net..CSeq: 102 ACK..User-Agent: Asterisk PBX 1.8.16.0..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK2ece0068;rport=5060..From: "WIRELESS CALLER" <sip:52
  03905516 at simplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-7a59..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplyb
  its.net..CSeq: 102 INVITE..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK2ece0068;rport=5060..From: "WIRELESS CALLER" <sip:52
  03905516 at simplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-7a59..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplyb
  its.net..CSeq: 102 INVITE..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK2ece0068;rport=5060..From: "WIRELESS CALLER" <sip:52
  03905516 at simplybits.net>;tag=as3b2415db..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-7a59..Call-ID: 038a151833f6f5513c7923dc2c38a452 at simplyb
  its.net..CSeq: 102 INVITE..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 24.251.121.252:5060 -> 192.168.7.10:5060
  REGISTER sip:simplybits.net:5060 SIP/2.0..Via: SIP/2.0/UDP 10.55.55.141:5060;branch=z9hG4bK993f5a2f..Max-Forwards: 70..To: <sip:5204991249 at simplybits.net>..From: <sip:52049
  91249 at simplybits.net>;tag=4078121977..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 43 REGISTER..Contact: <sip:5204991249 at 10.55.55.141:5060>..Expir
  es: 600..Authorization: Digest realm="simplybits.net", nonce="48f71984", algorithm=MD5, uri="sip:simplybits.net:5060", username="5204991249", response="1fbc157ee7a75c2f95bc
  bdd0256b718f"..Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,NOTIFY,REFER,UPDATE..User-Agent: Panasonic_KX-TGP550T04/12.90 (0080f0bb88ea)..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  REGISTER sip:5204991249 at 162.211.48.59:5060 SIP/2.0..Record-Route: <sip:192.168.7.10;lr>..Via: SIP/2.0/UDP 192.168.7.10:5060;branch=z9hG4bK80df.4ecd236.0..Via: SIP/2.0/UDP 1
  0.55.55.141:5060;received=24.251.121.252;branch=z9hG4bK993f5a2f..Max-Forwards: 69..To: <sip:5204991249 at simplybits.net>..From: <sip:5204991249 at simplybits.net>;tag=4078121977
  ..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 43 REGISTER..Contact: <sip:5204991249 at 10.55.55.141:5060>..Expires: 600..Authorization: Digest realm
  ="simplybits.net", nonce="48f71984", algorithm=MD5, uri="sip:simplybits.net:5060", username="5204991249", response="1fbc157ee7a75c2f95bcbdd0256b718f"..Allow: INVITE,ACK,CAN
  CEL,BYE,OPTIONS,NOTIFY,REFER,UPDATE..User-Agent: Panasonic_KX-TGP550T04/12.90 (0080f0bb88ea)..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.7.10:5060;branch=z9hG4bK80df.4ecd236.0;received=67.212.192.82;rport=5060..Via: SIP/2.0/UDP 10.55.55.141:5060;received=24.
  251.121.252;branch=z9hG4bK993f5a2f..From: <sip:5204991249 at simplybits.net>;tag=4078121977..To: <sip:5204991249 at simplybits.net>;tag=as323cdf18..Call-ID: 10ca5bef-c607731e3726
  bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 43 REGISTER..Server: Asterisk PBX 1.8.16.0..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..Supp
  orted: replaces, timer..WWW-Authenticate: Digest algorithm=MD5, realm="simplybits.net", nonce="122a4e54"..Content-Length: 0....
#
U 192.168.7.10:5060 -> 24.251.121.252:5060
  SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 10.55.55.141:5060;received=24.251.121.252;branch=z9hG4bK993f5a2f..From: <sip:5204991249 at simplybits.net>;tag=4078121977..To: <sip:
  5204991249 at simplybits.net>;tag=as323cdf18..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 43 REGISTER..Server: Asterisk PBX 1.8.16.0..Allow: INVITE,
   ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..WWW-Authenticate: Digest algorithm=MD5, realm="simplybits.net", nonce="122a
  4e54"..Content-Length: 0....
#
U 24.251.121.252:5060 -> 192.168.7.10:5060
  REGISTER sip:simplybits.net:5060 SIP/2.0..Via: SIP/2.0/UDP 10.55.55.141:5060;branch=z9hG4bK41a7509f..Max-Forwards: 70..To: <sip:5204991249 at simplybits.net>..From: <sip:52049
  91249 at simplybits.net>;tag=4078121977..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 44 REGISTER..Contact: <sip:5204991249 at 10.55.55.141:5060>..Expir
  es: 600..Authorization: Digest realm="simplybits.net", nonce="122a4e54", algorithm=MD5, uri="sip:simplybits.net:5060", username="5204991249", response="40d22ef9d188e4a3e0dd
  1530cd2a59d4"..Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,NOTIFY,REFER,UPDATE..User-Agent: Panasonic_KX-TGP550T04/12.90 (0080f0bb88ea)..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  REGISTER sip:5204991249 at 162.211.48.59:5060 SIP/2.0..Record-Route: <sip:192.168.7.10;lr>..Via: SIP/2.0/UDP 192.168.7.10:5060;branch=z9hG4bK50df.2b550cf6.0..Via: SIP/2.0/UDP
  10.55.55.141:5060;received=24.251.121.252;branch=z9hG4bK41a7509f..Max-Forwards: 69..To: <sip:5204991249 at simplybits.net>..From: <sip:5204991249 at simplybits.net>;tag=407812197
  7..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 44 REGISTER..Contact: <sip:5204991249 at 10.55.55.141:5060>..Expires: 600..Authorization: Digest real
  m="simplybits.net", nonce="122a4e54", algorithm=MD5, uri="sip:simplybits.net:5060", username="5204991249", response="40d22ef9d188e4a3e0dd1530cd2a59d4"..Allow: INVITE,ACK,CA
  NCEL,BYE,OPTIONS,NOTIFY,REFER,UPDATE..User-Agent: Panasonic_KX-TGP550T04/12.90 (0080f0bb88ea)..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  OPTIONS sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK3adcd5b5;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplyb
  its.net>;tag=as351c1a89..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 5573de8d570919b906fb08af47e30240 at simplybits.net..CSeq:
   102 OPTIONS..User-Agent: Asterisk PBX 1.8.16.0..Date: Mon, 14 Mar 2016 17:46:19 GMT..Session-Expires: 1800..Min-SE: 90..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SU
  BSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  SIP/2.0 200 OK..Via: SIP/2.0/UDP 192.168.7.10:5060;branch=z9hG4bK50df.2b550cf6.0;received=67.212.192.82;rport=5060..Via: SIP/2.0/UDP 10.55.55.141:5060;received=24.251.121.2
  52;branch=z9hG4bK41a7509f..Record-Route: <sip:192.168.7.10;lr>..From: <sip:5204991249 at simplybits.net>;tag=4078121977..To: <sip:5204991249 at simplybits.net>;tag=as323cdf18..Ca
  ll-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 44 REGISTER..Server: Asterisk PBX 1.8.16.0..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
   NOTIFY, INFO, PUBLISH..Supported: replaces, timer..Expires: 300..Contact: <sip:5204991249 at 10.55.55.141:5060>;expires=300..Date: Mon, 14 Mar 2016 17:46:19 GMT..Content-Leng
  th: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 192.168.7.10:5060 -> 24.251.121.252:5060
  SIP/2.0 200 OK..Via: SIP/2.0/UDP 10.55.55.141:5060;received=24.251.121.252;branch=z9hG4bK41a7509f..Record-Route: <sip:192.168.7.10;lr>..From: <sip:5204991249 at simplybits.net
  >;tag=4078121977..To: <sip:5204991249 at simplybits.net>;tag=as323cdf18..Call-ID: 10ca5bef-c607731e3726bb7fb69f0080f0bb88ea at 10.55.55.141..CSeq: 44 REGISTER..Server: Asterisk P
  BX 1.8.16.0..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH..Supported: replaces, timer..Expires: 300..Contact: <sip:5204991249 at 10.55.55.
  141:5060>;expires=300..Date: Mon, 14 Mar 2016 17:46:19 GMT..Content-Length: 0....
#
U 192.168.7.10:5060 -> 162.211.48.59:5060
  SIP/2.0 476 Unresolvable destination (476/TM)..Via: SIP/2.0/UDP 162.211.48.59:5060;received=162.211.48.59;branch=z9hG4bK3adcd5b5;rport=5060..From: "asterisk" <sip:asterisk@
  simplybits.net>;tag=as351c1a89..To: <sip:5204991249 at 10.55.55.141:5060>;tag=5908d5f0711c965e818db56f317e379b-21da..Call-ID: 5573de8d570919b906fb08af47e30240 at simplybits.net..
  CSeq: 102 OPTIONS..Server: OpenSIPS (1.11.5-notls (x86_64/linux))..Content-Length: 0....
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..
#
U 162.211.48.59:5060 -> 192.168.7.10:5060
  NOTIFY sip:5204991249 at 10.55.55.141:5060 SIP/2.0..Via: SIP/2.0/UDP 162.211.48.59:5060;branch=z9hG4bK6980bca9;rport..Max-Forwards: 70..From: "asterisk" <sip:asterisk at simplybi
  ts.net>;tag=as7abe78ae..To: <sip:5204991249 at 10.55.55.141:5060>..Contact: <sip:asterisk at 162.211.48.59:5060>..Call-ID: 45cef2af36a729ff4f881dcc27aa8a1b at simplybits.net..CSeq:
  102 NOTIFY..User-Agent: Asterisk PBX 1.8.16.0..Event: message-summary..Content-Type: application/simple-message-summary..Content-Length: 94....Messages-Waiting: no..Message
  -Account: sip:asterisk at simplybits.net..Voice-Message: 0/0 (0/0)..



----------------------------------------------------------------------------------------------

From: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] On Behalf Of Aqs Younas
Sent: Monday, March 14, 2016 10:12 AM
To: OpenSIPS users mailling list <users at lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Question about NAT

A sip trace is required. Without that it is difficult to know what is going on.

On 14 March 2016 at 21:36, Travis Manson-Drake <travism at simplybits.com<mailto:travism at simplybits.com>> wrote:
Hello Everyone!

Quick question, it seems the proxy is trying to forward request’s to my Host’s private IP addresses versus the IP of the router their behind. Is there something I have to add to my routing logic to have it route to the host’s public IP versus private? I was thinking of a rewrite host port but don’t know how I would do that dynamically per transaction.

Any suggestions would be incredibly appreciated!

Also for reference here’s my routing logic.


#default routing logic

route
{


        if (!mf_process_maxfwd_header("10"))

                {
                        sl_send_reply("483","Too Many Hops");
                        exit;
                }

        if (cache_fetch("local",'$fU',$avp(PBX)))
                {
                        $rd = $avp(PBX);
                        xlog("this is the Value of the Cache_local r-uri domain: $avp(PBX) for $fU");
                }
        else
                {
                        avp_db_query("select Servers.ipaddress from Servers where Servers.ID in (select phone.ServerID from phone where phone.mac in (select MAC FROM `phone_registrations` where auth_userid = '$(fU{s.escape.common})'))", "$avp(PBX)");
                        cache_store("local",'$fU',"$avp(PBX)");

                        xlog("this is the Value of the AVP_DB_Querry r-uri domain: $rd for $fU");
                        xlog("this is the Value of the AVP_DB_Querry pseudo variable: $avp(PBX) for $fU");
                }

        if ($ct.fields(expires) == '0')
                {
                cache_remove("local",'$fU');
                exit;
                }

                if (is_method("OPTIONS"))
                        {
                        record_route();
                        t_relay();
                        }

                if (is_method("REGISTER"))
                        {
                        record_route();
                        route(register);
                        }

                if (is_method("INVITE")) && ($rd=="67.212.192.82")
                       {
                        record_route();
                        route(inbound);
                        }

                if (is_method("INVITE")) && (!$rd=="67.212.192.82")
                        {
                        record_route();
                        route(outbound);
                        }

                if (is_method("CANCLE"))
                        {
                        if (t_check_trans())
                        t_relay();
                        exit;
                        }

                if (is_method("TRANSFER"))
                        {
                        record_route();
                        route(xfer);
                        }



}

#ROutes Below

route[register]
        {
                $rU = $fU;
                $rd = $avp(PBX);
                t_relay();
                xlog("this is what were sending as our R-URI to the PBX for REGISTER: $ru  ");
        }

route[inbound]
        {
                #$rU = $fU;
                #$rd =$avp(PBX);
                t_relay();
        }
route[outbound]
        {
                #$rU = $fU;
                #$rd =$avp(PBX);
                t_relay();
        }

route[xfer]
        {
                $rU = $fU;
                $rd = $avp(PBX);
                t_relay();
        }



Travis Manson-Drake
Voice Systems Analyst


Simply Bits, LLC
T: 520.545.0311<tel:520.545.0311>  F: 520.545.7252<tel:520.545.7252>
E: travism at simplybits.com<mailto:travism at simplybits.com>
5225 N. Sabino Canyon Road
Tucson, AZ 85750
Support Hotline: 520.545.0333<tel:520.545.0333>




_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160314/bf3109e1/attachment-0001.htm>


More information about the Users mailing list