cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
651
Views
5
Helpful
5
Replies

NAT issue on IAD

mrjoli021
Level 1
Level 1

We have an old IAD that has been working for years.  We recently moved the PBX to the cloud.  The IAD has a private IP of 10.21.10.12.  I have added the NAT translation on the router to allow from the PBX's public IP to talk to the IAD.  I am seeing the call hit the IAD, but call fails.  I have read and found several forums that explain that it is a Natting issue, but have found a way to fix it.  I cant give the IAD a public IP.  

 

Error Message:

*Apr 12 13:31:59.652: //-1/xxxxxxxxxxxx/SIP/Error/sipSPI_validate_own_ip_addr:
ReqLine IP addr does not match with host IP addr
*Apr 12 13:31:59.652: //-1/C3BAFC258011/SIP/Error/sact_idle_new_message_invite:
Invalid URL in incoming INVITE

 

Inbound Dial-Peer:

dial-peer voice 100 voip
description CatchAll Incomming
destination-pattern +1T
progress_ind setup enable 3
session protocol sipv2
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
fax protocol t38 version 0 ls-redundancy 0 hs-redundancy 0 fallback none
ip qos dscp cs5 media
ip qos dscp cs4 signaling
no vad

1 Accepted Solution

Accepted Solutions

Based on your provided information I would think that something along the way with this should do the trick for you.

** Inbound **
voice class sip-profiles 100
 rule 5 request INVITE sip-header SIP-Req-URI modify "70.1.2.3" "10.21.10.12"
 rule 10 response ANY sdp-header Audio-Attribute modify "10.21.10.12" "70.1.2.3" 
 rule 20 request ANY sdp-header Connection-Info modify "70.1.2.3" "10.21.10.12" 
 rule 30 response ANY sdp-header Audio-Attribute modify "70.1.2.3" "10.21.10.12" 
 rule 40 response ANY sdp-header Connection-Info modify "70.1.2.3" "10.21.10.12" 
 rule 50 request ANY sdp-header mline-index 1 c= modify "70.1.2.3" "10.21.10.12" 
 rule 60 response ANY sdp-header mline-index 1 c= modify "70.1.2.3" "10.21.10.12" 
 rule 70 request ANY sdp-header Audio-Attribute modify "a=candidate:1 1 (.*) 70.1.2.3" "a=candidate:1 1 \1 10.21.10.12" 
 rule 80 request ANY sdp-header Audio-Attribute modify "a=candidate:1 2 (.*) 70.1.2.3" "a=candidate:1 2 \1 10.21.10.12" 
 rule 90 response ANY sdp-header Audio-Attribute modify "a=candidate:1 1 (.*) 70.1.2.3" "a=candidate:1 1 \1 10.21.10.12" 
 rule 100 response ANY sdp-header Audio-Attribute modify "a=candidate:1 2 (.*) 70.1.2.3" "a=candidate:1 2 \1 10.21.10.12" 
 rule 110 request ANY sdp-header Audio-Attribute modify "10.21.10.12" "70.1.2.3"

** Outbound **
voice class sip-profiles 200
 rule 10 response 200 sdp-header Audio-Connection-Info modify "0.0.0.0" "70.1.2.3"
 rule 20 response ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 30 response ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 40 request ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 50 request ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 60 response ANY sdp-header Audio-Attribute modify "a=rtcp:(.) 10.21.10.12" "a=rtcp:\1 70.1.2.3 "
 rule 70 request ANY sdp-header Audio-Attribute modify "a=rtcp:(.) 10.21.10.12" "a=rtcp:\1 70.1.2.3 "
 rule 80 response ANY sdp-header Audio-Attribute modify "a=candidate:1 1(.) 10.21.10.12 (.) " "a=candidate:1 1\1 70.1.2.3 \2"
 rule 90 request ANY sdp-header Audio-Attribute modify "a=candidate:1 1(.) 10.21.10.12 (.) " "a=candidate:1 1\1 70.1.2.3 \2"
 rule 100 response ANY sdp-header Audio-Attribute modify "a=candidate:1 2(.) 10.21.10.12 (.) " "a=candidate:1 2\1 70.1.2.3 \2"
 rule 110 request ANY sdp-header Audio-Attribute modify "a=candidate:1 2(.) 10.21.10.12 (.) " "a=candidate:1 2\1 70.1.2.3 \2"

