[Home]

Summary:ASTERISK-03418: [patch] implement prefixes for CLID on PRI channels based on type of number
Reporter:Frank Sautter (xylome)Labels:
Date Opened:2005-02-02 11:56:33.000-0600Date Closed:2008-01-15 15:24:20.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pri-ton-npi-prefix-patch.diff
( 1) pri-ton-npi-prefix-patch-v2.diff
Description:in european countries using euroisdn on a E1-PRI you did not get the country country (00) nor area (0) access prefixes to distinguish between local, national and international callerids.
this patch uses the TON/NPI fields to differentiate between those callingplans and modify the callernum accordingly.

****** ADDITIONAL INFORMATION ******

there are new config parameters for pri-channels in zapata.conf which i made compatible with the parameters in chan_capi:
;internationalprefix = 00
;nationalprefix = 0
;localprefix = 0711
;privateprefix = 07115678
;unknownprefix =

defaults are empty so it should not interfere.

i added samples to zapata.conf.sample
Comments:By: Frank Sautter (xylome) 2005-02-02 12:02:23.000-0600

disclaimer is on file

By: Mark Spencer (markster) 2005-02-02 12:17:46.000-0600

This patch increases the size of every zap structure by over 1k byte.  I would recommend either associating these parameters with the PRI structure (just like switchtype, etc) or performing this function in the dialplan using ${CALLINGTON} (you will still need the portion of your patch which actually fills cid->cid_ton).  What are your thoughts?

By: petersv (petersv) 2005-02-02 12:28:16.000-0600

We do the modification of the callerid in the dialplan (we have the same or possibly a similar patch). It works, but it is a bit of a hassle. We do the callerid fixup in a wildcard extension the incoming context and then goto the real extension context.

If the incoming call is sent with overlap digits (perhaps from a pbx connected to asterisk) then this will be problematic. Having the ????prefix= construct would be easier.

The 256 digits maximum length seems a bit excessive.

By: Frank Sautter (xylome) 2005-02-02 14:12:25.000-0600

i haven't thought about size issues... but you both are right, that 1kB increase in size is too much.
i think it would be no problem to reduce the size of the fields to char[10] or even less! but i need more input to determine the size of the fields.
maybe only internationalprefix and nationalprefix are needed, i added the others only to be complete.
peter gave me the hint with ${CALLINGTON} (the patch filling cid->ton is actually from him), but coping with the prefixes in the dialplan is not very subtle in my eyes.
would this be ok for you?

By: Mark Spencer (markster) 2005-02-02 14:22:00.000-0600

If you associate these values with struct zt_pri {} instead of zt_pvt {} then the number could be properly constructed without taking up any additional space in channels. Since these options are only useful on PRI, I would see no reason to place them anywhere else, right?

I would like that it can be done in dialplan logic, but I will admit that it seems that doing it in chan_zap will save a lot of trouble in the dialplan and is generally useful for other people, so I don't object to having the prefix options.  10 characters sounds like plenty, but again, putting it in zt_pri might make more sense.

By: Frank Sautter (xylome) 2005-02-03 11:11:27.000-0600

ok, i made the *prefix fields smaller and moved them to zt_pri{}
i also made the pri resetinterval configurable (default still 3600sec)
an example of the resetinterval is in zapata.conf.sample
also did some source code formatting.

By: Mark Spencer (markster) 2005-02-04 00:11:34.000-0600

Added to CVS with small mods.  Thanks!

By: Russell Bryant (russell) 2005-02-06 22:21:31.000-0600

not in 1.0

By: Digium Subversion (svnbot) 2008-01-15 15:24:20.000-0600

Repository: asterisk
Revision: 4963

U   trunk/channels/chan_zap.c
U   trunk/configs/zapata.conf.sample

------------------------------------------------------------------------
r4963 | markster | 2008-01-15 15:24:19 -0600 (Tue, 15 Jan 2008) | 2 lines

Properly handle PRI TON and allow changing number (bug ASTERISK-3418, with mods)

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

http://svn.digium.com/view/asterisk?view=rev&revision=4963