Hi everybody! I finally found the mistake. Each digit of the result obtained after applying the CRC function must be converted to hexadecimal. The correct message in hexadecimal for the previous example is the following:

21 49 4E 46 7C 34 39 36 31 0D

21: start of frame marker ('!')
49 4E 46: INF message
7C: frame delimiter ('|')
34 39 36 31: CRC-CCITT function applied to "INF" = 4961. Then, each character in 4961 is translated to hexadecimal (4=34, 9=39, 6=36, 1=31).
0D: packet terminator