Cisco SIP Router - getting the loopback to be the SIP peer

I was trying to bring up a SIP over IPSec peering on a CIsco ISR4451-X. This is to complement and already existing
SIP router (CUBE I guess they call it). Anyhow I had a call not connecting and I ran debug ccsip call. One weird thing
I noticed is that the Source IP Media address 136.10.23.97 address on the external Gig 0/1 interface of the router.
The loopback is 136.10.23.98 and that's what I'm expecting to see for Source IP Address (Media). What determines
what interface/address gets used for Source IP Address (Media)? Thank you.

001812: Dec 17 2018 23:26:18.025 PST: //747/E74BC54D82EC/SIP/Call/sipSPIMediaCallInfo:
Number of Media Streams: 1
Media Stream             : 1
Negotiated Codec         : g711ulaw
Negotiated Codec Bytes   : 160
Nego. Codec payload      : 0 (tx), 0 (rx)
Negotiated Dtmf-relay    : 6
Dtmf-relay Payload       : 101 (tx), 101 (rx)
Source IP Address (Media): 136.10.23.97        
Source IP Port    (Media): 17876
Destn  IP Address (Media): 216.25.35.21
Destn  IP Port    (Media): 55414
Orig Destn IP Address:Port (Media): [ - ]:0
LVL 2
amigan_99Network EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Timothy EstesSr. Voice EngineerCommented:
Letting the router bind sip control and media is never a good idea. You're right that you should bind it yourself. Binding "control" controls what the source IP is for the actual SIP traffic on TCP or UDP 5060 and 5061. "Media" determines what the source IP is for the RTP traffic.

Device(config)# voice service voip
Device(conf-voi-serv)# sip
Device(conf-serv-sip)# bind control source-interface FastEthernet0/0
Device(conf-serv-sip)# exit
Device(config)# voice service voip
Device(conf-voi-serv)# sip
Device(conf-serv-sip)# bind media source-address ipv4 172.18.192.204
Device(conf-serv-sip)# exit

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/voice/cube/configuration/cube-book/voi-sip-bind.html

You may have to bind both sides, (TSP and the SIP trunk to CUCM). This is done at the dial-peer level.

dial-peer voice 2 voip
description SIP TRUNK OUTGOING  
huntstop
preference 1
destination-pattern 99T
session protocol sipv2
session target ipv4:172.X.X.X:5060
session transport udp
voice-class sip bind control source-interface Loopback1000
voice-class sip bind media source-interface Loopback1000
dtmf-relay rtp-nte
no dtmf-interworking
codec g711alaw
no vad

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
amigan_99Network EngineerAuthor Commented:
Oh excellent. That's it. Thanks so much.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.