login | register
Tue 02 of Dec, 2008 [12:32 UTC]

voip-info.org

Discuss [0] History

Asterisk sip regcontext

Created by: JustRumours,Last modification on Fri 03 of Nov, 2006 [02:59 UTC] by breeves

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 diaplan" 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:
 [sip_autoreg]
 exten => 12345,2,Answer
 exten => 12345,3,Dial(SIP/myuser)
 exten => 12345,4,Hangup

Example 2

sip.conf:
 [general]
 regcontext=sip_autoreg

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

See also



Go back to Asterisk sip channels


Comments