Upgrade 3CX to v18 and get it hosted free!

Asterisk sip regcontext

Author image

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: 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

Related Posts:

Get 3CX - Absolutely Free!
Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.