SIP/2.0 400 Bad Request - 'Invalid IP Address'

Hi,

I have trixbox and cisco router. There is sip trunk between them. I make call from trixbox to cisco router and getting this error. Same error happen when i call from cisco to trixbox. I am sending trixbox debug output during call process. What should i do to solve problem. Thank you.

Ufuk Guler

– Executing [2000@from-internal:1] Macro(“SIP/5610-0a0155a8”, “user-callerid|SKIPTTL|”) in new stack
 – Executing [s@macro-user-callerid:1] NoOp(“SIP/5610-0a0155a8”, “user-callerid: device 5610”) in new stack
 – Executing [s@macro-user-callerid:2] Set(“SIP/5610-0a0155a8”, “AMPUSER=5610”) in new stack
 – Executing [s@macro-user-callerid:3] GotoIf(“SIP/5610-0a0155a8”, “0?report”) in new stack
 – Executing [s@macro-user-callerid:4] ExecIf(“SIP/5610-0a0155a8”, “1|Set|REALCALLERIDNUM=5610”) in new stack
 – Executing [s@macro-user-callerid:5] NoOp(“SIP/5610-0a0155a8”, “REALCALLERIDNUM is 5610”) in new stack
 – Executing [s@macro-user-callerid:6] Set(“SIP/5610-0a0155a8”, “AMPUSER=5610”) in new stack
 – Executing [s@macro-user-callerid:7] Set(“SIP/5610-0a0155a8”, “AMPUSERCIDNAME=Ufuk Guler”) in new stack
 – Executing [s@macro-user-callerid:8] GotoIf(“SIP/5610-0a0155a8”, “0?report”) in new stack
 – Executing [s@macro-user-callerid:9] Set(“SIP/5610-0a0155a8”, “AMPUSERCID=5610”) in new stack
 – Executing [s@macro-user-callerid:10] Set(“SIP/5610-0a0155a8”, “CALLERID(all)=“Ufuk Guler” <5610>”) in new stack
 – Executing [s@macro-user-callerid:11] Set(“SIP/5610-0a0155a8”, “REALCALLERIDNUM=5610”) in new stack
 – Executing [s@macro-user-callerid:12] ExecIf(“SIP/5610-0a0155a8”, “0|Set|CHANNEL(language)=”) in new stack
 – Executing [s@macro-user-callerid:13] NoOp(“SIP/5610-0a0155a8”, “TTL: ARG1: SKIPTTL”) in new stack
 – Executing [s@macro-user-callerid:14] GotoIf(“SIP/5610-0a0155a8”, “1?continue”) in new stack
 – Goto (macro-user-callerid,s,23)
 – Executing [s@macro-user-callerid:23] NoOp(“SIP/5610-0a0155a8”, “Using CallerID “Ufuk Guler” <5610>”) in new stack
 – Executing [2000@from-internal:2] Set(“SIP/5610-0a0155a8”, “_NODEST=”) in new stack
 – Executing [2000@from-internal:3] Macro(“SIP/5610-0a0155a8”, “record-enable|5610|OUT|”) in new stack
 – Executing [s@macro-record-enable:1] GotoIf(“SIP/5610-0a0155a8”, “0?2:4”) in new stack
 – Goto (macro-record-enable,s,4)
 – Executing [s@macro-record-enable:4] AGI(“SIP/5610-0a0155a8”, “recordingcheck|20080622-180012|1214146812.54”) in new stack
 – Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
 recordingcheck|20080622-180012|1214146812.54: Outbound recording not enabled
 – AGI Script recordingcheck completed, returning 0
 – Executing [s@macro-record-enable:5] NoOp(“SIP/5610-0a0155a8”, “No recording needed”) in new stack
 – Executing [2000@from-internal:4] Macro(“SIP/5610-0a0155a8”, “dialout-trunk|2|2000||”) in new stack
 – Executing [s@macro-dialout-trunk:1] Set(“SIP/5610-0a0155a8”, “DIAL_TRUNK=2”) in new stack
 – Executing [s@macro-dialout-trunk:2] ExecIf(“SIP/5610-0a0155a8”, “0|Authenticate|”) in new stack
 – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/5610-0a0155a8”, “0?disabletrunk|1”) in new stack
 – Executing [s@macro-dialout-trunk:4] Set(“SIP/5610-0a0155a8”, “DIAL_NUMBER=2000”) in new stack
 – Executing [s@macro-dialout-trunk:5] Set(“SIP/5610-0a0155a8”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
 – Executing [s@macro-dialout-trunk:6] Set(“SIP/5610-0a0155a8”, “GROUP()=OUT_2”) in new stack
 – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/5610-0a0155a8”, “1?nomax”) in new stack
 – Goto (macro-dialout-trunk,s,9)
 – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/5610-0a0155a8”, “0?skipoutcid”) in new stack
 – Executing [s@macro-dialout-trunk:10] Set(“SIP/5610-0a0155a8”, “DIAL_TRUNK_OPTIONS=”) in new stack
 – Executing [s@macro-dialout-trunk:11] Macro(“SIP/5610-0a0155a8”, “outbound-callerid|2”) in new stack
 – Executing [s@macro-outbound-callerid:1] GotoIf(“SIP/5610-0a0155a8”, “1?start”) in new stack
 – Goto (macro-outbound-callerid,s,3)
 – Executing [s@macro-outbound-callerid:3] NoOp(“SIP/5610-0a0155a8”, “REALCALLERIDNUM is 5610”) in new stack
 – Executing [s@macro-outbound-callerid:4] GotoIf(“SIP/5610-0a0155a8”, “1?normcid”) in new stack
 – Goto (macro-outbound-callerid,s,9)
 – Executing [s@macro-outbound-callerid:9] Set(“SIP/5610-0a0155a8”, “USEROUTCID=5610”) in new stack
 – Executing [s@macro-outbound-callerid:10] Set(“SIP/5610-0a0155a8”, “EMERGENCYCID=”) in new stack
 – Executing [s@macro-outbound-callerid:11] Set(“SIP/5610-0a0155a8”, “TRUNKOUTCID=Advansa”) in new stack
 – Executing [s@macro-outbound-callerid:12] GotoIf(“SIP/5610-0a0155a8”, “1?trunkcid”) in new stack
 – Goto (macro-outbound-callerid,s,16)
 – Executing [s@macro-outbound-callerid:16] GotoIf(“SIP/5610-0a0155a8”, “0?usercid”) in new stack
 – Executing [s@macro-outbound-callerid:17] Set(“SIP/5610-0a0155a8”, “CALLERID(all)=Advansa”) in new stack
 – Executing [s@macro-outbound-callerid:18] GotoIf(“SIP/5610-0a0155a8”, “0?report”) in new stack
 – Executing [s@macro-outbound-callerid:19] Set(“SIP/5610-0a0155a8”, “CALLERID(all)=5610”) in new stack
 – Executing [s@macro-outbound-callerid:20] GotoIf(“SIP/5610-0a0155a8”, “1?report:hidecid”) in new stack
 – Goto (macro-outbound-callerid,s,22)
 – Executing [s@macro-outbound-callerid:22] NoOp(“SIP/5610-0a0155a8”, “CallerID set to “” <5610>”) in new stack
 – Executing [s@macro-dialout-trunk:12] AGI(“SIP/5610-0a0155a8”, “fixlocalprefix”) in new stack
 – Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
 – AGI Script fixlocalprefix completed, returning 0
 – Executing [s@macro-dialout-trunk:13] Set(“SIP/5610-0a0155a8”, “OUTNUM=2000”) in new stack
 – Executing [s@macro-dialout-trunk:14] Set(“SIP/5610-0a0155a8”, “custom=SIP/Advansa_Out”) in new stack
 – Executing [s@macro-dialout-trunk:15] GotoIf(“SIP/5610-0a0155a8”, “1?gocall”) in new stack
 – Goto (macro-dialout-trunk,s,17)
 – Executing [s@macro-dialout-trunk:17] Macro(“SIP/5610-0a0155a8”, “dialout-trunk-predial-hook|”) in new stack
 – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/5610-0a0155a8”, “0?bypass|1”) in new stack
 – Executing [s@macro-dialout-trunk:19] GotoIf(“SIP/5610-0a0155a8”, “0?customtrunk”) in new stack
 – Executing [s@macro-dialout-trunk:20] Dial(“SIP/5610-0a0155a8”, “SIP/Advansa_Out/2000|300|”) in new stack
