Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

SIP/2.0 400 Bad Request - 'Invalid Host'.

Hello!

I'm trying to get inbound calling to work to a CUCME system over a SIP trunk.  I've been working with the SIP trunk provider, but all we get as a clue to what is wrong is the error message "SIP/2.0 400 Bad Request - 'Invalid Host'."

The router is a 2801 running 12.4(24)T2, Advanced IP Services feature set.

The CUCME code is 7.1.

We're doing SIP IP authentication only (no username/pw).  Outbound calling from the 2801 works fine.

I'd *greatly* appreciate any hints on ideas/directions/things to try!

Thank you,

Deb

----------------------------------------------------------------------------------------------------------------------------------------

Here's a trace from the provider's side:

Sent to the 2801:

U2010/11/08 21:45:21.227374 70.167.153.130:5060 -> 75.144.241.173:5060
INVITE sip:17079691929@75.144.241.173:5060 SIP/2.0.
Record-Route: <sip:70.167.153.130;lr>.
Record-Route: <sip:216.115.69.132;lr>.
Via: SIP/2.0/UDP 70.167.153.130;branch=z9hG4bK249d.8f216861ebb66a3a9f7d677131d5179b.0.
Via: SIP/2.0/UDP 216.115.69.131;branch=z9hG4bK249d.6cd681824f3bbaaf3e8036ef3c973b31.0.
Via: SIP/2.0/UDP 216.115.69.132;branch=z9hG4bK249d.c51e9d4265ab06dbba74699d9469524e.0.
Via: SIP/2.0/UDP 66.53.188.187:5060;branch=z9hG4bK9g368v207gpg8gkrb5c0.1.
To: <sip:+17079691929@216.115.69.132:5060>.
From: "anonymous" <sip:anonymous@anonymous.invalid>;tag=4292850.
Call-ID: 1288911680-43068478@LA4_SIP_01.
CSeq: 1 INVITE.
Max-Forwards: 14.
Contact: <sip:anonymous@66.53.188.187:5060;transport=udp>.
Expires: 330.
Content-Type: application/sdp.
Content-Length: 228.
.
v=0.
o=- 324616193 1289252424 IN IP4 66.53.189.187.
s=-.
c=IN IP4 66.53.189.187.
t=0 0.
m=audio 10208 RTP/AVP 0 18 101.
a=rtpmap:18 G729/8000.
a=fmtp:18 annexb=no.
a=rtpmap:101 telephone-event/8000.
a=fmtp:101 0-15.
a=ptime:20.

2801 replies:

U 2010/11/08 21:45:21.270118 75.144.241.173:5060 -> 70.167.153.130:5060
SIP/2.0 400 Bad Request - 'Invalid Host'.
Via: SIP/2.0/UDP 70.167.153.130;branch=z9hG4bK249d.8f216861ebb66a3a9f7d677131d5179b.0,SIP/2.0/UDP 216.115.69.131;branch=z9hG4bK249d.6cd681824f3bbaaf3e8036ef3c973b31.0,SIP/2.0/UDP 216.115.69.132;branch=z9hG4bK249d.c51e9d4265ab06dbba74699d9469524e.0,SIP/2.0/UDP 66.53.188.187:5060;branch=z9hG4bK9g368v207gpg8gkrb5c0.1.
From: "anonymous" <sip:anonymous@anonymous.invalid>;tag=4292850.
To: <sip:+17079691929@216.115.69.132:5060>;tag=183ED2F8-108E.
Date: Mon, 08 Nov 2010 22:48:42 GMT.
Call-ID: 1288911680-43068478@LA4_SIP_01.
CSeq: 1 INVITE.
Allow-Events: telephone-event.
Reason: Q.850;cause=100.
Server: Cisco-SIPGateway/IOS-12.x.
Content-Length: 0.

---------------------------------------------------------------------------------------------------------------------------------

Here are the relevant parts of the config:

