]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_session: Use Caller ID for extension matching.
authorNaveen Albert <asterisk@phreaknet.org>
Sat, 26 Nov 2022 12:54:29 +0000 (12:54 +0000)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Tue, 20 Dec 2022 15:55:21 +0000 (09:55 -0600)
commitc4066871d81423be3b5ffb640bb2d5bf12c308c7
tree7a60f2c81a2432de3457df031a7ae1a5898ac0ef
parentf86d2a211c5178eb49a615b414d296bd1a694e66
res_pjsip_session: Use Caller ID for extension matching.

Currently, there is no Caller ID available to us when
checking for an extension match when handling INVITEs.
As a result, extension patterns that depend on the Caller ID
are not matched and calls may be incorrectly rejected.

The Caller ID is not available because the supplement that
adds Caller ID to the session does not execute until after
this check. Supplement callbacks cannot yet be executed
at this point since the session is not yet in the appropriate
state.

To fix this without impacting existing behavior, the Caller ID
number is now retrieved before attempting to pattern match.
This ensures pattern matching works correctly and there is
no behavior change to the way supplements are called.

ASTERISK-28767 #close

Change-Id: Iec7f5a3b90e51b65ccf74342f96bf80314b7cfc7
include/asterisk/res_pjsip.h
res/res_pjsip.c
res/res_pjsip_caller_id.c
res/res_pjsip_session.c