I am a newbie to Asterisk, so please excuse any dumb mistakes. I read the FAQ and think I am posting as recommended.
The error could be a bad configuration file or a real problem. In any event, it seems that any configuration file error that can cause a malformed SIP message should have an edit. So, I am reporting.
Any help resolving this will be most appreciated. I’m a stumped chump.
Problem description: [color=#0000FF]Cannot place Nextiva SIP trunk call due to badly formed SIP message. Extension to extension calls work fine. Incoming calls from Nextiva work fine.[/color]
Error Message: [color=#0000FF] Got SIP response 400 “Sip message body is shorter that is indicated by the content length” back from xxx.yyy.zzz.95:5060[/color]
Asterisk version: [color=#0000FF]10.0.0[/color]
OS Version: [color=#0000FF]CentOS 6.0, minimal server install with required packages added[/color]
Test phone: [color=#0000FF]X-Lite 4.1[/color]
Other Notes: [color=#0000FF]I have Cisco 7970G phones with SIP firmware on the network at extensions 101 - 103. Since these are a bit unusual, I added extension 104 as an X-Lite 4.1 client and did all testing with that. I have redacted IP addresses, user IDs, passwords, and phone numbers as recommended.[/color]
Asterisk log showing error on outgoing Nextiva call (failure is noted):
[code][root@Asterisk ~]# asterisk -r
Asterisk 10.0.0, Copyright © 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
Connected to Asterisk 10.0.0 currently running on Asterisk (pid = 1725)
Verbosity is at least 5
== Using SIP RTP CoS mark 5
– Executing [91504xxxxxxx@default:1] Dial(“SIP/104-00000037”, “SIP/nextiva/1504xxxxxxx@nextiva,60”) in new stack
== Using SIP RTP CoS mark 5
failed to extend from 1024 to 1299
failed to extend from 1024 to 1311
failed to extend from 1024 to 1303
– Called SIP/nextiva/1504xxxxxxx@nextiva
failed to extend from 1024 to 1299
failed to extend from 1024 to 1311
failed to extend from 1024 to 1303
FAILURE MESSAGE ON NEXT LINE
– Got SIP response 400 “Sip message body is shorter that is indicated by the content length” back from xxx.yyy.zzz.95:5060
– SIP/nextiva-00000038 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Auto fallthrough, channel ‘SIP/104-00000037’ status is 'CONGESTION’
Asterisk*CLI> exit
[/code]
Asterisk log of incoming Nextiva call working:
[code][root@Asterisk ~]# asterisk -r
Asterisk 10.0.0, Copyright © 1999 - 2011 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘core show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘core show license’ for details.
Connected to Asterisk 10.0.0 currently running on Asterisk (pid = 1725)
Verbosity is at least 5
== Using SIP RTP CoS mark 5
– Executing [s@nextiva:1] Dial(“SIP/nextiva-00000039”, “SIP/101”) in new stack
== Using SIP RTP CoS mark 5
failed to extend from 1024 to 1321
failed to extend from 1024 to 1323
failed to extend from 1024 to 1334
failed to extend from 1024 to 1312
failed to extend from 1024 to 1306
– Called SIP/101
– SIP/101-0000003a is ringing
== Spawn extension (nextiva, s, 1) exited non-zero on 'SIP/nextiva-00000039’
Asterisk*CLI> exit
[/code]
sip.conf:
[code][general]
context=default ; Default context for incoming calls
port=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
;srvlookup=yes ; Enable DNS SRV lookups on outbound calls
localnet=192.168.1.0/255.255.255.0
register => :@xxx.yyy.zzz.95:5060 ; Register with Nextiva
[nextiva]
type=friend
secret=
username=
host=xxx.yyy.zzz.95
dtmfmode=rfc2833
qualify=yes
nat=yes
qualify=yes
canreinvite=no
disallow=all
allow=all
allow=alaw
allow=gsm
fromdomain=xxx.yyy.zzz.95
fromuser=
defaultuser=
insecure=port,invite
context=nextiva
[101]
type=friend ; both send and receive calls from this peer
host=dynamic ; this peer will register with us
;username=101
secret=
;canreinvite=no ; don’t send SIP re-invites (ie. terminate rtp stream)
nat=no ; always assume peer is behind a NAT
;context=phones ; send calls to ‘phones’ context
;dtmfmode=rfc2833 ; set dtmf relay mode
allow=all ; allow all codecs
[102]
type=friend ; both send and receive calls from this peer
host=dynamic ; this peer will register with us
;username=102
secret=
;canreinvite=no ; don’t send SIP re-invites (ie. terminate rtp stream)
nat=no ; always assume peer is behind a NAT
;context=phones ; send calls to ‘phones’ context
;dtmfmode=rfc2833 ; set dtmf relay mode
allow=all ; allow all codecs
[103]
type=friend ; both send and receive calls from this peer
host=dynamic ; this peer will register with us
;username=103
secret=
;canreinvite=no ; don’t send SIP re-invites (ie. terminate rtp stream)
nat=no ; always assume peer is behind a NAT
;context=phones ; send calls to ‘phones’ context
;dtmfmode=rfc2833 ; set dtmf relay mode
allow=all ; allow all codecs
[104]
type=friend ; both send and receive calls from this peer
host=dynamic ; this peer will register with us
;username=104
secret=
;canreinvite=no ; don’t send SIP re-invites (ie. terminate rtp stream)
nat=no ; always assume peer is behind a NAT
;context=phones ; send calls to ‘phones’ context
;dtmfmode=rfc2833 ; set dtmf relay mode
allow=all ; allow all codecs
[/code]
externsion.conf
[code][general]
static=yes ; default values for changes to this file
writeprotect=no ; by the Asterisk CLI
[globals]
; variables go here
[default]
; default context
exten => 999,1,Answer()
exten => 999,2,Playback(vm-nobodyavail)
exten => 999,3,Hangup()
exten => _1XX,1,Dial(SIP/${EXTEN})
; Call POTS numbers through Foo Provider (any number longer than 5 digits starting with 9)
exten => _9XXXX.,1,Dial(SIP/nextiva/${EXTEN:1}@nextiva,60)