When a person calls client A the call comes into our server via our SIP trunk and then we immediately REFER the call to an external server that client A has subscribed to for specific IVR service. Once the caller listens to the menu and picks an option the external server REFERs the call back to our server to hit a specific extension. (The external IVR server is set up as a friend trunk on our asterisk server).
(The external IVR service has specific functionality client A needs, so keeping the IVR local isn’t an option).
This whole process generally takes over 30 seconds until the REFER comes back to our server to hit the target extension. The problem is that when the external server sends the REFER they are getting an ICMP Port Unreachable error.
When our server sends the initial REFER is is sending to dst:5060/UDP src:1xxxx/UDP. When the external server REFERs back they are replying to the src port, which obviously has been closed.
Here are the things I’ve thought/tried:
- We thought it was a UDP or RTP timeout (even though it’s a SIP message it’s on a high port in the RTP range). So we increased our firewall’s UDP timeout, asterisk udp timeout, and asterisk rtp timeout. No luck.
- Does asterisk automatically close the src port when it REFERs to an external system?
- Shouldn’t all SIP messages from external servers coming over a trunk hit 5060?
The packets are there, I can see them hitting the firewall. They just can’t get through because the high port has been closed on the asterisk server by the time the REFER comes back.
Any ideas? I’m at a loss…