Isn't user agent detection a form of DPI? They're looking inside the packets being sent, instead of simply using the level 2 and 3 information to determine where and how to route the packets.
Yes, user-agent detection is a form of DPI. At least in the telecom space, DPI often refers to investigating layer-7 packet payloads versus only parsing the L7 HTTP headers as an example.
Arguably, due to the nested encapsulation of the ISO model which we all loosely base our understanding of the various network and application protocols, one could technically claim that parsing an IP (or TCP) payload counts as DPI, but that's not how the term is generally marketed or used by vendors nor network engineering or operating teams.
The wikipedia DPI entry[1] is vague; IMO perhaps deliberately. For the purpose of this discussion, perhaps it would help to distinguish between source IP filtering (as per the OP) and L7 DPI capability.