Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We use a obfuscation software to encrypt/mangle both SIP/RTP which sits before asterisk. What happens is sometimes we don't get any voice. after some "rtp set debug" we found out that when received ip of the rtp stream is router's public ip, everything works cleanly. But sometimes we get the private ip's of the client as received address in rtp stream which results in "no voice". it seems asterisk because of some unknown reason failed to traverse nat for the media stream.

How asterisk manages nat is not known to me. But common SIP nat traversal methods dictate that first it modifies SDP to put its address as the destination address for both side. Then it waits for a rtp packet (symmetric rtp) to know to what port it should send media.

I'm not understanding at what stage it fails. Because of wrong IP is shown i'm suspecting that its because of not writing SDP correctly. For what reason it happens still unknown to us.

Any pointer to how it should be debugged?

What reason behind this strange behavior is still unknown to us.

share|improve this question

Have you tried setting the externip option?

Also, perhaps check out

If a peer is configured with nat=yes, it causes Asterisk to ignore the address information in the SIP and SDP headers from this peer, and reply to the sender's IP address and port

(I haven't looked at Asterisk for a while but recall that NAT can be a PITA.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.