P(Cl)(Cl)(Cl)=O.[C:6]1([C:12]2[C:20]([CH2:21][C:22]([OH:24])=O)=[C:15]3[CH:16]=[CH:17][CH:18]=[CH:19][N:14]3[N:13]=2)[CH:11]=[CH:10][CH:9]=[CH:8][CH:7]=1.[OH-].[Na+].[CH3:27][N:28]([CH3:31])[CH:29]=O>>[CH3:27][N:28]([CH:31]=[C:21]([C:20]1[C:12]([C:6]2[CH:7]=[CH:8][CH:9]=[CH:10][CH:11]=2)=[N:13][N:14]2[CH:19]=[CH:18][CH:17]=[CH:16][C:15]=12)[CH:22]=[O:24])[CH3:29]Phosphorus oxychloride (27.6 g) was added dropwise to N,N-dimethylformamide (16.6 ml) for 20 minutes under ice-cooling, 2-(2-phenylpyrazolo[1,5-a]pyridin-3-yl)acetic acid (9.08 g) was added to the solution thus obtained and the reaction mixture was stirred at 90°-100° C. for 20 hours. After cooling, the reaction mixture was poured onto ice (20 g). The mixture was made alkaline with 24% aqueous solution of sodium hydroxide (pH≈9) and stirred at 90° C. for 1 hour and 20 minutes. After cooling, the resulting mixture was extracted with ethyl acetate three times. The combined extract was washed with water and dried over magnesium sulfate. The solvent was removed and recrystallized from a mixture of ethyl acetate and isopropanol to give 3-(N,N-dimethylamino)-2-(2-phenylpyrazolo[1,5-a]pyridine-3-yl)acrylaldehyde (cis and trans mixture) (5.00 g).