** SIP option ping **
voice class sip-profiles 299
 rule 5 request ANY sip-header Via modify "SIP(.*) 10.21.10.12(.*)" "SIP\1 70.1.2.3\2"
 rule 10 request OPTIONS sip-header From modify "<sip:10.21.10.12" "<sip:<FQDN name of the router>"
 rule 20 request OPTIONS sip-header Contact modify "<sip:10.21.10.12" "<sip:<FQDN name of the router>"
 rule 30 response ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 40 response ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"

Once you're happy with the SIP profiles and have tested them in the tool that I linked to in another answer then you set it to use on the dial peers with this.

voice class sip-options-keepalive 200
 sip-profiles 299
!
voice service voip
 sip
  sip-profiles 100 inbound
!
dial-peer voice 100 voip !(If this is your inbound dial peer from ITSP)
 voice-class sip profiles 100 inbound
! 
dial-peer voice 200 voip !(If this is your outbound dial peer to ITSP)
 voice-class sip profiles 200
voice-class sip options-keepalive profile 200

Most of this is based on how to handle a setup with NAT for Direct Routing with the MS Teams calling platform, but it should be applicable for the most for anything that does NAT.

For detailed information on how this works in IOS/IOS-XE I'm going to reference my likely most linked to document these days.



Response Signature


View solution in original post

5 Replies 5

Can you share the full information of the invite from debug ccsip message and also the details of the public and private IP that the NAT is setup for? If you do not want to share your actual public IP just change this information to something else, but keep it consistent.

What you need is to have a SIP profile that modify the IP address information from the public IP to the private IP in the SIP dialogue so that the router recognises the invite as destined to it.



Response Signature


Hello Below is the complete output.  This is an incomming call, I still have not tested outbound.  the 147.x.x.x is the providers IP and the 70.x.x.x is the public IP of the colo.  I am not sure how to change the 70.x.x.x IP to the 10.21.10.12 ip.

 

*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpIPv4SocketReads: Msg enqueued for SPI with IP addr: [147.1.2.3]:5080, local_address:[ - ]
*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 2 for event 1
*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x0
*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:13051234567@70.1.2.3:5060 SIP/2.0
Via: SIP/2.0/UDP 147.1.2.3:5080;rport;branch=z9hG4bKgjr9ZyFFHD0Xj
Max-Forwards: 65
From: "[V]+17861234567" <sip:+17861234567@147.1.2.3>;tag=aHpj15a457rae
To: <sip:13051234567@70.1.2.3:5060>
Call-ID: e73ae5b9-3527-123b-c188-7ebbc116df67
CSeq: 50338268 INVITE
Contact: <sip:mod_sofia@147.1.2.3:5080>
User-Agent: FreeSWITCH
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Supported: timer, path, replaces
Allow-Events: talk, hold, conference, refer
Privacy: none
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 275
P-Attestation-Indicator: A
X-FS-Support: update_display,send_info
P-Asserted-Identity: "[V]+17861234567" <sip:+17861234567@147.1.2.3>

v=0
o=FreeSWITCH 1649762222 1649762223 IN IP4 147.1.2.3
s=FreeSWITCH
c=IN IP4 147.1.2.3
t=0 0
m=audio 21898 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=silenceSupp:off - - - -
a=ptime:20

