On 8/18/23 12:41, Joshua C. Colp wrote:
On Fri, Aug 18, 2023 at 1:09 PM Mark Murawski <markm-li...@intellasoft.net> wrote:

    I've seen this happen three times in the wild now.  I've been
    trying to
    isolate the source of the issue, but so far it seems like there's not
    enough debug output to know why this occurs.

    Long story short:
    - Start Asterisk
    - PJSIP Handles receiving INVITE from ITSP via WAN (Asterisk is
    behind
    NAT).  SIP is handled correctly, Asterisk responds OK with RTP media
    address of external_media_address
    - After 30 minutes to an hour or sometimes months later after
    startup,
    upon receiving INVITE from ITSP via WAN, Asterisk responds OK with
    INTERNAL LAN IP instead of external_media_address
    - I've observed this occur after 30 minutes from startup with no
    configuration changes that were made or any pjsip reloads done during
    this period


<snip>



    Attached sip sessions and debug log... the only thing I found
    interesting was finding a lack of a log item
    We SHOULD be seeing:
    DEBUG[XXXXX] res_pjsip_session.c: (null session): Setting external
    media
    address to 152.X.Y.Z
    This message is clearly lacking from the debug session where the
    incorrect media address is sent.  But there's not enough detail in
    the
    debugs to see why this decision was not made to use
    external_media_address


Can't you just extend the debug and add further logging to understand the choices being made and why?

Doing that now!


    By default we use nat settings for all our endpoints, but
    obviously it's
    not required here for an ITSP that has trustworthy media ports in the
    SDP.  Maybe a bandaid is turning off rewrite_contact for this
    endpoint?
    Going to try that as soon as possible.


I believe I've stated this once or twice when you've brought this issue up on IRC but rewrite_contact has no influence or impact on this. It rewrites incoming Contact headers to the source IP address and port of the SIP message. You can turn it on if you wish, but it is unlikely to do anything.


Sorry, I missed this on IRC.  Thanks.  Makes sense


With the limited insight into things it could be a bug. I haven't seen any other reports, and haven't received any reports from other Sangoma products. Is this with a mainline Asterisk, or is it your patched version of Asterisk? It should be confirmed on normal Asterisk.

Thanks, very curious if this has come up for anyone else.  This is a slightly patched asterisk but nothing that would change the outcome of any nat handling or decision making (additional logging updates to pjsip only)
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
      https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to