Asterisk with ISDN4BSD

Oliver von Bueren ovb at ovb.ch
Mon Sep 3 14:18:55 PDT 2007


Hi M8s

I've a strange problem which I just started to notice. I've connected my 
asterisk box to a P2P ISDN line (telco provider) with a FritzCard. 
Running the i4b by hps on a FreeBSD 6.2-p7

It seems that on every second INCOMING call, the audio signal is not 
routed from the ISDN to the SIP phone. Outgoing is ok.

In this example, it worked, calling from an external number to DDI 41

    -- 
capi_handle_connect_indication:6049:ENTRY=:PLCI=0x0300:PBX_CHAN=**Unknown**:
    --   Incoming call from '079xxxxxxxx' to '41', CIP=0x0010, 
sending_complete=yes
  == search_cep:5818:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=**Unknown**:
  ==   Incoming call '079xxxxxxxx' -> '41'
  == cd_start_pbx:5939:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
  ==   Started PBX
    -- Executing [41 at from_isdn:1] Set("CAPI/ISDN1/41-2", 
"CALLERID(num)=0079xxxxxxx") in new stack
    -- Executing [41 at from_isdn:2] Goto("CAPI/ISDN1/41-2", 
"to_sip|705|1") in new stack
    -- Goto (to_sip,705,1)
    -- Executing [705 at to_sip:1] Ringing("CAPI/ISDN1/41-2", "") in new stack
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
    -- Executing [705 at to_sip:2] Dial("CAPI/ISDN1/41-2", "SIP/705|30") in 
new stack
    -- Called 705
       > Out of order update usecount!
    -- SIP/705-087a8000 is ringing
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
    -- SIP/705-087a8000 is ringing
    -- SIP/705-087a8000 answered CAPI/ISDN1/41-2
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
  == chan_capi_answer:4702:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
  == 
capi_send_connect_resp:3128:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
  ==   Connected to 41
  == 
capi_send_detect_dtmf_req:3449:ENTRY=ISDN1:PLCI=0x0300:PBX_CHAN=CAPI/ISDN1/41-2:
  ==   Setting up DTMF detector, flag=1
[...] => call takes place [...]
  == Spawn extension (to_sip, 705, 2) exited non-zero on 'CAPI/ISDN1/41-2'
       > Out of order update usecount!
------------------------------------------------------------------------------------------
Right after the call above, I did the next one, which does not work:
------------------------------------------------------------------------------------------
    -- 
capi_handle_connect_indication:6049:ENTRY=:PLCI=0x0400:PBX_CHAN=**Unknown**:
    --   Incoming call from '079xxxxxxx' to '41', CIP=0x0010, 
sending_complete=yes
  == search_cep:5818:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=**Unknown**:
  ==   Incoming call '079xxxxxxx' -> '41'
  == cd_start_pbx:5939:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
  ==   Started PBX
    -- Executing [41 at from_isdn:1] Set("CAPI/ISDN1/41-3", 
"CALLERID(num)=0079xxxxxxx") in new stack
    -- Executing [41 at from_isdn:2] Goto("CAPI/ISDN1/41-3", 
"to_sip|705|1") in new stack
    -- Goto (to_sip,705,1)
    -- Executing [705 at to_sip:1] Ringing("CAPI/ISDN1/41-3", "") in new stack
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
    -- Executing [705 at to_sip:2] Dial("CAPI/ISDN1/41-3", "SIP/705|30") in 
new stack
    -- Called 705
       > Out of order update usecount!
    -- SIP/705-087af000 is ringing
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
    -- SIP/705-087af000 is ringing
    -- SIP/705-087af000 answered CAPI/ISDN1/41-3
  == 
chan_capi_indicate:4643:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
  == chan_capi_answer:4702:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
  == 
capi_send_connect_resp:3128:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
  ==   Connected to 41
  == 
capi_send_detect_dtmf_req:3449:ENTRY=ISDN1:PLCI=0x0400:PBX_CHAN=CAPI/ISDN1/41-3:
  ==   Setting up DTMF detector, flag=1
[... call - hangup ...]
  == Spawn extension (to_sip, 705, 2) exited non-zero on 'CAPI/ISDN1/41-3'
       > Out of order update usecount!
------------------------------------------------------------------------------------------

I can repeat that multiple times, every second inbound call has no 
audio. What is interesting is, that the calls with an odd PLCI number 
(PLCI=0x0300 in the first log part) do work, the ones with an even 
number like PLCI=0x0400 do not.

The Dialplan part for this call:
[from_isdn]
exten => 41,1,Set(CALLERID(num)=0${CALLERID(num)})
exten => 41,n,Goto(to_sip,705,1)
[to_sip]
exten => _70[1-3],1,Ringing
exten => _70[1-3],n,Dial(SIP/${EXTEN},120)
exten => _70[1-3],n,Hangup

--------
capi.conf
[general]
nationalprefix=0
internationalprefix=00
rxgain=1.0
txgain=1.0
[ISDN1]
isdnmode=msn
incomingmsn=*
controller=0
group=1
softdtmf=off
relaxdtmf=off
accountcode=
context=from_isdn
holdtype=local
echocancel=no
echosquelch=yes
devices=2
wait_silence_samples=1000
---------------
# isdnconfig
controller 0 = {
  Layer 1:
    description : AVM Fritz!Card PCI
    type        : passive ISDN (Basic Rate, 2xB)
    channels    : 0x3
    serial      : 0xabcd
    power_save  : on
    dialtone    : enabled
    attached    : yes
    PH-state    : Activate indication (priority=8/9)
  Layer 2:
    driver_type : DRVR_DSS1_P2P_TE
}
------
Any ideas what that could be?

-- 

       Oliver




More information about the freebsd-isdn mailing list