voice service voip
allow-connections h323 to h323
allow-connections h323 to sip
allow-connections sip to h323
allow-connections sip to sip
fax protocol cisco
h323
sip
  bind control source-interface FastEthernet0/1.75
  bind media source-interface FastEthernet0/1.75
  session transport tcp
  registrar server expires max 3600 min 3600
  transport switch udp tcp
  no call service stop

!

voice class codec 1
codec preference 1 g711ulaw
codec preference 2 g729r8
!

!
voice translation-profile SIPinto9691929
translate called 6
!

!
voice translation-rule 6
rule 1 /17079691929/ /6237/
!

!
dial-peer voice 1 voip
description "Incoming Call from SIP Trunk"
translation-profile incoming SIPinto9691929
preference 2
voice-class codec 1
session protocol sipv2
session target dns:sip.flowroute.com
incoming called-number .%
dtmf-relay rtp-nte
no vad
!

!
sip-ua
nat symmetric role active
retry invite 3
retry response 3
retry bye 3
retry cancel 3
retry rel1xx 3
timers connect 100
timers connection aging 30
registrar dns:sip.flowroute.com expires 3600
host-registrar
permit hostname dns:sip.flowroute.com
!

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi Deb,

Yes, it is a NAT issue.
With the permit CLI, I would say IOS should still accept the INVITE with Req URI
with public IP even if that IP is not a valid interface on this router.
A new set of debug will confirm that.
But the the firewall/NAT router  should change all embedded addresses, including
the Req URI to the private address (10.x.x.x) for it to work properly.
In other words, 2800 shd not see any public/external IP anywhere in the SIP msg
header and SDP body.

Thx,

DK

12 REPLIES
Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

quick test...pl. remove following and try...

sip-ua

  permit hostname dns:sip.flowroute.com  <--remove this

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi, thanks for the suggestion.

I removed the command as requested, but still have error 400.

Here's the output from a debug ccsip call:


6d17h: //-1/7C2C68118196/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x684B5550
State of The Call        : STATE_DEAD
TCP Sockets Used         : NO
Calling Number           :
Called Number            : 6237
Source IP Address (Sig  ): 10.10.75.1
Destn SIP Req Addr:Port  : 216.115.69.144:0
Destn SIP Resp Addr:Port : 216.115.69.144:5060
Destination Name         : 216.115.69.144

6d17h: //-1/7C2C68118196/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC)    : 100
Disconnect Cause (SIP)   : 400

Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

debug ccsip all will tell u exactly what is going on but I took a

quick look and think the problem is with the From header...

From: "anonymous" <>anonymous@anonymous.invalid>;tag=4292850.

host portion anonymous.invalid is not correct...

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Thanks very much for the feedback/suggestion, Dilip.  I'm communicating with the SIP trunk provider about the contents of the "From" field, and will post an update here as soon as I have further info.

Best Wishes,

Deb

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi, Dilip.

The call still does not go through even though we no longer have "anonymous" in the "From" field.

I've attached a file with the output from a debug ccsip all.

Thanks much for any time/ideas you may be able to provide!

Best Wishes,

Deb

Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi Deb,

Thx for the logs....unfortunately don't see ur complete config attached

but based on these debugs, I am pretty sure here's what u r running into...

Received:
INVITE sip:6237@75.144.241.173:5060 SIP/2.0

Do u have an interface (show ip interface brief) on this router that has

IP addr.  75.144.241.173 configured ?

I think not...as I see....error...

6d18h: //-1/xxxxxxxxxxxx/SIP/Error/sipSPI_validate_own_ip_addr: ReqLine IP addr does not match with host IP addr
6d18h: //-1/F8CBEB9481B4/SIP/Error/sact_idle_new_message_invite: Invalid URL in incoming INVITE
6d18h: //-1/F8CBEB9481B4/SIP/Info/ccsip_set_cc_cause_for_spi_err: Categorized cause:100, category:100

The request-URI should have an IP in the host-portion that belongs to this router

or,

you may try

sip-ua

  permit host dns:75.144.241.173

Thx.

DK

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi, Dilip.

