I finally isolated the problem here. I was trying to deal with some NAT nonsense involving dropped Contact headers from my SIP trunk provider and had a block like this in the WITHINDLG route:
``` if (uri==myself && $ru=~";alias=10") { # Deal with BS on ACKs handle_ruri_alias(); if($du != $null) { $ru = $du; } } ```
The crash was happening in here. I've since switched to a different method of dealing with this and the problem has gone away.