Summary: | ASTERISK-14618: [patch] Dynamic mapping between peer and extensions using regexten | ||
Reporter: | Flavio Eduardo de Andrade Goncalves (flavio) | Labels: | |
Date Opened: | 2009-08-08 08:15:41 | Date Closed: | 2011-06-07 14:00:37 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/NewFeature |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) chan_sip.diff | |
Description: | The parameter regexten is really confuse. It creates an extension with the application Noop in the first priority. While the application of regexten in the high availability is clear with DUNDI, the user still have to map manually the extensions to peers in the dialplan. The objective of this patch is to allow the dynamic mapping between peers and extensions. It creates the application Set(PEERNAME=device) in the first priority instead of Noop, than you might use a construction such as: Suppose the extensions are numbered from 1000-1999. sip.conf regcontext=sip_autoreg [device1] regexten=1000 context=from-internal [device2] regexten=1001 context=from-internal extensions.conf [from-internal] include=sip_autoreg exten=_1XXX,2,Dial(SIP/${PEERNAME}) exten=_1XXX,n,Hangup() Now with the patch the extension 1000 would be created in the sip_autoreg context. exten=1000,1,Set(PEERNAME=device1) exten=1001,1,Set(PEERNAME=device2) The advantage is to avoid creating a line for each extension to map the device name. I tried to avoid the patch as much as possible, reading about regexten, but I haven't found another way to do the automatic mapping. In all cases I had to create all the peer mappings manually. Maybe, there is a better way. | ||
Comments: | By: Leif Madsen (lmadsen) 2009-08-17 13:00:20 Just assigned to Tilghman for review for the idea behind the feature. By: Tilghman Lesher (tilghman) 2009-08-17 14:39:06 This needs further discussion on the asterisk-dev list. I am not partial to changing the functionality of regexten. |