I tried adding the command you suggest, but that doesn't solve the problem.

It looks like I'm probably running into a NAT issue, doesn't it.

There is a quite function-limited Comcast-provided router in front of the 2801 doing NAT and firewalling.  It is set up to translate

75.144.241.173 to private address 10.10.75.1.  This address is the "ip source-address" under the telephony service part of the config.

internet -------- comcast cable router internal addr 10.1.10.1 -----------10.1.10.2 fa0/0 on 2801

2801's voice vlan ip address is 10.10.75.1

I had wondered about NAT as a source of the problem, and tried translating 75.144.241.173 to 10.1.10.2, but that doesn't work, either, I suppose since the incoming request is to the public IP.

The Comcast box won't let me assign the static IPs to the internal subnet.  (I wanted to try that previously, but it's not permitted.)  Comcast does not let business-class cable internet customers supply their own network interface router, either.  Arrghhh!

Any ideas how I might be able to work-around these limitations?

Thanks VERY VERY much for your help and insights!

Deb

Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi Deb,

Yes, it is a NAT issue.
With the permit CLI, I would say IOS should still accept the INVITE with Req URI
with public IP even if that IP is not a valid interface on this router.
A new set of debug will confirm that.
But the the firewall/NAT router  should change all embedded addresses, including
the Req URI to the private address (10.x.x.x) for it to work properly.
In other words, 2800 shd not see any public/external IP anywhere in the SIP msg
header and SDP body.

Thx,

DK

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Hi, Dilip.

I wanted to let you know that I was able to get Comcast to make their box just a pass-through device (i.e., a cable network termination device only, and not a firewall, NAT, etc. device).

After that, I configured NAT on the 2801.  I had  a bit of a problem getting all SIP communication to be working properly (I had one-way audio for a while).  Simplifying the NAT config so that there were no static NATs, and just using the outbound interface for (overload) NATing removed that problem.

Thanks again very, *very* much for all of your assistance!

Cheerio,

Deb

Cisco Employee

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Good to know Deb...Thx for keeping me posted

amd am happy that it worked out well....

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Guys!

I have the pretty same issue, but our customer's CISCO2801 isn't located behind any NAT/FW.

A little bit cut config is in an attachment.

"debug ccsip all" (incoming sip call) is as follows:

cisco2801#sh sip reg s
Line                              peer        expires(sec)  registered
================================  ==========  ============  ==========
0445381826                        20020       2875         yes
cisco2801#
cisco2801#
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpIPv4SocketReads: Msg enqueued for SPI with IP addr: [80.91.169.2]:5060
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 2 for event 1
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x67E7B7CC
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerProcessNewConnMsg: gConnTab=0x67E7B7CC, addr=80.91.169.2, port=5060, connid=2, transport=UDP
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
INVITE sip:0445381826@80.91.169.2:5060;transport=udp SIP/2.0
Allow: UPDATE,REFER,INFO
Call-ID: 11364-CX-0461b273-306c24143@sip.datagroup.com.ua
Contact: <80.91.169.2:5060>
Content-Type: application/sdp
CSeq: 71392030 INVITE
From: "4922929" <>4922929@sip.datagroup.com.ua;user=phone>;tag=11364-EM-0461b274-10e5f9467
Max-Forwards: 29
To: <0445381826>
User-Agent: Cirpack/v4.42d (gw_sip)
Via: SIP/2.0/UDP 80.91.169.2:5060;branch=z9hG4bK-21F4-158B519
Content-Length: 256

