Adrian Carter
2005-Dec-11 19:20 UTC
[Asterisk-Users] Cleaning up CLID on incoming PRI lines
Hey guys, Does anyone know of a nice way to clean up CLID on all calls coming in a certain trunk? One of our PRI providers drops off the 0, which means that matching and 'one-click-call-return' are broken because it appends 'half' the Area Code to the CLID (In Australia, area codes are prefaced 0NXXXXXXXX). At the moment, I have a nasty patch to AMP's 'user-callerid' macro that re-writes teh CLIDNum variable to have the correct 12 digits with the 0. But because this happens after the initial call pickup, the ringing call itself reports the 'bad' CLID. Is there a patch or hook I could add to zapata.conf or some way to get asterisk to say "Add 0 to the front of all CLID on this ZAP channel" ? Thanks all! Adrian -- Adrian Carter Technical Manager Leading Edge Internet Web http://www.lei.net.au http://support.lei.net.au Direct +61 2 6163 6162 Support 1 300 662 415 E-mail cartera@lei.net.au
Kristian Kielhofner
2005-Dec-11 20:48 UTC
[Asterisk-Users] Cleaning up CLID on incoming PRI lines
Adrian Carter wrote:> Hey guys, > Does anyone know of a nice way to clean up CLID on all calls coming > in a certain trunk? One of our PRI providers drops off the 0, which > means that matching and 'one-click-call-return' are broken because it > appends 'half' the Area Code to the CLID (In Australia, area codes are > prefaced 0NXXXXXXXX). > > At the moment, I have a nasty patch to AMP's 'user-callerid' macro > that re-writes teh CLIDNum variable to have the correct 12 digits with > the 0. But because this happens after the initial call pickup, the > ringing call itself reports the 'bad' CLID. > > Is there a patch or hook I could add to zapata.conf or some way to > get asterisk to say "Add 0 to the front of all CLID on this ZAP channel" ? > > Thanks all! > > Adrian >Adrian, I don't know how this will play with AMP, but here is goes: in zapata.conf, create a new context for calls coming in the PRI in question, let's call it "pri-cidfix" extensions.conf: [pri-cidfix] exten => _X.,1,SetCIDNUM(0${CALLERIDNUM}) exten => _X.,2,Dowhatever or in 1.2: [pri-cidfix] exten => _X.,1,Set(CALLERID(number)=0${CALLERIDNUM}) exten => _X.,2,Dowhatever I'm being lazy with the extensions and the second priority, but hopefully you get the idea. -- Kristian Kielhofner