Author Topic: Asterisk no in/outbound route in 1004 with SPA3102  (Read 4270 times)

PSM

  • Newbie
  • *
  • Posts: 13
    • View Profile
Asterisk no in/outbound route in 1004 with SPA3102
« on: March 24, 2013, 04:51:20 pm »
install 1004, connect some supported phones and wait for the phones to be recognized and get an extension assigned.
Calling from phone to phone will work then. Now add a phone line with the wizard, and  fille in the blanks. Protocol SPA. username and phonenumber the same.
click  'Save'. Nothing seems to happen, this is becuase the apache session is killed. restarting apache brings you back and the phone line is created.
Try making incoming call. Call reaches the core, and 'The number you have dialled is not in service' is played.
Made ring all phones setting for all states of the house: still the same.
Checked on outgoing calls. No luck, error 503. Asterisk cannot find an outbound route.
checked the mysql db:
Code: [Select]
mysql> select * from extensions where context like 'outbound-allroutes';
+-------+--------------------+-------+----------+-------+----------------------------+
| id    | context            | exten | priority | app   | appdata                    |
+-------+--------------------+-------+----------+-------+----------------------------+
| 12240 | outbound-allroutes | 112   |        1 | Macro | dialout-trunk,/,${EXTEN},, |
| 12241 | outbound-allroutes | 112   |        2 | Macro | outisbusy,                 |
| 12242 | outbound-allroutes | 911   |        1 | Macro | dialout-trunk,/,${EXTEN},, |
| 12243 | outbound-allroutes | 911   |        2 | Macro | outisbusy,                 |
+-------+--------------------+-------+----------+-------+----------------------------+