v=0
o=cp10 128991838831 128991838831 IN IP4 80.91.169.2
s=SIP Call
c=IN IP4 80.91.169.2
t=0 0
m=audio 31274 RTP/AVP 8 0 18
b=AS:80
a=rtpmap:8 PCMA/8000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:18 G729/8000/1
a=fmtp:18 annexb=no
a=ptime:20
a=sendrecv

Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_new_msg_preprocessor: Checking Invite Dialog
Nov 16 14:45:19.551: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIAddContextToTable: Added context(0x6891802C) with key=[3363] to table
Nov 16 14:45:19.551: //-1/000000000000/SIP/Info/ccsip_platform_init_ccb: Symmetric NAT enabled from CLI check for media source address

Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 80.91.169.2,Port 5060, Transport 1, SentBy Port 5060
Nov 16 14:45:19.555: //-1/F7C621E98315/SIP/State/sipSPIChangeState: 0x6891802C : State change from (STATE_NONE, SUBSTATE_NONE)  to (STATE_IDLE, SUBSTATE_NONE)
Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 80.91.169.2,Port 5060, Transport 1, SentBy Port 5060
Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Info/sipSPISetDateHeader: Converting TimeZone Kyiv to SIP default timezone = GMT
Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 80.91.169.2,Port 5060, Transport 1, SentBy Port 5060
Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Error/sipSPI_validate_own_ip_addr: ReqLine IP addr does not match with host IP addr
Nov 16 14:45:19.555: //-1/F7C621E98315/SIP/Error/sact_idle_new_message_invite: Invalid URL in incoming INVITE
Nov 16 14:45:19.555: //-1/F7C621E98315/SIP/Info/ccsip_set_cc_cause_for_spi_err: Categorized cause:100, category:100
Nov 16 14:45:19.555: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_set_release_source_for_peer: ownCallId[-1], src[6]
Nov 16 14:45:19.555: //-1/F7C621E98315/SIP/Info/sipSPIUaddCcbToUASReqTable: ****Adding to UAS Request table.
Nov 16 14:45:19.555: //-1/F7C621E98315/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x6891802C key=11364-CX-0461b273-306c24143@sip.datagroup.com.ua0445381826
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Info/sipSPIUaddCcbToUASRespTable: ****Adding to UAS Response table.
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Info/sipSPIUaddCcbToTable: Added to table. ccb=0x6891802C key=11364-CX-0461b273-306c24143@sip.datagroup.com.ua24B5A67C-13FA
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Transport/sipSPITransportSendMessage: msg=0x6905275C, addr=80.91.169.2, port=5060, sentBy_port=5060, is_req=0, transport=1, switch=0, callBack=0x613AC9CC
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Transport/sipSPITransportSendMessage: Proceedable for sending msg immediately
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Transport/sipTransportLogicSendMsg: switch transport is 0
Nov 16 14:45:19.559: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportPostSendMessage: Posting send for msg=0x6905275C, addr=80.91.169.2, port=5060, connId=0 for UDP
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/Info/sentErrResDisconnecting: Sent an 3456XX Error Response
Nov 16 14:45:19.559: //-1/F7C621E98315/SIP/State/sipSPIChangeState: 0x6891802C : State change from (STATE_IDLE, SUBSTATE_NONE)  to (STATE_DISCONNECTING, SUBSTATE_NONE)
Nov 16 14:45:19.563: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Sent:
SIP/2.0 400 Bad Request - 'Invalid Host'
Reason: Q.850;cause=100
Date: Tue, 16 Nov 2010 14:45:19 GMT
From: "4922929" <>4922929@sip.datagroup.com.ua;user=phone>;tag=11364-EM-0461b274-10e5f9467
Allow-Events: telephone-event
Content-Length: 0
To: <0445381826>;tag=24B5A67C-13FA
Call-ID: 11364-CX-0461b273-306c24143@sip.datagroup.com.ua
Via: SIP/2.0/UDP 80.91.169.2:5060;branch=z9hG4bK-21F4-158B519
CSeq: 71392030 INVITE
Server: Cisco-SIPGateway/IOS-12.x


Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Info/HandleUdpIPv4SocketReads: Msg enqueued for SPI with IP addr: [80.91.169.2]:5060
Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_process_sipspi_queue_event: ccsip_spi_get_msg_type returned: 2 for event 1
Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Transport/sipTransportProcessNWNewConnMsg: context=0x67E7B7CC
Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Transport/sipConnectionManagerProcessNewConnMsg: gConnTab=0x67E7B7CC, addr=80.91.169.2, port=5060, connid=2, transport=UDP
Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Msg/ccsipDisplayMsg:
Received:
ACK sip:0445381826@80.91.169.2:5060;transport=udp SIP/2.0
Call-ID: 11364-CX-0461b273-306c24143@sip.datagroup.com.ua
Contact: <80.91.169.2:5060>
CSeq: 71392030 ACK
From: "4922929" <>4922929@sip.datagroup.com.ua;user=phone>;tag=11364-EM-0461b274-10e5f9467
Max-Forwards: 29
To: <0445381826>;tag=24B5A67C-13FA
User-Agent: Cirpack/v4.42d (gw_sip)
Via: SIP/2.0/UDP 80.91.169.2:5060;branch=z9hG4bK-21F4-158B519
Content-Length: 0


