From Persian جام (“glass, pane”). The جام (jām) pronunciation is an accepted alternate pronunciation.
جامة • (jāma) f (dual جامْتين (jāmtēn), plural جامات (jāmāt))