No audio on outing SIP call to mobile

We have a dialplan where incoming SIP connections are internally redirected via a Dial() command to an external SIP provider calling a mobile phone:

Dialplan:

extsip is the same SIP provider as the originating.

The problem is that no audio is available on both the mobile phone and the calling party. Calling a mobile phone directly from asterisk works just fine.

Asterisk version = 1.6.0

You are saying that when you do WAN -> LAN -> WAN
you don’t get the audio? Is it sip?

If yes you might want to check if your ports are forwarded
to your Asterisk server (5060 and 10000-20000)

It is SIP.

The following happens:

  1. External SIP provider (ext) gives us an incoming call
  2. We do not pick up the phone but instead dial (with Dial) a mobile number that using that same SIP provider.
  3. No audio for both parties, calls are established though

Incoming and outgoing calls are handled correctly, no problems there. Also when we pick-up the phone and then transfer the call manually all works fine as well.

You can try:

exten => 3123123456,1,Wait(1)
exten => 3123123456,2,Dial(SIP/0612345678@extsip)

Tried that. Not working.

Have tried: Wait, Pickup, Ringing in various combinations and afterwards Dial. None are working.

Just to have everything tested:

exten => 3123123456,1,Wait(2)
exten => 3123123456,2,Answer
exten => 3123123456,3,Wait(2)
exten => 3123123456,4,Dial(SIP/0612345678@extsip) 

This is very similar with some soft phones, behind firewall. That problem I solved putting STUN.
I think you could play little with sip.conf especially cancallforward, nat.
If all this don’t work may be you should start capturing packets in your Asterisk server hoping you will see UDP packages with wrong address.