Video Codec failover in Asterisk


I am really naive to asterisk. My requirement right now is to enable video in VoIP.
I have been successful at some point with the help of my peers who know a lot about VoIP
However, I am stuck at one point.

Right now my video goes with H263 video and gsm / g722 / g723 / g726 audio codec.
But the video quality is greatly hampered. I have 2 grandstream devices that support H264.
So i have set their video Codecs to H264 and H263. But this does not help as my grandstream device just picks up H263 vide codec by defaut (I dont know why!). If I just allow h264 in sip.conf and h264 codec in Grandstream codec settings, it works fine when only those two devices talk to each other but since there is no fail over codec when I speak with another sip client like xlite, I am unable to send / receive video to / from my other sip clients.

Can anyone please help me out with this issue?


P.S. Needless to say but I have set the videosupport=yes in each of those extensions