Can you post your variables declaration?
You might have a truncation problem. Check the following code that looks the same but has an important difference.
DECLARE @ExtType varchar(10) = 'X',
@PhoneNo varchar(20) = '+1 (202) 123-9876 X012',
@intPos int
select @intPos = charindex(@ExtType,Upper(@PhoneNo))
SELECT @intPos
GO
DECLARE @ExtType varchar(10) = 'X',
--Note the change on the variable length
@PhoneNo varchar(10) = '+1 (202) 123-9876 X012',
@intPos int
select @intPos = charindex(@ExtType,Upper(@PhoneNo))
SELECT @intPos
GO