[OpenSIPS-Users] Question about NAT

Brian :: bc at iptel.co
Wed Mar 23 05:25:03 CET 2016


Can you resolve the domain of the destination?

 root at server# host xxx.domain.tld
xxx.domain.tld has address x.x.x.x

or Host xxx.domain.tld not found: 3(NXDOMAIN)

Brian

On Mon, Mar 14, 2016 at 6:52 PM, Travis Manson-Drake
<travism at simplybits.com> wrote:
> Hello everyone,
>
>
>
> So I went ahead an implemented the NAT helper per Johan’s suggestion, I am
> now seeing the host at the correct IP address, however I’m still getting an
> unresolvable destination when trying to call it.
>
>
>
>
>
> Any ideas?
>
>
>
> From: Travis Manson-Drake
> Sent: Monday, March 14, 2016 10:50 AM
> To: 'OpenSIPS users mailling list' <users at lists.opensips.org>
> Subject: RE: [OpenSIPS-Users] Question about NAT
>
>
>
> 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)
>
> #
>
>
>
>
>
> ----------------------------------------------------------------------------------------------
>
>
>
> 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>
> 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  F: 520.545.7252
> E: travism at simplybits.com
> 5225 N. Sabino Canyon Road
> Tucson, AZ 85750
> Support Hotline: 520.545.0333
>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



More information about the Users mailing list