[asterisk-users] asterisk realtime and creating "new" contexts
Saul Bejarano
saul at procomm100.com
Thu Aug 14 21:55:10 CDT 2008
By using the standard FreePBX you have all the work done, from that
point you just have to enter the information on Mysql:
mysql> use asterisk;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+---------------------+
| Tables_in_asterisk |
+---------------------+
| Backup |
| admin |
| ampusers |
| announcement |
| callback |
| cidlookup |
| cidlookup_incoming |
| cronmanager |
| custom_destinations |
| custom_extensions |
| customerdb |
| daynight |
| devices |
| disa |
| extensions |
| featurecodes |
| findmefollow |
| freepbx_log |
| gabcast |
| globals |
| iax |
| incoming |
| inventorydb |
| ivr |
| ivr_dests |
| languages |
| manager |
| meetme |
| miscapps |
| miscdests |
| module_xml |
| modules |
| notifications |
| paging_autoanswer |
| paging_config |
| paging_groups |
| parkinglot |
| phpagiconf |
| pinsets |
| queues_config |
| queues_details |
| recordings |
| ringgroups |
| sip |
| timeconditions |
| users |
| vmblast |
| vmblast_groups |
| zap |
| zapchandids |
+---------------------+
50 rows in set (0.00 sec)
The table that will handle your extensions will be SIP not extensions,
Extensions will handle the dial plan for outbound dialing:
mysql> select * from sip where id=1418
-> ;
+------+-------------+---------------+-------+
| id | keyword | data | flags |
+------+-------------+---------------+-------+
| 1418 | account | 1418 | 0 |
| 1418 | accountcode | | 0 |
| 1418 | allow | | 0 |
| 1418 | callerid | device <1418> | 0 |
| 1418 | callgroup | | 0 |
| 1418 | canreinvite | no | 0 |
| 1418 | context | from-internal | 0 |
| 1418 | dial | SIP/1418 | 0 |
| 1418 | disallow | | 0 |
| 1418 | dtmfmode | rfc2833 | 0 |
| 1418 | host | dynamic | 0 |
| 1418 | mailbox | 1418 at device | 0 |
| 1418 | nat | yes | 0 |
| 1418 | pickupgroup | | 0 |
| 1418 | port | 5060 | 0 |
| 1418 | qualify | yes | 0 |
| 1418 | record_in | Adhoc | 0 |
| 1418 | record_out | Adhoc | 0 |
| 1418 | secret | 12524674 | 0 |
| 1418 | type | friend | 0 |
+------+-------------+---------------+-------+
20 rows in set (0.00 sec)
This method is great because you can customize not only the information
that you are writing to create the extensions but the information that
you allow your customer to modify to manage features like follow me,
forwarding, etc.
Saul Bejarano
Todd Fulton wrote:
> Hi,
>
> I'm trying to create a multi-tennant asterisk installation .... where
> each of my customers has its own context. Well, I've got asterisk
> realtime working, and I can add/update extensions to existing contexts
> in extensions.conf without a problem. However, when I attempt to create
> database entries with a context that is NOT in extensions.conf, I get an
> error "invalid extension".
>
> I've found several posts around the net asking this question, but no
> answers. Has anyone out there dealt with this problem?
>
> Any help would be great!
>
>
> Todd
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2008 - September 22 - 25 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
More information about the asterisk-users
mailing list