Nov 16 14:45:19.567: //-1/xxxxxxxxxxxx/SIP/Info/ccsip_new_msg_preprocessor: Checking Invite Dialog
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIFindCcbUASRespTable: *****CCB found in UAS Response table. ccb=0x6891802C
Nov 16 14:45:19.571: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 80.91.169.2,Port 5060, Transport 1, SentBy Port 5060
Nov 16 14:45:19.571: //-1/xxxxxxxxxxxx/SIP/Info/sipSPISetDateHeader: Converting TimeZone Kyiv to SIP default timezone = GMT
Nov 16 14:45:19.571: //-1/xxxxxxxxxxxx/SIP/Transport/sipSPIUpdateResponseInfo: Dialog Transaction Address 80.91.169.2,Port 5060, Transport 1, SentBy Port 5060
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/State/sipSPIChangeState: 0x6891802C : State change from (STATE_DISCONNECTING, SUBSTATE_NONE)  to (STATE_DEAD, SUBSTATE_NONE)
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Call/sipSPICallInfo:
The Call Setup Information is:
Call Control Block (CCB) : 0x6891802C
State of The Call        : STATE_DEAD
TCP Sockets Used         : NO
Calling Number           :
Called Number            : 0445381826
Source IP Address (Sig  ): 62.216.34.158
Destn SIP Req Addr:Port  : 80.91.169.2:0
Destn SIP Resp Addr:Port : 80.91.169.2:5060
Destination Name         : 80.91.169.2

Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Call/sipSPICallInfo:
Disconnect Cause (CC)    : 100
Disconnect Cause (SIP)   : 400

Nov 16 14:45:19.571: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIDeleteContextFromTable: Context for key=[3363] removed.
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIUdeleteCcbFromUASReqTable: ****Deleting from UAS Request table.
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIUdeleteCcbFromTable: Deleting from table. ccb=0x6891802C key=11364-CX-0461b273-306c24143@sip.datagroup.com.ua0445381826
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIUdeleteCcbFromUASRespTable: ****Deleting from UAS Response table.
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIUdeleteCcbFromTable: Deleting from table. ccb=0x6891802C key=11364-CX-0461b273-306c24143@sip.datagroup.com.ua24B5A67C-13FA
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIFlushEventBufferQueue: There are 0 events on the internal queue that are going to be free'd
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/ccsip_qos_cleanup: Entry
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPI_ipip_free_codec_profile: Codec Profiles Freed
Nov 16 14:45:19.571: //-1/F7C621E98315/SIP/Info/sipSPIUfreeOneCCB: Freeing ccb 6891802C
Nov 16 14:45:19.575: //-1/xxxxxxxxxxxx/SIP/Info/sipSPIGetContextFromTable: NO context for key[3363]

I think the problem is whith the URL "sip:0445381826@80.91.169.2:5060". I really don't uderstand why incoming INVITE contains ISP's IP address...

Any thoughts? I've broken my head trying to find the cause of the problem...

Outgoing SIP calls are OK.

New Member

Re: SIP/2.0 400 Bad Request - 'Invalid Host'.

Guys! Do you have any thoughts about my problem described above?..

24124
Views
0
Helpful
12
Replies
CreatePlease to create content