*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_new_msg_preprocessor: Checking Invite Dialog
*Apr 12 16:01:19.299: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIAddContextToTable: Added context(0x23203EE8) with key=[8] to table
*Apr 12 16:01:19.299: //-1/000000000000/SIP/Info/ccsip_offer_ans_init:
*Apr 12 16:01:19.299: //-1/000000000000/SIP/Info/ccsip_iwf_init:
*Apr 12 16:01:19.299: //-1/000000000000/SIP/Info/ccsip_ipip_media_service_init:
*Apr 12 16:01:19.299: //-1/000000000000/SIP/Info/sipSPI_ipip_vcc_Initialization: Entry...
*Apr 12 16:01:19.299: //-1/000000000000/SIP/Info/ccsip_ipip_media_forking_init: MF: Queue is initialised..
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 147.1.2.3,Port 5080, Transport 1, SentBy Port 5080
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Info/resolve_sig_ip_address_to_bind: calling reg_invoke_ip_first_hop()
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Info/resolve_sig_ip_address_to_bind: ip_best_local_address 10.21.10.12 for SIP
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Info/resolve_sig_ip_address_to_bind: return addr 10.21.10.12
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/State/sipSPIChangeState: 0x23203EE8 : State change from (STATE_NONE, SUBSTATE_NONE) to (STATE_IDLE, SUBSTATE_NONE)
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 147.1.2.3,Port 5080, Transport 1, SentBy Port 5060
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Info/sipSPISetDateHeader: Clock Time Zone is UTC, same as GMT: Using GMT
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 147.1.2.3,Port 5080, Transport 1, SentBy Port 5080
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Error/sipSPI_validate_own_ip_addr:
ReqLine IP addr does not match with host IP addr
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Error/sact_idle_new_message_invite:
Invalid URL in incoming INVITE
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/ccsip_set_cc_cause_for_spi_err: Categorized cause:100, category:100
*Apr 12 16:01:19.303: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_set_release_source_for_peer: ownCallId[-1], src[6]
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetViaHostInURLFormat: VIA URL:sip:147.1.2.3:5080, Host:147.1.2.3
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetShrlPeer: Try match incoming dialpeer for Calling number: :
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetFromCalledPartyId: P-Called-Party-ID header not found
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetPeerByCalledPartyId: P-Called-Party-ID not found or parse error
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: No match found for P-Called-Party-ID
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: Precondition tag absent in Require/Supported header
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: Media Antitrombone disabled
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPISetMediaFlowMode: Storing the configured mode as FLOW-THROUGH
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPISetMediaFlowMode: xcoder high-density disabled
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPISetMediaFlowMode: Flow Mode set to FLOW_THROUGH
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: Non dial peer leg - using RTP Supported Codecs
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 18
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 0
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 8
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 9
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 4
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 2
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 15
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetCallConfig: RTP Preferred Codecs supported by GW 255
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Error/ccsip_ipip_media_forking_update_preferred_codec:
MF: Not a Forked SIP leg..
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIGetModemInfoPerCall: peer_callID=0
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Error/ccsip_ipip_media_forking_anchor_leg_config:
MF: Dial-peer is absent..
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPIMFChangeState: MF: Prev state = 0 & New state = -1
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/ccsip_ipip_media_forking_anchor_leg_reset: MF: Anchor leg config reset done...
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: Non dial peer leg - using RTP Supported Codecs
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 18
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 0
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 8
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 9
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 4
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 2
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 15
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/populate_vcc_data: RTP Preferred Codecs supported by GW 255
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPISetOverlapConfiguration: Overlap signaling: FALSE: Endpt: SIP Trunk
*Apr 12 16:01:19.303: //-1/A0194AFA8013/SIP/Info/sipSPI_ipip_GetHdrPassthruCfg: Hdr passthrough config:1 tag:0
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPI_ipip_GetCopyListCfg: Copy-list config:2 tag:0
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPI_ipip_build_consolidated_header_list: Both passthru and copylist are disabled
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPIUaddCcbToUASReqTable: ****Adding to UAS Request table.
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x23203EE8 key=e73ae5b9-3527-123b-c188-7ebbc116df6713051234567
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPIUaddCcbToUASRespTable: ****Adding to UAS Response table.
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x23203EE8 key=e73ae5b9-3527-123b-c188-7ebbc116df679F529370-1E4C
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Event/Session-Timer/sipSTSLMain: Event: E_STSL_SESSION_REFRESH_RESP
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Event/Session-Timer/sipSTSLMain: dir:1, method:102, resp_code:400, container:3CF9054C
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/Session-Timer/sipSTSLMain:
SE: 0;refresher:none peer refresher:none, flags:0, posted event:E_STSL_INVALID_PEER_EVENT, reason:4
Configured SE:1800, Configured Min-SE:1800
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sipSPISendInviteResponse: Associated container=0x3CF9054C to Invite Response 400
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Transport/sipSPITransportSendMessage: msg=0x3B6ED1D4, addr=147.1.2.3, port=5080, sentBy_port=5080, local_addr=, is_req=0, transport=1, switch=0, callBack=0x347E2BBC
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Transport/sipSPITransportSendMessage: Proceedable for sending msg immediately
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Transport/sipTransportLogicSendMsg: switch transport is 0
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Transport/sipTransportLogicSendMsg: Trying to send resp=0x3B6ED1D4 to default port=5080
*Apr 12 16:01:19.307: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerGetConnection: connection required for raddr:147.1.2.3, rport:5080 with laddr:

