[chan-capi-users] Hints for respond to incoming calls

Armin Schindler armin at melware.de
Mon Apr 6 22:29:04 CEST 2009


On Mon, 6 Apr 2009, Andreas Ruf wrote:
> we have a problem with ISDN-Phones (not cell, not analog) calling into
> our Asterisk/FreePBX-Server.
> In the displays of them the called Number ("Vorwahl+Stammnummer
> +Durchwahl") is shown like "Vorwahl+Stammnummer+Stammnummer+Durchwahl".
...
> As chan_capi gives called number to Asterisk(FreePBX) like "Stammnummer
> +Durchwahl", we have to route incoming calls to a Durchwahl in
> Asterisk(FreePBX) with a setting of "Stammnummer+Durchwahl". So we
> suspect our problem described above is related to the values of
> ConnectedNumber and ConnectedSubaddress not properly set by FreePBX
> (ConnectedSubadress should be only "Durchwahl"?).
> Could this be right?

Yes, your log shows that the connctednumber is set in connectedsubaddress.
This is wrong. I guess the phone just display connectednumber AND 
connectedsubaddress, and that's why you see the doubled number.

> Can anyone please give us a hint where to dig in the relationship of
> asterisk and chan_capi for this to solve?
> Is there, beside the variable CONNECTEDNUMBER, another variable for
> setting ConnectedSubaddress?

chan_capi does not set connectedsubaddress, but the log shows that, see 
below.

> If setting for example the variable CONNECTEDNUMBER (for incoming calls)
> in Asterisk, does chan_capi independently evaluate it or has it to be
> set with the dialstring?

On an incoming call, you can set connectednumber for example when you
have internal call-forward and want to show the caller which number he 
really has reached.

>> From your experience, are these settings appropriate?
> capi.conf:
> [general]
> nationalprefix=0
> internationalprefix=049

this should be just 00

> ;subscriberprefix=+4969
> ;defaultcid=Stammnummer+0
> rxgain=-0.5       ;reinkommende Lautstaerke
> txgain=0.47      ;rausgehende Lautstaerke

why not just 1.0 as with normal ISDN telephony?

> language=de      ;set default language
>
> ; Anlagenanschluss
> ;;;;;;;;;;;;;;;;;
> [isdn_port1]
> isdnmode=did
> incomingmsn=*
> controller=1
> group=1
> faxdetect=off
> accountcode=isdn_port1
> context=isdn_in_port1
> softdtmf=off
> immediate=no
> overlapdial=yes

overlapdial does not exist for chan_capi!

> [Apr  2 18:18:48] VERBOSE[9287] logger.c: CONNECT_RESP ID=002 #0x8382
> LEN=0043
>  Controller/PLCI/NCCI            = 0x101
>  Reject                          = 0x0
>  BProtocol
>   B1protocol                     = 0x1
>   B2protocol                     = 0x1
>   B3protocol                     = 0x0
>   B1configuration                = default
>   B2configuration                = default
>   B3configuration                = default
>  ConnectedNumber                 = default
>  ConnectedSubaddress             = <01 80>1234536
>  LLC                             = default
>  AdditionalInfo                  = default

Okay, this seems to be the cause of your problem.
What we see here is that obviously chan_capi sets
ConnectedSubaddress instead of ConnectedNumber.

But the field GlobalConfiguration before ConnectedNumber is missing.
That's the reason why the value set afterwards is one entry too late.

So my conclusion is that your libcapi20 (which is in charge of using and
showing these values) is buggy!!! It is not acting according to CAPI 2.0 
standard.

Armin



More information about the Chan-capi-users mailing list