Asterisk and UA on same address

Hi, almighty asterisk overlords,
I have a question - Is there some fundamental problem with having asterisk and user agent on the same address? I am asking because I have an server with two network interfaces (one local and one opened to internet). Asterisk is listening on the local one (localnet is set in sip.conf). When I tried to run my software, that acts as an UA on the same local interface, I was able to estabilish SIP session, but failed to create working RTP stream. But when I set my app to bind on interface other than Asterisk is using, everything works fine.
It puzzles me :frowning:

Thanks for any thoughts


Yes, there are problems because Asterisk and your UA may use the same port for sip messages, udp 5060 (much likely) and for rtp streams (less likely), so check the sip port used by Asterisk (sip.conf) and the rtp ports (rtp.conf) and then check your UA’s configuration to use different ports for sip and rtp.


Marco Bruni

That is impossible - my UA sip port is set to something different. And even if it wasn’t one of these two would fail to bind to already bound port. Same for rtp ports, I have tested it before starting this thread…

Any other thoughts?