*Apr 12 16:01:19.307: //-1/xxxxxxxxxxxx/SIP/Transport/sipInstanceGetConnectionId: Registering gcb=0x23203EE8 with connection=0x22AFCBE4 context list
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Transport/sipTransportLogicSendMsg: Connection obtained...sending msg=0x3B6ED1D4
*Apr 12 16:01:19.307: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostSendMessage: Posting send for msg=0x3B6ED1D4, addr=147.1.2.3, port=5080, local_addr=, connId=2 for UDP
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/Info/sentErrResDisconnecting: Sent an 3456XX Error Response
*Apr 12 16:01:19.307: //-1/A0194AFA8013/SIP/State/sipSPIChangeState: 0x23203EE8 : State change from (STATE_IDLE, SUBSTATE_NONE) to (STATE_DISCONNECTING, SUBSTATE_NONE)
*Apr 12 16:01:19.307: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 400 Bad Request - 'Invalid Host'
Via: SIP/2.0/UDP 147.1.2.3:5080;rport;branch=z9hG4bKgjr9ZyFFHD0Xj
From: "[V]+17861234567" <sip:+17861234567@147.1.2.3>;tag=aHpj15a457rae
To: <sip:13051234567@70.1.2.3:5060>;tag=9F529370-1E4C
Date: Tue, 12 Apr 2022 16:01:19 GMT
Call-ID: e73ae5b9-3527-123b-c188-7ebbc116df67
CSeq: 50338268 INVITE
Allow-Events: telephone-event
Reason: Q.850;cause=100
Server: Cisco-SIPGateway/IOS-15.2.4.M5
Content-Length: 0


*Apr 12 16:01:19.331: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpIPv4SocketReads: Msg enqueued for SPI with IP addr: [147.1.2.3]:5080, local_address:[ - ]
*Apr 12 16:01:19.331: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 2 for event 1
*Apr 12 16:01:19.331: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x0
*Apr 12 16:01:19.331: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:13051234567@70.1.2.3:5060 SIP/2.0
Via: SIP/2.0/UDP 147.1.2.3:5080;rport;branch=z9hG4bKgjr9ZyFFHD0Xj
Max-Forwards: 65
From: "[V]+17861234567" <sip:+17861234567@147.1.2.3>;tag=aHpj15a457rae
To: <sip:13051234567@70.1.2.3:5060>;tag=9F529370-1E4C
Call-ID: e73ae5b9-3527-123b-c188-7ebbc116df67
CSeq: 50338268 ACK
Content-Length: 0


*Apr 12 16:01:19.331: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_new_msg_preprocessor: Checking Invite Dialog
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIFindCcbUASRespTable: *****CCB found in UAS Response table. ccb=0x23203EE8
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Subsq Transaction Address 147.1.2.3,Port 5080, Transport 1, SentBy Port 5060
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Info/sipSPISetDateHeader: Clock Time Zone is UTC, same as GMT: Using GMT
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Subsq Transaction Address 147.1.2.3,Port 5080, Transport 1, SentBy Port 5080
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUpdateCallingInfoUsingRpidOrFrom: Updating Calling Info with FROM header data
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIDeferCallClose: Not split dataplane, bail
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIWaitForStatsBforeCallClose: Not split dataplane, bail
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPICallCloseAfterFinalStat:
sipSPICallCloseAfterFinalStat:
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/State/sipSPIChangeState: 0x23203EE8 : State change from (STATE_DISCONNECTING, SUBSTATE_NONE) to (STATE_DEAD, SUBSTATE_NONE)
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x0x23203EE8
State of The Call : STATE_DEAD
TCP Sockets Used : NO
Calling Number : +17861234567
Called Number : 13051234567
Source IP Address (Sig 10.21.10.12
Destn SIP Req Addr:Port : 147.1.2.3:0
Destn SIP Resp Addr:Port : 147.1.2.3:5080
Destination Name : 147.1.2.3

*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC) : 100
Disconnect Cause (SIP) : 400

