[Asterisk-Users] Some SIP Setup problems

info-lists at robertc.de info-lists at robertc.de
Sun Jan 25 01:27:25 MST 2004


Mike Nash said:
> Hi
>
> I'm trying to configure my Asterisk box to provide a simple sample
> configuration.  It's a mandrake 9.1 box, no cards except a sound card.
> The
> config I am trying to achieve is simply one server, with two SIP clients.
>
> Two issues are cropping up - the first, when I start Asterisk, the sound
> goes
> nuts and I get an error (below)
>
> Jan 25 18:16:44 WARNING[163851]: chan_oss.c:268 sound_thread: Read error
> on
> sound device: Resource temporarily unavailable
>
> When Asterisk starts, I get the error (below):
>
> Jan 25 18:06:33 WARNING[81926]: chan_sip.c:446 __sip_xmit: sip_xmit of
> 0x80db77c (len 459) to 0.0.0.0 returned -1: Invalid argument
>
> I'm pretty confident this second error is because I have misconfigured
> extensions.conf and sip.conf, but I can't see why.   When I try to connect
> to
> the server with an XTEN client, I get this error:
>
> Jan 25 18:15:38 NOTICE[81926]: chan_sip.c:5548 handle_request:
> Registration
> from 'Mike <sip:mike at 203.109.242.119>' failed for '203.118.186.16'
>
> I've tried looking at the www.automated.it setup information, along with
> the
> information on fnords.org - this has gotten me this far, but I can't see
> for
> the life of me what I have done wrong.
>
> If anyone could provide me some pointers, it would be much appreciated.
>
> Regards
>
>
> Mike
>
> My SIP conf looks like this:
>
> ;
> ; SIP Configuration for Asterisk
> ;
> [general]
> port = 5060			; Port to bind to
> bindaddr = 0.0.0.0		; Address to bind to
> context = sip	; Default for incoming calls
>
> [Phone1]
> type=friend
> secret=yap
> auth=md5
> nat=yes
> host=dynamic
> dtfmmode=inband
> mailbox=1000
> username=mike
> context=sip
> disallow=all
> allow=gsm
> callerid="Mike Nash" <6969>
>
> [Phone2]
> type=friend
> secret=yap
> auth=md5
> nat=yes
> host=dynamic
> dtfmmode=inband
> mailbox=1000
> username=darryl
> context=sip
> disallow=all
> allow=gsm
> callerid="Darryl West" <6970>
>
>
>
> My extensions.conf looks like this:
>
> [general]
> ;
> ; If static is set to no, or omitted, then the pbx_config will rewrite
> ; this file when extensions are modified.  Remember that all comments
> ; made in the file will be lost when that happens.
> ;
> ; XXX Not yet implemented XXX
> ;
> static=yes
> ;
> ; if static=yes and writeprotect=no, you can save dialplan by
> ; CLI command 'save dialplan' too
> ;
> writeprotect=no
> ; For more information on applications, just type "show applications" at
> your
> ; friendly Asterisk CLI prompt.
> ;
> [sip]
> exten => 1,1,Dial(SIP/Phone1,20,tr)
> exten => 2,1,Dial(SIP/Phone2,20,tr)
> exten => 1000,1,Dial(SIP/Phone1&SIP/Phone2,20,tr)
>

Mike,
Are you using the 0.7.1 tar distribution or CVS?  I was able to compile
the 0.7.1 Asterisk program/sample config's to get a working system on a PC
with no sound device and no phone interfaces.  This system is about as
simple as it can get (except for the 3 fixed disks in it)  and is even a
low end Pentium I (100 Mhz, 32MB RAM).

My suggestions are:

- delete the source directory (including /etc/asterisk) and rebuild
Asterisk (make install) and the sample config.  (instructions on screen
after the Asterisk build).

- try to start Asterisk with NO changes to the config files.  If it
doesn't start then the problem is probably with your system hardware.

- copy one of the device configs in sip.conf and change for one of your
phones.  You should only have to change the device id. Don't get fancy
with authentication or NAT. (assuming that Asterisk and your first phone
are not on OPPOSITE sides of a NAT Router)

- either issue the RELOAD command at the command line interface or
completly shutdown and restart Asterisk.  (RELOAD should be sufficient but
one of the 2 is required)

- test that phone by calling extension 1000 (assuming you have the 0.7.1
extensions.conf).  You should get the demo greeting and be able to do such
things as ECHO test, leave voicemail for a sample mailbox.  Instructions
are in the  demo greeting you will hear.

- If all of the above works then add your 2nd phone into sip.conf and add
a dialplan for those 2 devices to extensions.conf so that they can call
each other.  (don't forget to RELOAD or restart)

- IF all of that works then start making fancy config files and using
additional features.

Robert




More information about the asterisk-users mailing list