Skip to content

Commit

Permalink
Issue #131: Reverted filtering broadcast calls.
Browse files Browse the repository at this point in the history
All calls to a local number are announced as "P-Called-Party-ID:
<sip:**[email protected]>".
  • Loading branch information
haumacher committed Jan 20, 2025
1 parent 3d9b640 commit 62938d8
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,21 @@ protected UserAgentListener createCallHandler(CustomerOptions user, String userN
String calledParty;
if (header != null) {
calledParty = header.getValue();
if (calledParty != null) {
SipURI uri = SipURI.parseAddress(calledParty);
if (uri != null) {
String calledUser = uri.getUserName();
if (calledUser != null && calledUser.startsWith("**9")) {
// Broadcast call, ignore.
LOG.info("Rejecting broadcast call ({}).", calledParty);
return rejectHandler();
}
}
}

// Note: Filtering broadcast calls not work, since the P-Called-Party-ID is
// always **9, even if the local number of the answerbot (e.g. **621) is called.

// if (calledParty != null) {
// SipURI uri = SipURI.parseAddress(calledParty);
// if (uri != null) {
// String calledUser = uri.getUserName();
// if (calledUser != null && calledUser.startsWith("**9")) {
// // Broadcast call, ignore.
// LOG.info("Rejecting broadcast call ({}).", calledParty);
// return rejectHandler();
// }
// }
// }
} else {
calledParty = "-";
}
Expand Down

0 comments on commit 62938d8

Please sign in to comment.