I tried to use NAT using STUN server and checking the ICE flag in UA config as below.
ua_cfg = pj.UAConfig()
ua_cfg.stun_host = "XX.XX.XXX.XX"
my_media_cfg = pj.MediaConfig()
my_media_cfg.enable_ice = True
log_cfg = pj.LogConfig(level=5, callback=log_cb)
lib.init(ua_cfg=ua_cfg, media_cfg=my_media_cfg, log_cfg=log_cfg)
After this I created the UDP transport as follows.
transport = lib.create_transport(pj.TransportType.UDP, pj.TransportConfig(0))
And finally, I am registering a SIP and able to make calls. But I am unable to access my system's microphone and speakers.
Has anyone tried implementing the same for cloud using Python?