Audio is at 172.16.1.7 port 18666
Adding codec 0x100 (g729) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 88.255.xx.xxx:5060:
INVITE sip:2000@88.255.xx.xxx SIP/2.0
Via: SIP/2.0/UDP 172.16.1.7:5060;branch=z9hG4bK17b6ae31;rport
From: “5610” sip:5610@172.16.1.7;tag=as41c175a3
To: sip:2000@88.255.xx.xxx
Contact: sip:5610@172.16.1.7
Call-ID: 20095cb4015b76f33e3f6170095fa79f@172.16.1.7
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Sun, 22 Jun 2008 15:00:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 257

v=0
o=root 2425 2425 IN IP4 172.16.1.7
s=session
c=IN IP4 172.16.1.7
t=0 0
m=audio 18666 RTP/AVP 18 101
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv


 – Called Advansa_Out/2000
dvansa*CLI>
<— SIP read from 88.255.xx.xxx:5060 —>
SIP/2.0 400 Bad Request - 'Invalid IP Address’
Via: SIP/2.0/UDP 172.16.1.7:5060;branch=z9hG4bK17b6ae31;rport
From: “5610” sip:5610@172.16.1.7;tag=as41c175a3
To: sip:2000@88.255.xx.xxx;tag=F04E31F-1809
Date: Sun, 22 Jun 2008 15:00:13 GMT
Call-ID: 20095cb4015b76f33e3f6170095fa79f@172.16.1.7
Server: Cisco-SIPGateway/IOS-12.x
CSeq: 102 INVITE
Allow-Events: telephone-event
Content-Length: 0

