session target routing overrides routing table for RTP

Answered Question
Jun 15th, 2007

I noticed something in practice that wanted to confirm with what theory says.

I have something like this:

dial-peer 1 voice voip

destination-pattern 1..

session target ipv4:

session protocol sipv2

ip route

ip route

IP address is a SIP proxy which establishes calls to different media gateways depending on the destination pattern.

In particular, for destination pattern 1.. calls are sent to a media gateway with IP

I will have expected that RTP sent to should be routed through (the default route). However I noticed that it is sent to, this is, the next-hop used for routing h323 signaling to

I think this is not a bug, but a feature. Most of the time, you will not know the IP addresses where your RTP will be terminated. You will only know the IP address of the call processing server. If, for QoS reasons, you need to have voice routed through a specific route, you will need to find out all possible RTP destinations, in order to configure static routes to all of them.

I discovered this empirically. Does anybody knows if this is documented by Cisco? I have not been able to find it.



I have this problem too.
0 votes
Correct Answer by Paolo Bevilacqua about 9 years 7 months ago

Hi Rafa,

Unless you configure "bind", the source address for both signaling and media is non-deterministics, or better say, local best address. See:

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Paolo Bevilacqua Sat, 06/16/2007 - 09:10

Hi Rafa,

In the SIP message, the proxy will tell to the endpoints the remote IP address to send the RTP stream. This can be the same address as the proxy (called flow-through, or address hiding) or a different address (called flow-around).

A cisco router doing IP-to-IP call processing can be configured either way. If you are using another type of SIP proxy, consult documentation for your product.

Hope this helps, please rate post if it does!

ggt-cisco Sat, 06/16/2007 - 12:33


Thanks for you answer. However, what I want to confirm is that the RTP will be routed through the same gateway as the signaling that setup the call, overriding the routing table.



Paolo Bevilacqua Sat, 06/16/2007 - 12:59


What I was trying to tell you, is that it depends on the endpoints address (c= line in the body of the SIP INVITE message).

If the endpoint address is the same as proxy address, RTP will be sent to that address. If it some other address, RTP will be sent to that address.

In both cases the routing table is used to send RTP to the address, and is never "overriden".

Hope this make sense.

As a recognition to those providing answers, please rate useful posts using the scrollbox below!

ggt-cisco Sat, 06/16/2007 - 13:40

Paolo, I agree with you. The routing table should not be overriden. However I was surprised when I noticed this behavior in a Cisco 5400. RTP is sent to a different gateway than the routing table says.

Paolo Bevilacqua Sat, 06/16/2007 - 14:17

Well I think you misinterpreted what you saw. In yuour case the gateway (endpoint) had a different address that the SIP proxy. This is perfectly normal. So the RTP packets were still routed by routing table, only to a different destination.

How you can say that they were going to a different route ?

ggt-cisco Mon, 06/18/2007 - 10:16


Yes, you are absolutely right. I misinterpreted what I saw. I'm using Netflow to monitor traffic in my routers. My AS5400 has two different interfaces, say Fas0/0 and Fas0/1. The default route points to Fas 0/0 while the dial-peer's session target points to Fas0/1.

What I saw in my netflow monitor was that no matter the destination of the RTP, it was always coming from the same IP address (that of Fas0/1). Then, I wrongly concluded that all RTP was coming from the same interface of the AS5400. Actually, it was coming from different interfaces, depending on the destination address of the RTP.

So, now my observation is that RTP is sent with source IP address of the same interface though which signaling is sent. Is this correct?




This Discussion