No outbound routes for anything else than 911 and 112. ( and even those don't work)
So would the trunk and SPA3102 then be known at all to Asterisk? Check the db:

Code: [Select]
mysql> select * from phonelines
    -> ;
+----+---------+-------+--------+----------+------+---------+------+-------------+------------+----------+---------+----------+--------------+
| id | enabled | isfax | prefix | protocol | name | host    | port | phonenumber | username   | password | faxmail | channels | faxheader    |
+----+---------+-------+--------+----------+------+---------+------+-------------+------------+----------+---------+----------+--------------+
|  1 | yes     | no    | 0      | SPA      |      | dynamic | 5060 | 030879XXXX  | 030879XXXX| linuxmce | 2       |        5 | LinuxMCE fax |
+----+---------+-------+--------+----------+------+---------+------+-------------+------------+----------+---------+----------+--------------+
1 row in set (0.00 sec)

So the line is there... Had already changed the port in the SPA to 5060 to match LMCE.
The SPA tries to register with the core, but is rejected becuase the user is not known. May be the SPA should not at all register with the Core when used as a FXO ( phone line ) device?

Then on inbound calls, Asterisk really tries to deliver the call, but to no avail:
Code: [Select]
<------------>
    -- Executing [0308793512@from-sip-external:1] NoOp("SIP/10.1.100.1-00000009", "Received incoming SIP connection from unknown peer to 0308793512") in new stack
    -- Executing [0308793512@from-sip-external:2] Set("SIP/10.1.100.1-00000009", "DID=0308793512") in new stack
    -- Executing [0308793512@from-sip-external:3] Goto("SIP/10.1.100.1-00000009", "s,1") in new stack
    -- Goto (from-sip-external,s,1)
    -- Executing [s@from-sip-external:1] GotoIf("SIP/10.1.100.1-00000009", "0?from-trunk,0308793512,1") in new stack
    -- Executing [s@from-sip-external:2] Set("SIP/10.1.100.1-00000009", "TIMEOUT(absolute)=15") in new stack
Channel will hangup at 2013-03-24 15:25:01.809 CET.
    -- Executing [s@from-sip-external:3] Answer("SIP/10.1.100.1-00000009", "") in new stack
Audio is at 14602
Adding codec 0x8 (alaw) to SDP
Adding codec 0x4 (ulaw) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
 -- Executing [s@from-sip-external:4] Wait("SIP/10.1.100.1-00000009", "2") in new stack
    -- Executing [s@from-sip-external:5] Playback("SIP/10.1.100.1-00000009", "ss-noservice") in new stack
    -- <SIP/10.1.100.1-00000009> Playing 'ss-noservice.gsm' (language 'en')
    -- Executing [s@from-sip-external:6] PlayTones("SIP/10.1.100.1-00000009", "congestion") in new stack
    -- Executing [s@from-sip-external:7] Congestion("SIP/10.1.100.1-00000009", "5") in new stack
  == Spawn extension (from-sip-external, s, 7) exited non-zero on 'SIP/10.1.100.1-00000009'
    -- Executing [h@from-sip-external:1] NoOp("SIP/10.1.100.1-00000009", "Hangup") in new stack
Scheduling destruction of SIP dialog '837f2e5f-800dbcd5@10.1.100.6' in 32000 ms (Method: ACK)

Has anybody got this working? And if so how?


Jetway JNC62K
AMD Athlon X2 4850
1GB Ram
4x 1TB SATA
1x 250 GB IDE
1x DVD R/W IDE
WMCE UIRT
Kubuntu 8.10 i386

PSM

  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Asterisk no in/outbound route in 1004 with SPA3102
« Reply #1 on: March 25, 2013, 10:12:58 pm »
Better reply to my own question. It appears that everything actually works as described in a couple of posts in the forum.
The main misunderstanding was on my side:

IT MAY TAKE UP TO HALF A DAY BEFORE A CHANGE IN THE WEBADMIN HAS TRICKLED THROUGH TO THE ASTERISK CONFIGURATION !!

I discovered, after having left the whole thing overnight, that the little 'line light' on my SPA3102 was on, while it previously was off. That light means to say that the PSTN line of the SPA3102 is registered. I checked this in the SPA webconfiguration, and there the PSTN line was indeed 'registered'.

To wrap up, you HAVE to fill up the fields in the WEBADMIN for the phone line, all of them, as follows:
1 Name: give it any name you like, but do not leave the field blank
2 Enabled: check this box
3 prefix: choose a numeric prefix, 0 or 9 or whatever you like. Don't leave it blank.
4 User Name: put in the full phone number of your line, for instance 0301234567
5 Password: the password you have entered in the SPA3102 for the PSTN line
6 Phone Number: the same as under 4, so the full phone number
7 Host: the (fixed!) IP address of your SPA3102
8 Protocol: set it to SPA.

Then go do something else for the rest of the day. Once you think everything should have settled, check the mysql tables ( note that I have another outbound route with prefix 9 as well...):

Code: [Select]
# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 10294
Server version: 5.1.67-0ubuntu0.10.04.1 (Ubuntu)

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

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 |
+--------------------+
| ast_config         |
| buttonconfig       |
| cdr                |
| extensions         |
| fax_list           |
| iax_devices        |
| phonelines         |
| sccpdevice         |
| sccpdeviceconfig   |
| sccpline           |
| sip_devices        |
| view_lmce_phones   |
| voicemail_users    |
+--------------------+
13 rows in set (0.00 sec)

mysql> select * from phonelines
    -> ;
+----+---------+-------+--------+----------+------+------------+------+-------------+------------+----------+---------+----------+--------------+
| id | enabled | isfax | prefix | protocol | name | host       | port | phonenumber | username   | password | faxmail | channels | faxheader    |
+----+---------+-------+--------+----------+------+------------+------+-------------+------------+----------+---------+----------+--------------+
|  1 | yes     | no    | 0      | SPA      | een  | 10.1.100.6 | 5060 | 030879XXXX  | 030879XXXX | linuxmce | 2       |        5 | LinuxMCE fax |
+----+---------+-------+--------+----------+------+------------+------+-------------+------------+----------+---------+----------+--------------+
1 row in set (0.00 sec)


mysql> select * from extensions where context like 'outbound-allroutes';
+-------+--------------------+-------+----------+-------+-------------------------------------------+
| id    | context            | exten | priority | app   | appdata                                   |
+-------+--------------------+-------+----------+-------+-------------------------------------------+
| 27248 | outbound-allroutes | 112   |        1 | Macro | dialout-trunk,SPA/030879XXXX,${EXTEN},,   |
| 27249 | outbound-allroutes | 112   |        2 | Macro | outisbusy,                                |
| 27250 | outbound-allroutes | 911   |        1 | Macro | dialout-trunk,SPA/030879XXXX,${EXTEN},,   |
| 27251 | outbound-allroutes | 911   |        2 | Macro | outisbusy,                                |
| 27252 | outbound-allroutes | _0.   |        1 | Macro | dialout-trunk,SIP/030879XXXX,${EXTEN:1},, |
| 27253 | outbound-allroutes | _0.   |        2 | Macro | outisbusy,                                |
| 27282 | outbound-allroutes | _9.   |        1 | Macro | dialout-trunk,SIP/030879XXXX,${EXTEN:1},, |
| 27283 | outbound-allroutes | _9.   |        2 | Macro | outisbusy,                                |
+-------+--------------------+-------+----------+-------+-------------------------------------------+
8 rows in set (0.00 sec)

If you see something similar to this (note the _0. entries!), you are done, and SPA or any other similar FXO device should work.
May be someone will allow me to make a wiki page for this.......
Jetway JNC62K
AMD Athlon X2 4850
1GB Ram
4x 1TB SATA
1x 250 GB IDE
1x DVD R/W IDE
WMCE UIRT
Kubuntu 8.10 i386

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Asterisk no in/outbound route in 1004 with SPA3102
« Reply #2 on: March 25, 2013, 10:57:16 pm »
Log into the wiki with your forum credentials and you should be able to create a wiki page.