Telecommunications company Avaya Inc. is weighing a chapter 11 bankruptcy filing and nearing a deal to sell its call-center software unit in an effort to pare its heavy debt load after years of losses.