<------------->
— (10 headers 0 lines) —
 – Got SIP response 400 “Bad Request - ‘Invalid IP Address’” back from 88.255.xx.xxx
Transmitting (no NAT) to 88.255.xx.xxx:5060:
ACK sip:2000@88.255.xx.xxx SIP/2.0

Via: SIP/2.0/UDP 172.16.1.7:5060;branch=z9hG4bK17b6ae31;rport
From: “5610” sip:5610@172.16.1.7;tag=as41c175a3
To: sip:2000@88.255.xx.xxx;tag=F04E31F-1809
Contact: sip:5610@172.16.1.7
Call-ID: 20095cb4015b76f33e3f6170095fa79f@172.16.1.7
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


 – SIP/Advansa_Out-0a01cd10 is circuit-busy
 == Everyone is busy/congested at this time (1:0/1/0)
 – Executing [s@macro-dialout-trunk:21] Goto(“SIP/5610-0a0155a8”, “s-CONGESTION|1”) in new stack
 – Goto (macro-dialout-trunk,s-CONGESTION,1)
 – Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf(“SIP/5610-0a0155a8”, “1?noreport”) in new stack
 – Goto (macro-dialout-trunk,s-CONGESTION,3)
 – Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp(“SIP/5610-0a0155a8”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
 – Executing [2000@from-internal:5] Macro(“SIP/5610-0a0155a8”, “outisbusy|”) in new stack
 – Executing [s@macro-outisbusy:1] Playback(“SIP/5610-0a0155a8”, “all-circuits-busy-now|noanswer”) in new stack
 – <SIP/5610-0a0155a8> Playing ‘all-circuits-busy-now’ (language ‘en’)
Really destroying SIP dialog ‘20095cb4015b76f33e3f6170095fa79f@172.16.1.7’ Method: INVITE
 – Executing [s@macro-outisbusy:2] Playback(“SIP/5610-0a0155a8”, “pls-try-call-later|noanswer”) in new stack
 – <SIP/5610-0a0155a8> Playing ‘pls-try-call-later’ (language ‘en’)
 == Spawn extension (macro-outisbusy, s, 2) exited non-zero on ‘SIP/5610-0a0155a8’ in macro 'outisbusy’
 == Spawn extension (macro-outisbusy, s, 2) exited non-zero on 'SIP/5610-0a0155a8’
advansaCLI>
advansa
CLI>
advansa*CLI>

Not sure but probably cisco box doesn’t like to see your private address 172.16.1.7 in SDP. Try to configure your Asterisk server to use public addresses in the signaling.