Brand new to Asterisk, and I’m stuck trying to work through the tutorial from “Asterisk: The Definitive Guide, 5th Edition” Wondering if someone could re-aim my troubleshooting efforts.
Here’s the error I’m getting:
== Setting global variable 'SIPDOMAIN' to '192.168.1.186'
-- Executing [200@sets:1] Answer("PJSIP/0000f30A0A01-00000005", "") in new stack
> 0x7f8d700151d0 -- Strict RTP learning after remote address set to: 192.168.1.140:4016
-- Executing [200@sets:2] Playback("PJSIP/0000f30A0A01-00000005", "hello-world") in new stack
-- <PJSIP/0000f30A0A01-00000005> Playing 'hello-world.slin' (language 'en')
> 0x7f8d700151d0 -- Strict RTP switching to RTP target address 192.168.1.140:4016 as source
-- Executing [200@sets:3] Hangup("PJSIP/0000f30A0A01-00000005", "") in new stack
== Spawn extension (sets, 200, 3) exited non-zero on 'PJSIP/0000f30A0A01-00000005'
== Setting global variable 'SIPDOMAIN' to '192.168.1.186'
-- Executing [101@sets:1] Dial("PJSIP/0000f30A0A01-00000006", "PJSIP/0000f30B0B02") in new stack
[Sep 10 11:28:02] ERROR[27524]: res_pjsip.c:3533 ast_sip_create_dialog_uac: Endpoint '0000f30B0B02': Could not create dialog to invalid URI '0000f30B0B02'. Is endpoint registered and reachable?
[Sep 10 11:28:02] ERROR[27524]: chan_pjsip.c:2509 request: Failed to create outgoing session to endpoint '0000f30B0B02'
[Sep 10 11:28:02] WARNING[27531][C-00000007]: app_dial.c:2578 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'PJSIP/0000f30A0A01-00000006' status is 'CHANUNAVAIL'
localhost*CLI>
I can call extension 200 and I hear the hello world, but if I call another soft phone at extension 101, I get the above error. Initially the book had me set max_contacts to 1 for endpoints 0000f30A0A01 and 0000f30B0B02. I changed those to 2, but that didn’t fix the problem.
Below is most of the config.
extensions.conf:
[general]
[globals]
[sets]
exten => 100,1,Dial(PJSIP/0000f30A0A01)
exten => 101,1,Dial(PJSIP/0000f30B0B02)
exten => 102,1,Dial(PJSIP/SOFTPHONE_A)
exten => 103,1,Dial(PJSIP/SOFTPHONE_B)
exten => 200,1,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
pjsip.conf
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0
[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0
cert_file=/home/asterisk/certs/self-signed.crt
locationpriv_key_file=/home/asterisk/certs/self-signed.key
From the mysql db:
mysql> select id,max_contacts from ps_aors;
+--------------+--------------+
| id | max_contacts |
+--------------+--------------+
| 0000f30A0A01 | 2 |
| 0000f30B0B02 | 2 |
| SOFTPHONE_A | 2 |
| SOFTPHONE_B | 2 |
+--------------+--------------+
4 rows in set (0.00 sec)
mysql> select id,transport,aors,auth,context,disallow,allow from asterisk.ps_endpoints;
+--------------+---------------+--------------+--------------+---------+----------+-------+
| id | transport | aors | auth | context | disallow | allow |
+--------------+---------------+--------------+--------------+---------+----------+-------+
| 0000f30A0A01 | transport-udp | 0000f30A0A01 | 0000f30A0A01 | sets | all | ulaw |
| 0000f30B0B02 | transport-udp | 0000f30B0B02 | 0000f30B0B02 | sets | all | ulaw |
| SOFTPHONE_A | transport-udp | SOFTPHONE_A | SOFTPHONE_A | sets | all | ulaw |
| SOFTPHONE_B | transport-udp | SOFTPHONE_B | SOFTPHONE_B | sets | all | ulaw |
+--------------+---------------+--------------+--------------+---------+----------+-------+
Cheers!
F