From owner-freebsd-questions@freebsd.org Sat Mar 9 21:49:25 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C1151538B81 for ; Sat, 9 Mar 2019 21:49:25 +0000 (UTC) (envelope-from dave.mehler@gmail.com) Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2E07075028 for ; Sat, 9 Mar 2019 21:49:24 +0000 (UTC) (envelope-from dave.mehler@gmail.com) Received: by mail-wr1-x442.google.com with SMTP id g12so1094565wrm.5 for ; Sat, 09 Mar 2019 13:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=TliPq8ibLZUYj2RGNfXhoPwJueLQtP6xKcI2tJGPnwg=; b=QlKleylYtxzR8i4TO8ocO08UfYns4BeyyTI4XwNeVR8t2mqEihn3+F866q26maUD6a KpqWweVnBmeBDZrA30dQtKo/HNM3TY2KgqHMjt5Y+p7huze2ixzF4j+dYfLHnEw2LgcD Seo6CeA25g+R/B4oZanzu3u2iWo3mQb03ysgtXSn1b68AUaz1G+Al2O8lcA5HOcPaPRI CPt3F+cVoNZJVYekJsXfmOQLSM12USA5J39FqB/BHBUUeaOaRTAtcwkhoS1Xe31YJeBp JaysPrSz2xWrbe6aHFciuXxcfaOic+cfYnllph1yOB9DaeKk19De12vG2E30PAiOJKzO CrHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=TliPq8ibLZUYj2RGNfXhoPwJueLQtP6xKcI2tJGPnwg=; b=IauSMc2G399SENMfON3y4SrCX49Iym/a7kxq+5V1sVGq/Q8uNuJO+W9GuirT1qVaqP t+MoKQfUzYt4IeojRyHS0zojBSjfsZrp3eVinq0v1kIjBR1VA6Z69IXspJe2/UkyT8OY C6Ibv3TBOTNbgcJsGrQZu/XfpH9PYs29fxU+hLOKPHpnMBY1oqzD8ntHlvy5QwjR9rOz ZRSYsVY5qFWV06sElhVypWWAzLzKlv6fyf37IhR2yh17BKqnWvGT8fmfMzlqUFXDhn71 EhKpttJIzlDgbTUfkJflP00c0hyIHGqdrV/5hP+VeTVC7Eo3MrZ46viIlLMu+zADM7/a GpAg== X-Gm-Message-State: APjAAAX9QbmkptiIBuJTxLMhZle8v/mjoDW8gI47K55PyucmMYmC64T6 O9D12F342oBb8Es7a9R5/Sa32v7tHOTaECvRubAZV74y X-Google-Smtp-Source: APXvYqyA6EH3NnmASIfQkGeeIE9ULpSQ0qEiE41YdIcUTB2u4FJNBC76tgYtemBUJG1Vj8RXz4rXMX43gzSPWH1QT0c= X-Received: by 2002:adf:de83:: with SMTP id w3mr14884641wrl.56.1552168162642; Sat, 09 Mar 2019 13:49:22 -0800 (PST) MIME-Version: 1.0 Received: by 2002:adf:fc4c:0:0:0:0:0 with HTTP; Sat, 9 Mar 2019 13:49:22 -0800 (PST) From: David Mehler Date: Sat, 9 Mar 2019 16:49:22 -0500 Message-ID: Subject: FreeBSD, Asterisk 16, pf, and pjsip, nat To: freebsd-questions Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 2E07075028 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=QlKleylY; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of davemehler@gmail.com designates 2a00:1450:4864:20::442 as permitted sender) smtp.mailfrom=davemehler@gmail.com X-Spamd-Result: default: False [-4.47 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.86)[-0.856,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.61)[ip: (1.41), ipnet: 2a00:1450::/32(-2.32), asn: 15169(-2.06), country: US(-0.07)]; RCVD_IN_DNSWL_NONE(0.00)[2.4.4.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Mar 2019 21:49:25 -0000 Hello, I'm running Asterisk 16 via ports on a FreeBSD 11 system. I'm running pf and believe I have things correct, I'm allowing ports UDP 5060 and 5061, as well as for rtp UDP 10000 to 20000 through. I'm running this on a vps with an public IP, it is not natted. My local connection to the internet is behind a natted cable modem. I can connect via soft phone to the asterisk sip server, says account ready. Everything works except audio. I believe I'm having a nat issue as the connecting client is behind a nat and I'm using chan_pjsip so the pjsip.conf file. Currently here is my account-is-ready though no audio configuration: ; PJSIP Configuration [transport-udp] type=transport protocol=udp bind=0.0.0.0 ;Templates for the necessary configuration sections [endpoint_internal](!) type=endpoint context=from-internal disallow=all allow=gsm ;allow=g729 ;allow=ulaw [auth_userpass](!) type=auth auth_type=userpass [aor_dynamic](!) type=aor max_contacts=1 ;Definitions for our phones, using the templates above [demo-test](endpoint_internal) auth=demo-test aors=demo-test [demo-test](auth_userpass) password=unsecuredpassword ; put a strong, unique password here instead username=demo-test ;direct_media=no ;rtp_symmetric=yes ;force_rport=yes ;rewrite_contact=yes [demo-test](aor_dynamic) if in the phone definition I add/uncomment these lines I get a registration failed. ; PJSIP Configuration [transport-udp] type=transport protocol=udp bind=0.0.0.0 ;Templates for the necessary configuration sections [endpoint_internal](!) type=endpoint context=from-internal disallow=all allow=gsm ;allow=g729 ;allow=ulaw [auth_userpass](!) type=auth auth_type=userpass [aor_dynamic](!) type=aor max_contacts=1 ;Definitions for our phones, using the templates above [demo-test](endpoint_internal) auth=demo-test aors=demo-test [demo-test](auth_userpass) password=unsecuredpassword ; put a strong, unique password here instead username=demo-test direct_media=no rtp_symmetric=yes force_rport=yes rewrite_contact=yes [demo-test](aor_dynamic) Suggestions welcome. Thanks. Dave.