*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIDeleteContextFromTable: Context for key=[8] removed.
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUdeleteCcbFromUASReqTable: ****Deleting from UAS Request table.
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUdeleteCcbFromTable: Deleting from table. ccb=0x23203EE8 key=e73ae5b9-3527-123b-c188-7ebbc116df6713051234567
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUdeleteCcbFromUASRespTable: ****Deleting from UAS Response table.
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUdeleteCcbFromTable: Deleting from table. ccb=0x23203EE8 key=e73ae5b9-3527-123b-c188-7ebbc116df679F529370-1E4C
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIFlushEventBufferQueue: There are 0 events on the internal queue that are going to be free'd
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerUnregisterCtxtInConnection: gConnTab=0x22AFC0F4, addr=147.1.2.3, port=5080, local_addr=, unregistering context=0x23203EE8
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Transport/sipInstancePurgeContextInConnection: Purging context gcb=0x23203EE8 from the connection=0x22AFCBE4 context list
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPI_ipip_free_codec_profile: Codec Profiles Freed
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/ccsip_offer_ans_delete:
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/ccsip_iwf_delete:
*Apr 12 16:01:19.335: //-1/A0194AFA8013/SIP/Info/sipSPIUfreeOneCCB: Freeing ccb 0x23203EE8
*Apr 12 16:01:19.335: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIGetContextFromTable: NO context for key[8]
ZBSIAD#
*Apr 12 16:06:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipInstanceHandleConnAgeing: Holder=0x3B6D78A0 Connection=0x22AFCBE4, addr=147.1.2.3, port=5080, connid=2 has been REFRESHED
*Apr 12 16:06:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportSetAgeingTimer: Aging timer initiated for holder=0x3B6D78A0,addr=147.1.2.3
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipInstanceHandleConnAgeing: Connection=0x22AFCBE4, addr=147.1.2.3, port=5080, connid=2 has been aged out
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostCloseConnection: Posting UDP conn close for addr=147.1.2.3, port=5080, local_addr=, connid=2
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipDeleteConnInstance: Deleted conn=0x22AFCBE4, connid=2, addr=147.1.2.3, port=5080, local_addr=, transport=UDP
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportSetAgeingTimer: Aging timer initiated for holder=0x3B6D78A0,addr=147.1.2.3
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportStopAgeingTimer: Aging timer stopped for holder=0x3B6D78A0,addr=147.1.2.3
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Transport/sipDeleteConnHolder: Deleted holder=0x3B6D78A0, addr=147.1.2.3, count=0
*Apr 12 16:11:10.315: //-1/xxxxxxxxxxxx/SIP/Info/udpsock_close_connect: Socket fd: 1 closed for connid 2 with remote port: 5080Connection closed by foreign host.

Hi, 

 

The reason for this errir is that CUBE doesnt recoganise the public IP address 70.1.2.3 as you dont have any interface configured with this IP address. As you are already aware this supposes to be changed by your firewall device when it perform the NAT. 

But, you can try adding below SIP profile as inbound and test 

 

voice class sip-profiles 100
request INVITE sip-header SIP-Req-URI modify "70.1.2.3" "10.21.10.12"

 

voice service voip

sip

sip-profiles 100 inbound

 

dial-peer voice 100 voip   (If this is your inbound dial peer from ITSP)

voice-class sip profiles 100

 

Regards, 

 

I think that the command on the dial-peer would be "voice-class sip profiles 100 inbound".

Apart from this there would very likely be a few more headers that needs to be modified and quite likely it also needs to be done for outbound calls. Best is to look at the complete dialogue for a call attempt and then iterate through the entire thing to outline what is needed to be modified with a SIP profile. Once that is done I would strongly recommend to use the excellent tool on https://cway.cisco.com/tools/SipProfileTest/ to test out that the SIP profile does all the needed changes to the SIP headers before putting it into the gateway.



Response Signature


Based on your provided information I would think that something along the way with this should do the trick for you.

