text stringlengths 0 152 |
|---|
[res_pjsip_endpoint_identifier_ip] |
identify=realtime,ps_endpoint_id_ips |
$ sudo -u asterisk vim /etc/asterisk/extconfig.conf |
[settings] ; older mechanism for connecting all other modules to the database |
ps_endpoints => odbc,asterisk |
ps_auths => odbc,asterisk |
ps_aors => odbc,asterisk |
ps_domain_aliases => odbc,asterisk |
ps_endpoint_id_ips => odbc,asterisk |
ps_contacts => odbc,asterisk |
$ sudo -u asterisk vim /etc/asterisk/modules.conf |
[modules] |
autoload=yes |
preload=res_odbc.so |
preload=res_config_odbc.so |
noload=chan_sip.so ; deprecated SIP module from days gone by |
We now have to place one bit of config into the pjsip.conf file, which defines the trans‐ |
port mechanism. |
$ sudo -u asterisk vim /etc/asterisk/pjsip.conf |
[transport-udp] |
type=transport |
protocol=udp |
bind=0.0.0.0 |
Finally, let’s log into the database, and define some sample configurations for PJSIP: |
$ mysql -D asterisk -u asterisk -p |
mysql> |
insert into asterisk.ps_aors (id, max_contacts) values ('0000f30A0A01', 1); |
insert into asterisk.ps_aors (id, max_contacts) values ('0000f30B0B02', 1); |
insert |
into asterisk.ps_auths |
(id, auth_type, password, username) |
values |
('0000f30A0A01', 'userpass', 'not very secure', '0000f30A0A01'); |
insert |
Asterisk Installation |
| |
43 |
into asterisk.ps_auths |
(id, auth_type, password, username) |
values |
('0000f30B0B02', 'userpass', 'hardly to be trusted', '0000f30B0B02'); |
insert |
into asterisk.ps_endpoints |
(id, transport, aors, auth, context, disallow, allow, direct_media) |
values |
('0000f30A0A01', 'transport-udp', '0000f30A0A01', '0000f30A0A01', |
'sets', 'all', 'ulaw', 'no'); |
insert |
into asterisk.ps_endpoints |
(id, transport, aors, auth, context, disallow, allow, direct_media) |
values |
('0000f30B0B02', 'transport-udp', '0000f30B0B02', '0000f30B0B02', |
'sets', 'all', 'ulaw', 'no'); |
exit |
Let’s reboot, and then we’ll log into our new Asterisk system and have a look at what |
we’ve created. |
Validating Your New Asterisk System |
We don’t need to dive too deeply into the system at this point, since all the chapters |
that follow will be doing exactly that. |
So all we need to do is verify that we can log into the system and that the PJSIP end‐ |
points we’ve created are there. |
$ sudo asterisk -rvvvv |
*CLI> pjsip show endpoints |
You should see the two endpoints we created listed as follows: |
Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.> |
I/OAuth: <AuthId/UserName...........................................................> |
Aor: <Aor............................................> <MaxContact> |
Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..> |
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................> |
Identify: <Identify/Endpoint.........................................................> |
Match: <criteria.........................> |
Channel: <ChannelId......................................> <State.....> <Time.....> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.