[Asterisk-Dev] chan_phone.so on FreeBSD 4.11-RELEASE

msg michael.grigoni at cybertheque.org
Tue Mar 8 07:23:18 MST 2005


Greetings:

The following has been posted to [Asterisk-BSD]; I'm posting here
to expand the audience in the quest for assistance.

Platform: Intel PIII/450, 128MB, Intel MB, diskless, bootp/pxe,
Quicknet phonejack lite (ISA), FreeBSD 4.11-RELEASE
	-- kernel modules 'ixj', 'zaptel', and 'ztdummy' loaded

The intent is to build a very-small footprint box, bootp/tftp booted
to server as a SIP-ATA with two fxs ports for analog phones and one
fxo port to the PSTN (to provide POTS service, not 'fall-back'). No
PSTN gateway function is needed.

Asterisk built from fbsd ports (1.0.2):
     PROC=i686
     OPTIMIZE+=-O6
     DEBUG=-g
     OPTIONS+=-DLOW_MEMORY
     DEBUG_THREADS=-DDEBUG_THREADS -DDO_CRASH
     (MALLOC_DEBUG is broken, not used)

and '-pthreads' is used (no _r libs).

(If asterisk is built without debug and opt defines, chan_phone.so
  dies on _init() with SIGBUS)

The program must be run without 'mpg123' or the sound is too choppy
to understand speech (can't 'noload=res_musiconhold.so -- used by other
modules)

When the program compiled with debugging is run the important behavior
is as follows (phone.conf is configured for dialtone mode, slinear or
g723.1):
-------------------------------------------------------------------------------
booting:

chan_oss.c:239 sound_thread: Read error on sound device: Resource 
temporarily unavailable
   -- console sound does work, but messages reoccur sporadically

WARNING[135290880]: chan_zap.c:9590 setup_zap: Ignoring switchtype

-------------------------------------------------------------------------------
Lifting the handset:
(no dialtone is heard)

Mar  7 14:16:49 WARNING[157144064]: chan_phone.c:874 do_monitor: Dial 
tone write error
         --- repeats until on hook or number dialed from keypad

-------------------------------------------------------------------------------
Dialing the phone from the console:

     -- phone rings
     -- lift handset, hear silence
     -- ringback continues on console
     -- after four rings on console, busy signal heard in phone
     -- console hangs up:
*CLI> dial 1265
*CLI>  << Console call has been answered >>
  << Hangup on console >>
-------------------------------------------------------------------------------

Dialing '#' on the phone, (slinear):

Mar  7 14:53:08 WARNING[155009024]: chan_phone.c:298 phone_setup: Failed 
to set codec to signed linear 16
Mar  7 14:53:09 WARNING[155009024]: chan_phone.c:566 phone_write: Unable 
to set 16-bit linear mode
Mar  7 14:53:09 WARNING[155009024]: file.c:550 ast_readaudio_callback: 
Failed to write frame

-------------------------------------------------------------------------------
Calling from the phone to the console (1234) -- g723.1

     -- lift handset, silence is heard
     -- "Dial tone write error" messages scroll on console
     -- dial '1234', busy signal is heard in phone
     -- console messages:
<< Call placed to 'dsp' on console >>
  << Auto-answered >>
Mar  7 14:42:16 WARNING[157132800]: chan_phone.c:289 phone_setup: Failed 
to set codec to g723.1
Mar  7 14:42:16 WARNING[157132800]: chan_phone.c:543 phone_write: Unable 
to set G723.1 mode
  << Hangup on console >>

-------------------------------------------------------------------------------
Calling from the phone to the console (1234) -- slinear
     -- same phone behavior as previous
<< Call placed to 'dsp' on console >>
  << Auto-answered >>
Mar  7 14:46:53 WARNING[157132800]: chan_phone.c:298 phone_setup: Failed 
to set codec to signed linear 16
Mar  7 14:46:53 WARNING[157132800]: chan_phone.c:566 phone_write: Unable 
to set 16-bit linear mode
  << Hangup on console >>

-------------------------------------------------------------------------------
Configured SIP: added an extension aliased to 10 at nat1.cybertheque.net 
called '1235';

  when called from the console, works ok
  when called from attached phone (1265):

Mar  7 16:17:33 NOTICE[135398400]: channel.c:1691 ast_set_write_format: 
Unable to find a path from UNKN to SLINR
Mar  7 16:17:33 WARNING[135398400]: chan_phone.c:298 phone_setup: Failed 
to set codec to signed linear 16
Mar  7 16:17:33 WARNING[135398400]: chan_phone.c:566 phone_write: Unable 
to set 16-bit linear mode

-------------------------------------------------------------------------------
whenever chan_phone.so loaded:

         -- digits dialed from the console during a connection (IAX, SIP)
            fail to arrive at destination or arrive after long delay.
         -- without chan_phone.so loaded; with ixj.ko,
            zaptel.ko,ztdummy.ko loaded: digits dialed work ok.

-------------------------------------------------------------------------------
when booting, I got this error perhaps twice out of several dozen boots:

loader.c line 102 (fini_modlock): Error: attempt to destroy locked mutex 
'&modlock'.
loader.c line 223 (ast_load_resource): Error: '&modlock' was locked here.
loader.c line 102 (fini_modlock): Error destroying mutex: Device busy

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

I built (with many tweaks) the CVS version on this platform but it has
too many problems to even begin a discussion at this point.

Before peppering the 1.0.2 code with printfs, I would appreciate some
insights.

Regards,

Michael Grigoni
Cybertheque Museum




More information about the asterisk-dev mailing list