** Inbound **
voice class sip-profiles 100
 rule 5 request INVITE sip-header SIP-Req-URI modify "70.1.2.3" "10.21.10.12"
 rule 10 response ANY sdp-header Audio-Attribute modify "10.21.10.12" "70.1.2.3" 
 rule 20 request ANY sdp-header Connection-Info modify "70.1.2.3" "10.21.10.12" 
 rule 30 response ANY sdp-header Audio-Attribute modify "70.1.2.3" "10.21.10.12" 
 rule 40 response ANY sdp-header Connection-Info modify "70.1.2.3" "10.21.10.12" 
 rule 50 request ANY sdp-header mline-index 1 c= modify "70.1.2.3" "10.21.10.12" 
 rule 60 response ANY sdp-header mline-index 1 c= modify "70.1.2.3" "10.21.10.12" 
 rule 70 request ANY sdp-header Audio-Attribute modify "a=candidate:1 1 (.*) 70.1.2.3" "a=candidate:1 1 \1 10.21.10.12" 
 rule 80 request ANY sdp-header Audio-Attribute modify "a=candidate:1 2 (.*) 70.1.2.3" "a=candidate:1 2 \1 10.21.10.12" 
 rule 90 response ANY sdp-header Audio-Attribute modify "a=candidate:1 1 (.*) 70.1.2.3" "a=candidate:1 1 \1 10.21.10.12" 
 rule 100 response ANY sdp-header Audio-Attribute modify "a=candidate:1 2 (.*) 70.1.2.3" "a=candidate:1 2 \1 10.21.10.12" 
 rule 110 request ANY sdp-header Audio-Attribute modify "10.21.10.12" "70.1.2.3"

** Outbound **
voice class sip-profiles 200
 rule 10 response 200 sdp-header Audio-Connection-Info modify "0.0.0.0" "70.1.2.3"
 rule 20 response ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 30 response ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 40 request ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 50 request ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 60 response ANY sdp-header Audio-Attribute modify "a=rtcp:(.) 10.21.10.12" "a=rtcp:\1 70.1.2.3 "
 rule 70 request ANY sdp-header Audio-Attribute modify "a=rtcp:(.) 10.21.10.12" "a=rtcp:\1 70.1.2.3 "
 rule 80 response ANY sdp-header Audio-Attribute modify "a=candidate:1 1(.) 10.21.10.12 (.) " "a=candidate:1 1\1 70.1.2.3 \2"
 rule 90 request ANY sdp-header Audio-Attribute modify "a=candidate:1 1(.) 10.21.10.12 (.) " "a=candidate:1 1\1 70.1.2.3 \2"
 rule 100 response ANY sdp-header Audio-Attribute modify "a=candidate:1 2(.) 10.21.10.12 (.) " "a=candidate:1 2\1 70.1.2.3 \2"
 rule 110 request ANY sdp-header Audio-Attribute modify "a=candidate:1 2(.) 10.21.10.12 (.) " "a=candidate:1 2\1 70.1.2.3 \2"

** SIP option ping **
voice class sip-profiles 299
 rule 5 request ANY sip-header Via modify "SIP(.*) 10.21.10.12(.*)" "SIP\1 70.1.2.3\2"
 rule 10 request OPTIONS sip-header From modify "<sip:10.21.10.12" "<sip:<FQDN name of the router>"
 rule 20 request OPTIONS sip-header Contact modify "<sip:10.21.10.12" "<sip:<FQDN name of the router>"
 rule 30 response ANY sdp-header Connection-Info modify "10.21.10.12" "70.1.2.3"
 rule 40 response ANY sdp-header Audio-Connection-Info modify "10.21.10.12" "70.1.2.3"

Once you're happy with the SIP profiles and have tested them in the tool that I linked to in another answer then you set it to use on the dial peers with this.

voice class sip-options-keepalive 200
 sip-profiles 299
!
voice service voip
 sip
  sip-profiles 100 inbound
!
dial-peer voice 100 voip !(If this is your inbound dial peer from ITSP)
 voice-class sip profiles 100 inbound
! 
dial-peer voice 200 voip !(If this is your outbound dial peer to ITSP)
 voice-class sip profiles 200
voice-class sip options-keepalive profile 200

Most of this is based on how to handle a setup with NAT for Direct Routing with the MS Teams calling platform, but it should be applicable for the most for anything that does NAT.

For detailed information on how this works in IOS/IOS-XE I'm going to reference my likely most linked to document these days.



Response Signature