Koozali.org: home of the SME Server

3.1.0 and Asterisk 1.6

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
3.1.0 and Asterisk 1.6
« on: October 05, 2010, 01:21:56 AM »
Just a quick note to let you know that Sail-3.1.0-58 and higher can run with either Asterisk 1.4 or Asterisk 1.6.  You only need to change the Asterisk internal delimiter from | to ,  (you do this on page 4 of Globals panel).  That seems to be pretty much it.   Also, please do remember that Sail-3.1.0-58 and later releases require the new environment rpm 'smesailenv' if you are going to run under SME server. 

Kind Regards

« Last Edit: October 05, 2010, 01:25:38 AM by SARK devs »

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #1 on: October 24, 2010, 07:40:34 AM »
Hi S,
 I've loaded up a test server with a fresh install sme 8.0b6 and Sail-3.1.0-59 with asterisk 1.6 by following the wiki 3.1 quick guide.  substituting the 'asterisk14' with 'asterisk16' in the YUM commands.

Then as per this thread I have changed globals page 4 to be a , delimiter.

As I try and configure an extension I get...
Quote
Can't use an undefined value as a HASH reference at /opt/sark/www/cgi-bin/sarkinternal.pl line 377.
or a trunkline...
Quote
Can't use an undefined value as a HASH reference at /opt/sark/www/cgi-bin/sarktrunk.pl line 401.

any suggestions ?
« Last Edit: October 24, 2010, 09:00:30 AM by groutley »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: 3.1.0 and Asterisk 1.6
« Reply #2 on: October 24, 2010, 12:39:35 PM »
Yup - fixed in -62.   

It only happens when you add the first extension (or trunk).   As a workaround, add the object and issue a commit.  You will still get the error but if you then refresh the page it should be fine.    Thereafter, the problem won't return unless you remove all trunks or all extensions.

I've put -62 up for you.

Kind Regards

S

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #3 on: October 25, 2010, 08:22:33 AM »
Yup - fixed in -62.   

Thanks S,
  that sorted it out ;-)

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #4 on: November 02, 2010, 10:57:56 AM »
Hi S,
 I am having a few issues with this asterisk 1.6 and sail 3.1 on sme8b6.
first up provisioning of my SPA3102 as a trunk seems very broken, and my Cisco 79xx phones also.
but primarily my TDM card just doesnt work..

From the PCI panel after generating...
Quote
pci:0000:03:00.0     wctdm+       e159:0001 Wildcard TDM400P REV I

# Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov  2 20:33:22 2010
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
fxsks=1
echocanceller=mg2,1
fxoks=2
echocanceller=mg2,2
fxoks=3
echocanceller=mg2,3
# channel 4, WCTDM/4/3, no module.

# Global data

loadzone   = us
defaultzone   = us

; Autogenerated by /usr/sbin/dahdi_genconf on Tue Nov  2 20:33:22 2010
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCTDM/4 "Wildcard TDM400P REV I Board 5" (MASTER)
;;; line="1 WCTDM/4/0 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 1
callerid=
group=
context=default

;;; line="2 WCTDM/4/1 FXOKS"
signalling=fxo_ks
callerid="Channel 2" <4002>
mailbox=4002
group=5
context=from-internal
channel => 2
callerid=
mailbox=
group=
context=default

;;; line="3 WCTDM/4/2 FXOKS"
signalling=fxo_ks
callerid="Channel 3" <4003>
mailbox=4003
group=5
context=from-internal
channel => 3
callerid=
mailbox=
group=
context=default

So all looks OK at that point.. and it has autogenerated the Extensions, and Trunk as well as groups

but apart from the extensions being dead and the trunk not working..

Quote
l2nuxsvr*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC4   Fra Codi Options  LBO
Wildcard TDM400P REV I Board 5           OK      0      0      0      CAS Unk           0 db (CSU)/0-133 feet (DSX-1)

l2nuxsvr*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret        Blocked    State
 pseudo            default                    default                         In Service
So only the pseudo driver is loaded ?

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #5 on: November 02, 2010, 11:10:17 AM »
When I define a trunk of SPA3102 type,
I get the following error when I save..
Quote
Undefined subroutine &main::createSPA3 called at /opt/sark/www/cgi-bin/sarktrunk.pl line 244.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: 3.1.0 and Asterisk 1.6
« Reply #6 on: November 02, 2010, 06:00:45 PM »
Hi Gordon

3102 provisioning is broken.  Just received a unit from the distributor and we'll get to it shortly.  TDM issue is easier to fix; it is a missing include in chan_dahdi.conf.  I don't know if this is down to Digium or the packager but the include was present in 1.4.  At the end of  chan_dahdi.conf insert

Code: [Select]
#include dahdi-channels.conf
...restart asterisk and you should be good to go.

Undefined subroutine is a bug.  Instant code-around is to change line 244 in  /opt/sark/www/cgi-bin/sarktrunk.pl as follows

at line 244 Find

Code: [Select]
    createSPA3 ($q);   

Replace with

Code: [Select]
    createSpa ($q); 

That will get you further but you may be better to simply define the spa manually as a trunk and an extension for now (using GeneralSIP) until we get to the bottom of the provisioning issue. 

Can you telll me more about the issue with your 79xx?  We've not had any problems reported with these units.

Kind Regards

