[Asterisk-Users] chan_capi-cm and type of number problem (ToN)

Klaus Darilion klaus.mailinglists at pernau.at
Wed May 17 00:31:37 MST 2006


Armin Schindler wrote:
> On Tue, 16 May 2006, Klaus Darilion wrote:
>> Hi!
>>
>> I have problems with the ToN configurations in chan_capi-cm. I understand how
>> incoming calls are rewritten using national and international prefix. But for
>> outgoing calls - what is the ToN?
> 
> I never really needed ton in TE mode, but when your card is in NT mode, 
> setting the ton may be important.
>  
>> Further, is there any debug info of the Ton? "capi debug" and the divactrl
>> dchannel both show the CLI and CDLI, but do not show the ToN.
> 
> The ton is a byte prepended to the callerid and can be seen when looking at 
> the capi messages. On outgoing call when 'capi debug' is set, the
> presentation and ton value is shown as well.

Hi Armin!

I think the capi debug is too verbose. When I debug, I'm mostly 
interested in D-channel info, not B-channel. What do you think about 
splitting this into
"capi debug dchannel" and
"capi debug"

>> How can I set the ToN? I suspect chan_capi to use the received ToN also for
>> outgoing calls when bridging calls. How can I verify this?
> 
> When using a newer Asterisk with cid_ton (I think 1.2.x has them), then 
> chan-capi will set ton on incoming call and on outgoing call, this value is 
> used as well. So it is bridged.

This is IMO a strange thing, combined with the default behavior of 
national and internationalprefix.

e.g. a call is received with CLI=4912345 TON=international
default internationalprefix=00

Thus, chan_capi rewrites the number to 004912345, cid_ton is still 
international.

When this call is bridged to the PBX, it sends CLI=004912345 
TON=international

Thus, if the number is rewritten, IMO also the context should be 
rewritten to UNKNOWN.

> Since Asterisk does not provide (as far as I know) a possibility to change 
> that cid_ton value, chan-capi will overwrite that value with the value in
> variable ${CALLERTON}, if set.

As I see this must be a number. Using strings (INTERNATIONAL, LOCAL, 
NATIONAL) would be nice too.

Not sure if I understand the source code right: CALLERTON will be read 
to set callers TON on outgoing calls, whereas CALLEDTON will be set on 
incoming called TON? Why not set both variables in incoming calls and 
read both variables on outgoing calls?

regards
Klaus

> When you use the latest chan-capi from trunk (HEAD version), you can use
> 'capi show channels' to see the ton as well.
> 
> Armin
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list