Asterisk sip regcontext

regcontext


regcontext=<context>

If regcontext is specified, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given peer who registers or unregisters with us. The actual extension is the 'regexten' parameter of the registering peer or its name if 'regexten' is not provided. More than one regexten may be supplied if they are separated by '&'. Patterns may be used in regexten.

ATTENTION: Make sure you take a look at bug report 7144! It appears that the regcontext may _not_ be defined in extensions.conf as inidcated in the examples below. In fact I wasn't able to get regcontext to work at all with Asterisk 1.2.10 and 1.2.12.1, "show dialplan" would not display the 1,NoOp priority for the registered peer...

Example use

We include a priority 2 in our dialplan for the extension in question. Asterisk will not be able to dial it unless the NoOp priority 1 is added based upon the regcontext setting.

Example 1

sip.conf:

[general]
regcontext=sip_autoreg

[myuser]
regexten=12345

extensions.conf:
[some_other_context]
exten => 12345,2,Answer()
exten => 12345,3,Dial(SIP/myuser)
exten => 12345,4,Hangup()


include=>sip_autoreg

Example 2

sip.conf:
[general]
regcontext=sip_autoreg

extensions.conf:
[some_other_context]
include=>sip_autoreg


See also



Go back to Asterisk sip channels

regcontext


regcontext=<context>

If regcontext is specified, Asterisk will dynamically create and destroy a NoOp priority 1 extension for a given peer who registers or unregisters with us. The actual extension is the 'regexten' parameter of the registering peer or its name if 'regexten' is not provided. More than one regexten may be supplied if they are separated by '&'. Patterns may be used in regexten.

ATTENTION: Make sure you take a look at bug report 7144! It appears that the regcontext may _not_ be defined in extensions.conf as inidcated in the examples below. In fact I wasn't able to get regcontext to work at all with Asterisk 1.2.10 and 1.2.12.1, "show dialplan" would not display the 1,NoOp priority for the registered peer...

Example use

We include a priority 2 in our dialplan for the extension in question. Asterisk will not be able to dial it unless the NoOp priority 1 is added based upon the regcontext setting.

Example 1

sip.conf:

[general]
regcontext=sip_autoreg

[myuser]
regexten=12345

extensions.conf:
[some_other_context]
exten => 12345,2,Answer()
exten => 12345,3,Dial(SIP/myuser)
exten => 12345,4,Hangup()


include=>sip_autoreg

Example 2

sip.conf:
[general]
regcontext=sip_autoreg

extensions.conf:
[some_other_context]
include=>sip_autoreg


See also



Go back to Asterisk sip channels

Created by: JustRumours, Last modification: Sat 12 of Dec, 2009 (01:39 UTC) by amazinzay
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+