0

I'm able to include a phone inside a database for realtime usage. So, this code (from /etc/asterisk/sip.conf):

[phone]
type=friend
username=phone
secret=12345
host=dynamic
disallow=all
allow=g729
allow=alaw
context=somecontext
nat=no
insecure=port,invite

it is now inside a database (using MySQL).

Now, I want to include a SIP trunk using the register directive, but I don't know how to do that.

How can I include register => <username>:<password>@<provider> inside the database as well?

0

There are no way do it via realtime way you want.

  • You can do via #exec directive to script which return back registration
  • You can do it via usual include and script which put in text file registration one per minute(recommended)
  • You can do it via storring whole file sip.conf in database(realtime static config).

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.