What are sip_xmit errors

Please help me out on this. I am using SIP for my internal users and using IAX for my external communication on Asterisk CVS. I tried to use SIP for my external communication as well but i get the following error

WARNING[245775]: chan_sip.c:597 __sip_xmit: sip_xmit of 0x3ddfa3a8
(len 508) to 0.5.0.4 returned -1: Invalid argument

can someone please explain about sip_xmit errors in detail or recommend some reading material. This will surely help.[/quote]

  • Which flavor of Asterisk are you using and which version?

Asterisk package from Ubuntu 5.1.

  • What is your use case and call flow?

It should be noted that the sound card on my Asterisk computer is not running, but I wouldn’t think that the problem.

I took the default configuration and added two SIP devices (x1000 and x1001, details below). I installed an X-lite phone on each of two computers within the same private network as the Asterisk computer (no firewalls or NATS). The network is virtually idle, so there is plenty of bandwidth.

I start Asterisk using “sudo asterisk -cvv”.

I do not receive any warning during start up.

Both X-Lite phones register and it looks great.

Then I begin receiving these messages repeatidly (note that 192.168.0.5 is the IP address of the computer on which x1000 resides):

Mar 1 18:06:17 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument
Mar 1 18:06:18 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument
Mar 1 18:06:19 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument

That error, in turn, causes this error:

Mar 1 18:07:28 NOTICE[28023]: chan_sip.c:8059 sip_poke_noanswer: Peer ‘MattDesktopSoftphone’ is now UNREACHABLE!

At this point, x1000 (MattDesktopSoftphone) can no longer receive calls. When you try to call it, the call fails.

Strangely, x1000 can still place calls to x1001, and they work wonderfully! But when you call x1000 from x1001, the call always fails.

  • What is your configuration?

Post the relevant configuration files:

I can’t seem to find the right button for attaching a file in this forum, so here is the text I added to the two files. If somebody can point me towards the method for attaching files in this forum, it would be greatly appriciated!

To extensions.conf:

; MATT’S CHANGES START HERE!

; **************************************
; Create extension for Matt’s desktop phone.

[internal] ; This is the context we named in sip.conf

exten => 1000,1,dial(SIP/MattDesktopSoftphone,r) ; 1000 is Matt’s desktop softphone. We
; have will ring it forever!

;***************************************

; Create extension for Mike’s desktop phone.

exten => 1001,1,dial(SIP/MikeDesktopSoftphone,r) ; 1001 is Mike’s desktop softphone. We
; have will ring it forever!

To sip.conf:

; DEFINITIONS FOR MATT’S DESKTOP SOFTPHONE

[MattDesktopSoftphone]

username=MattDesktopSoftphone ; This is the username the device should use for authentication.

type=friend ; The friend type allows this device to authenticate both incoming
; and outgoing calls (user would be for incoming, peer for outgoing).

secret=xxxx ; Here is the password used to authenticate this phone to the system.

qualify=2000 ; This tells the system to only connect to the phone if it is within
; 2000 milliseconds.

nat=no ; There is no NAT between this device and the system.

host=dynamic ; The device will register with us.

canreinvite=yes ; This allows Asterisk to leave the media path. If we set it to “no”,
; Asterisk will always be in the media path and will tie up CPU resources.

context=internal ; This is the name that we must reference in extensions.conf to define
; the instructions for this device.

;*****************************************************

; DEFINITIONS FOR MIKE’S DESKTOP SOFTPHONE

[MikeDesktopSoftphone]

username=MikeDesktopSoftphone ; This is the username the device should use for authentication.

type=friend ; The friend type allows this device to authenticate both incoming
; and outgoing calls (user would be for incoming, peer for outgoing).

secret=xxxx ; Here is the password used to authenticate this phone to the system.

qualify=2000 ; This tells the system to only connect to the phone if it is within
; 2000 milliseconds.

nat=no ; There is no NAT between this device and the system.

host=dynamic ; The device will register with us.

canreinvite=yes ; This allows Asterisk to leave the media path. If we set it to “no”,
; Asterisk will always be in the media path and will tie up CPU resources.

context=internal ; This is the name that we must reference in extensions.conf to define
; the instructions for this device.

  • What is your network environment?

Both softphone computers and Asterisk computer are on a private network.

  • What is Asterisk saying when you attempt the use case?

I do not receive any warning during start up.

After a short period of time, I see:

Mar 1 18:06:17 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument
Mar 1 18:06:18 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument
Mar 1 18:06:19 WARNING[27840]: chan_sip.c:612 __sip_xmit: sip_xmit of 0x5e67d8 (len 462) to 192.168.0.5 returned -1: Invalid argument

That error, in turn, causes this error:

Mar 1 18:07:28 NOTICE[28023]: chan_sip.c:8059 sip_poke_noanswer: Peer ‘MattDesktopSoftphone’ is now UNREACHABLE!

Please let me know if you see anything. Thanks!

It turns out the computer on which the offending softphone resides had a software firewall. I opened port 5060 for TCP and ports 8000-8020 for UDP, and it works like a champ!