|Summary:||ASTERISK-02211: [patch] [post-1.0] allow TON, NPI and Presentation to be retrieved in the dialplan|
|Date Opened:||2004-08-11 11:44:55||Date Closed:||2004-10-01 23:19:32|
|Environment:||Attachments:||( 0) 20040811_ton_npi.diff.txt|
|Description:||This patch makes Caller TON, NPI and Presentation as well as Called Party TON and NPI available to the dialplan.|
New variables are CPN_TON, CPN_NPI, CPN_PRES, CLD_TON, CLD_NPI.
****** ADDITIONAL INFORMATION ******
Since I am pretty new to C programming this could probably be done somewhat more clever or better, but I think this is a usefull feature so maybe you could help me out if you think this should be modified in on or the other way.
|Comments:||By: Tilghman Lesher (tilghman) 2004-08-11 17:19:35|
Related to ASTERISK-2087
By: Olle Johansson (oej) 2004-08-12 13:07:16
I'm guessing that it's dangerous to assume in pbx.c that all channels have these variables. SIP doesn't... Guess you have to check if it's a zap channel, but this is speculations. Someone else that knows the inner workings of pbx.c is more qualified to advice you on how to solve this.
By: Tilghman Lesher (tilghman) 2004-08-12 15:44:40
oej: that'd be correct. We should probably emulate some of this functionality anyway for other channel types, such as H323 and IAX2 (i.e. be able to pass PRI info through other channels).
By: Olle Johansson (oej) 2004-08-12 15:55:26
Corydon76: Agree, but it's best if check for the existance of the variable before using it.
By: Tilghman Lesher (tilghman) 2004-08-12 16:14:33
oej: Uh, check for the existence of a variable? These are virtual variables, so they don't really exist anyway. They're simply handles into the channel structure for retrieving data.
I do agree, though, that we shouldn't be referencing private channel structures inside generic routines in pbx.c. We either need to have these variables inside the main channel structure or else there needs to be routines to call inside each channel driver to retrieve various channeltype-specific values.
By: Mark Spencer (markster) 2004-09-11 10:05:46
Already made CALLERPRES available...
By: Mark Spencer (markster) 2004-10-01 23:13:08
Added as CALLING_TON, CALLING_PRES, CALLING_TON, and CALLING_TNS
By: Russell Bryant (russell) 2004-10-01 23:19:32
not included in the 1.0 branch - feature