S

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #7 on: November 07, 2010, 10:59:26 AM »
Hi S,
 Thanks yet again..  adding that line fixed the TDM card..  I did however stumble across permission issues for editing /etc/asterisk/ files via the sail menu panel.
where many of the files were  root root 644  and I have changed to asterisk asterisk 664 to allow succesful editing via this panel.
one comment on the PCI card generation...   
In General settings I have set my base 4 digit starting extension to 5000, for all extentions I have added it allocated the next consectutive ext. in the 5000 range.  But when I generate the PCI card it allocates the extensions @ 4002, 4003  so I have to manually edit the generated config to put the FXS extensions into the 5000 range.  Not a huge issue..  but a nice to tidy up ?

You also are correct with the SPA3102, editing the sarktrunk.pl line 244 certainly allowed me a little further,  but ended failing with 'no key entered'.
So I added via GeneralSIP as you suggest, and I manually provision by taking my old /tftp/ files to this new server and changing the IPaddress to the new server.

As I''ve been busy with work, the issues I had with the Cisco provisioning has slipped my memory..  So I'll get back to you on that after I play again.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: 3.1.0 and Asterisk 1.6
« Reply #8 on: November 08, 2010, 03:50:27 PM »
The extension numbers are generated by dahdi_genconf according to a parameter file /etc/dahdi/genconf_parameters.   You can change the base it generates the extension numbers off in this file. 

Here's a snippet

Code: [Select]
# When generating extensions for chan_dahdi.conf or users.conf etc: the
# extension number will be channel_number+base_exten . The default is:
#base_exten             4000

Kind Regards

S

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #9 on: December 31, 2010, 11:02:41 AM »
Hi S..
  Happy New Year !

I am trying to get my SPA3102 working with SAIL 3.1 given my SME7.5 crash, I'm trying to get this SME8 box going.

As previously stated, the Provisioning for the SPA3102 has not been completed, so I am defining the Trunk as a General SIP Trunk.
I am stuck though..   While the Extension is registering fine, and I can use this Extension to make outgoing calls.
The Trunk does not register..
  I get..
Code: [Select]
[Dec 31 20:54:48] NOTICE[4243]: chan_sip.c:21786 handle_request_register: Registration from '<sip:97971234@192.168.37.252>' failed for '192.168.37.157' - No matching peer found
[Dec 31 20:54:48] NOTICE[4243]: chan_sip.c:21786 handle_request_register: Registration from '<sip:97971234@192.168.37.252>' failed for '192.168.37.157' - No matching peer found

I have tried everything I can think of,  as usually that error suggests that the name / userid does not match the definition in asterisk.
but It does ! I've tried changing it with no luck.
as this is my land line, I really do need to get this running ASAP.

appreciate your help.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: 3.1.0 and Asterisk 1.6
« Reply #10 on: December 31, 2010, 12:28:59 PM »
Hi Gordon

Are you attempting to have the SPA trunk (FXO) register with Asterisk, or the other way around (asterisk register with the SPA)?

Registration (in either direction) shouldn't be necessaryto talk to the SPA - Asterisk knows where the SPA is and the SPA knows where Asterisk is so they should just be able to INVITE one another directly.   Try removing the registration entry(s) altogether and running without them.

Kind Regards



     

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #11 on: December 31, 2010, 12:38:52 PM »
Hi S,
  I was trying to get the SPA to register to Asterisk as I did with SAIL 2 and Asterisk 1.4
but if it shouldn't require regitration that is fine.

But when I ring my landline,  the SPA-3102 shows 'ringing' on its PSTN Line.
But asterisk doesnt see this and the targeted extension never rings.

I started off with the same config that has worked for years with my old SME7.5 / SAIL 2.x / asterisk 1.4 setup (until it crashed)

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #12 on: January 01, 2011, 08:14:52 AM »
So even removing any registration bits..  i.e. in the SPA register = No
This SPA-3102 Trunk doesn't work.
 between trying to fix the old SME7.5 machine and trying to get this SPA3102 working on this SME8/SAIL3/1 machine
I'm completely befuzzled !!

Appreciate any suggestions
regards
Glen

Offline groutley

  • *****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: 3.1.0 and Asterisk 1.6
« Reply #13 on: January 01, 2011, 09:19:37 AM »
OK.. its worse than I realised..
I have two other VOIP trunks..  and they make outbound calls fine,
but their incoming DID is not getting thru ..

So I am getting No incoming calls at all..
I delete and redefine the General SIP trunk, and no change..

I am now looking for a brick wall to bang my head against..  right now seems like more fun !

Glen

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: 3.1.0 and Asterisk 1.6
« Reply #14 on: January 01, 2011, 01:02:20 PM »
I've set up an spa3102 here and it works just fine for both incoming and outgoing calls.  I think I've mislead you re registration because I couldn't get it to run without it registering with Asterisk but other than that its fine.  - just make sure you register your spa to the Asterisk peername (not the username - which is what I suspect you were trying to do).  Pre 3.1.0-92 the peername was generated (you can find it by looking in sip.conf), From -92 (which is what's in the iso), you can change the value it sets to suit yourself.  Use generalSIP for the entries. 

If SIP calls aren't arriving then you need to check your DiD entries and firewall rules.  There are no SAIL or Asterik bugs in this area that I'm aware of. 

Kind Regards

S
« Last Edit: January 01, 2011, 01:14:17 PM by SARK devs »