Hello everyone,

I'm using very simple setup to make and receive external ISDN calls through a
softphone (x-lite version 3.0 - Win32) via an asterisk box.

Hardware setup:

- Dialogic Diva BRI (lspci yields: Network controller: Eicon
Technology Corporation DIVA Server BRI-2M/-2F (rev 01))
- ISDN BRI line

Software setup:

- Redhat 9
- asterisk-1.4.16.2
- chan_capi-1.0.2

Asterisk configuration files are as follows:

/etc/asterisk/capi.conf
    [general]
    nationalprefix=0
    internationalprefix=0030
    rxgain=1.0       ;linear receive gain (1.0 = no change)
    txgain=1.0       ;linear transmit gain (1.0 = no change)
    language=de      ;set default language

    [ISDN1]
    isdnmode=msn     ;'MSN' (point-to-multipoint) or 'DID' (direct inward dial)
    incomingmsn=*    ;allow incoming calls to this list of MSNs/DIDs, * = any
    controller=1     ;capi controller number of this interface/port
    group=1          ;dialout group
    softdtmf=on      ;enable/disable software dtmf detection,
recommended for AVM cards
    relaxdtmf=on     ;in addition to softdtmf, you can use relaxed
dtmf detection
    faxdetect=off    ;enable faxdetection and redirection to EXTEN
'fax' for incoming and/or
    accountcode=     ;PBX accountcode to use in CDRs
    context=capi-in  ;context for incoming calls
    echocancelold=yes;use facility selector 6 instead of correct 8
(necessary for older eicon drivers)
    devices=2        ;number of concurrent calls (b-channels) on this controller

/etc/asterisk/extensions.conf
    [general]
    autofallthrough=yes

    [capi-in]
    ;calls from isdn interface card
    exten => 2104999999,1,Answer()
    exten => 2104999999,n,Dial(SIP/1000)
    exten => 2104999999,n,Hangup()

    [internal]
    ;calls from internal sip phones
    exten => _210XXXXXXX,1,Dial(CAPI/ISDN1/${EXTEN})
    exten => _210XXXXXXX,n,Congestion()
    exten => _210XXXXXXX,n,Hangup()


/etc/asterisk/sip.conf
    [1000]
    type=friend
    context=internal
    host=dynamic

For inbound calls, eveything works smoothly; I can receive calls on the
softphone successfully.

For outbound calls(PSTN), the number is called successfully and the phone rings
on the other end:

    -- Registered SIP '1000' at 192.168.0.6 port 35884 expires 3600
    -- Executing [EMAIL PROTECTED]:1] Dial("SIP/1000-081daa48",
"CAPI/ISDN1/2104988888") in new stack
    -- Called ISDN1/2104988888
    -- CAPI/ISDN1#02/2104988888-0 is proceeding passing it to SIP/1000-081daa48
    -- CAPI/ISDN1#02/2104988888-0 is making progress passing it to
SIP/1000-081daa48
    -- CAPI/ISDN1#02/2104988888-0 is ringing

>From there on:

1. If the other end picks up the phone the conversation is successful and when
the conversation ends, the channel is properly released:

    -- CAPI/ISDN1#02/2104988888-0 answered SIP/1000-081d91b0
  == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 2
  == Spawn extension (internal, 2104988888, 1) exited non-zero on
'SIP/1000-081d91b0'
       > ISDN1#02: CAPI INFO 0x3490: Normal call clearing

2. BUT: If I hangup the softphone before someone answers, I get:

  == ISDN1#02: CAPI Hangingup for PLCI=0x101 in state 5

and the 1st channel is left occupied:

atlas*CLI> capi show channels
CAPI B-channel information:
Line-Name       NTmode state i/o bproto isdnstate   ton  number
----------------------------------------------------------------
ISDN1#02         no    discP  O  trans  *P          0x00 '1000'->'2104988888'
ISDN1#01         no    -----  -  trans              0x00 ''->''

If I call again and hangup before someone answers, the 2nd channel is used and
then left occupied:

atlas*CLI> capi show channels
CAPI B-channel information:
Line-Name       NTmode state i/o bproto isdnstate   ton  number
----------------------------------------------------------------
ISDN1#02         no    discP  O  trans  *P          0x00 '1000'->'2104988888'
ISDN1#01         no    discP  O  trans  *           0x00 '1000'->'2104988888'

>From there on I cannot make any other calls because there are no
available channels:

    -- Executing [EMAIL PROTECTED]:1] Dial("SIP/1000-081d91a0",
"CAPI/ISDN1/2104988888") in new stack
    -- didn't find capi device for interface 'ISDN1'
[Jan 12 16:20:16] WARNING[3359]: app_dial.c:1191 dial_exec_full:
Unable to create channel of type 'CAPI' (cause 44 - Requested channel
not available)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [EMAIL PROTECTED]:2]
Congestion("SIP/1000-081d91a0", "") in new stack
  == Spawn extension (internal, 2104988888, 2) exited non-zero on
'SIP/1000-081d91a0'

So, the question is: Why aren't the channels normaly released???

Thanx in advance,
Antonis

P.S. Sorry for writting so much...

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to