Nucleotidyltransferase that catalyzes the formation of cyclic GMP-AMP (cGAMP) from ATP and GTP (PubMed:26300263, PubMed:30842662). Catalysis involves both the formation of a 2',5' phosphodiester linkage at the GpA step and the formation of a 3',5' phosphodiester linkage at the ApG step, producing c[G(2',5')pA(3',5')p] (PubMed:26300263). Acts as a key cytosolic DNA sensor, the presence of double-stranded DNA (dsDNA) in the cytoplasm being a danger signal that triggers the immune responses (By similarity). Binds cytosolic DNA directly, leading to activation and synthesis of cGAMP, a second messenger that binds to and activates v1g246111/STING (By similarity). ATP + GTP = 2',3'-cGAMP + 2 diphosphate Binds 1 Mg(2+) ion per subunit. Belongs to the mab-21 family.