PJSIP Losing Knowledge Of External_media_address
Can’t you just extend the debug and add further logging to understand the choices being made and why?
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.
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.
2 thoughts on - PJSIP Losing Knowledge Of External_media_address
Doing that now!
Sorry, I missed this on IRC. Thanks. Makes sense
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)
Any network change activity going on at the time? VPN coming up or down?
Network interface flapping? DNS availability issue (could still be an issue even though you’re using ip addresses for local_net)?
One way to get more information would be to modify that ast_sip_transport_is_local block in res_pjsip_session:session_outgoing_nat_hook to print more debug info if the ast_sip_transport_is_local check fails and the destination is your itsp. If you want really detailed info, you could compile with DONT_OPTIMIZE and put an abort() in there then run ast_coredumper when asterisk crashes to get the backtrace. That’s a service disruption of course.