Koozali.org: home of the SME Server

Help please

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Help please
« on: October 25, 2007, 12:44:26 PM »
Hi Selintra,
 no idea what I have done, I have been playing a little with my setup, as when I dial a VSP DID I get the VSP voicemail, it never comes thru to Asterisk.
 I have to guess in my playing, I have broken our main extension.
xtn 5000 is our main house phone connected via SPA3102 FXS,
 and our traditional PSTN line comes in via SPA-3102 FXO.

This had all been working wonderfully until today.
all incoming PSTN calls have gone straight to xtn 5000 voicemail.
Investigating this, if I dial 5000  from another extension, the same thing occurs.

I have redirected our incoming PSTN to another extension (5010, my Cisco 7940) and this works fine.
So the SPA3102 FXO / Trunk works fine.
Also the odd thing is that dialing out using the xtn 5000 works fine, and uses VOIP Trunks.

I have played trying to fix,  but cannot see what is wrong.
I don;t know if I broke it, or there is another reason.
appreciate any help..
here is what occurs when I tryto dial xtn 5000
Code: [Select]
    -- Executing Hangup("SIP/5000-b7e05750", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/5000-b7e05750'
 Extension Changed 5000 new state Idle for Notify User 5009
    -- Executing AGI("SIP/5009-b7e28760", "selintra|OutCluster|5000") in new stack
 Extension Changed 5009 new state InUse for Notify User 5007
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing AGI("SIP/5009-b7e28760", "selintra|InCall|") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (DBget) Options: (dbVal=STAT/OCSTAT)
    -- DBget: varname=dbVal, family=STAT, key=OCSTAT
    -- DBget: Value not found in database.
    -- AGI Script Executing Application: (DBget) Options: (dbVal=cfimopen/5000)
    -- DBget: varname=dbVal, family=cfimopen, key=5000
    -- DBget: Value not found in database.
    -- AGI Script Executing Application: (DBget) Options: (dbVal=cfim/5000)
    -- DBget: varname=dbVal, family=cfim, key=5000
    -- DBget: set variable dbVal to 5000
    -- AGI Script Executing Application: (Background) Options: (silence/1)
    -- Playing 'silence/1' (language 'en')
    -- AGI Script Executing Application: (Voicemail) Options: (u5000)
    -- Playing 'vm-theperson' (language 'en')
    -- Playing 'digits/5' (language 'en')
    -- Playing 'digits/0' (language 'en')
    -- Playing 'digits/0' (language 'en')
    -- Playing 'digits/0' (language 'en')
    -- Playing 'vm-isunavail' (language 'en')
    -- Playing 'vm-intro' (language 'en')
  == Spawn extension (Home, 5000, 1) exited non-zero on 'SIP/5009-b7e28760'
    -- Executing Hangup("SIP/5009-b7e28760", "") in new stack
  == Spawn extension (Home, h, 1) exited non-zero on 'SIP/5009-b7e28760'
 Extension Changed 5009 new state Idle for Notify User 5007

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #1 on: October 25, 2007, 02:50:34 PM »
Oh no!!!!!!

You've really done it this time.....

Only joking :-)

Just do *23* at the 5000 phone.  You've got it in call forward immediate to voicemail (DND).


Best

S

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #2 on: October 25, 2007, 02:58:56 PM »
Ooooh boy,  do I feel stupid now !! :?

Thanks for that !  out of curiosity what is the tag that tells you that in the console trace ?

Now in my panic, I had deleted the Trunk and extension related to the SPA-3102,
after redefining I notice that my Xten softphone no longer sees xtn 5000 as available?

is that just as stupid ?

Thanks again

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #3 on: October 25, 2007, 03:13:01 PM »
Don't worry,
 restarting the Softphone sorted that one ;-)
Thanks for the help..  :D

Next to sort out the original problem of the VSP not incoming thru to Asterisk

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #4 on: October 25, 2007, 03:44:06 PM »
Hi mate

what happens is this....

Call arrives in extensions at wherever....

extensions calls the AGI (incall) and the AGI checks to see if the system is open or closed by retrieving OCSTAT from the DB.  It then looks to see if there are any call forwards on the phone before ringing it.  You can't see the code but you can see the trace of its activity... 
Code: [Select]
    -- AGI Script selintra completed, returning 0
    -- Executing AGI("SIP/5009-b7e28760", "selintra|InCall|") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (DBget) Options: (dbVal=STAT/OCSTAT)
    -- DBget: varname=dbVal, family=STAT, key=OCSTAT
    -- DBget: Value not found in database.
    -- AGI Script Executing Application: (DBget) Options: (dbVal=cfimopen/5000)
    -- DBget: varname=dbVal, family=cfimopen, key=5000
    -- DBget: Value not found in database.
    -- AGI Script Executing Application: (DBget) Options: (dbVal=cfim/5000)
    -- DBget: varname=dbVal, family=cfim, key=5000
    -- DBget: set variable dbVal to 5000
    -- AGI Script Executing Application: (Background) Options: (silence/1)
    -- Playing 'silence/1' (language 'en')
    -- AGI Script Executing Application: (Voicemail) Options: (u5000)

The important part to look at is this bit...

Code: [Select]
    -- AGI Script Executing Application: (DBget) Options: (dbVal=cfim/5000)
    -- DBget: varname=dbVal, family=cfim, key=5000
    -- DBget: set variable dbVal to 5000

It's found a CFIM record (call forward immediate) set to 5000.  Hmmmm....  It's set to call forward to itself! ...

We use recursion a lot in our code 'cos it's generally regarded as clever if you're a nerd (the rest of the World just regards it as very very sad). A recursive callforward to self, logically causes the extension to call itself (which will always be engaged) so it will always drop to voicemail, which is in effect, a do-not-disturb.  It doesnt actually call itself but that is the logic.

So there you go.

Best

S

 


Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #5 on: October 25, 2007, 04:03:55 PM »
Great !
Thanks for that detailed explanation !
would you believe it all makes sense ;-)

Wish I knew how I managed to get that CFIM set.

I must be a true nerd,  I remember when cell phones first came out here in Oz.
I tried to call forward my phone to itself,  it was a futile plan to bring down the network,
but would you believe the telco had taken care of the recursive loop.
Well  it didn't bring the network down,  I rust ogt an engaged signal when I rang it !

I guess I just tried it again,  some people never grow up huh  :lol:

Thanks again for your quick response and the great explanation.

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #6 on: October 25, 2007, 07:49:33 PM »
Just to get really nerdish try this....

Setup a call forward loop or spiral with your phones.  For example... CFIM (*21*) 5000=>5001 and then CFIM 5001 => 5000. 

If you want to be really tricksey set up a three or four partner loop .... like this...

5001=>5002=>6000=>5001.

..And maybe add what's known as a spiral to this set-up with 6005=>5002

Then dial into the loop and see what SAIL does with it.

;-)

Best

S

 

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #7 on: October 26, 2007, 04:28:48 PM »
Hi Selintra,
 think I'll wait till the wife is away for a weekend before I try that one !
I can almost imagine if you played enough you could play a tune with the different rings briefly running around the extensions in the house.

Now, I have been trying to get the SPA3102 provisioning to work,
But it fails..  looking at the syslog from the SPA  I see...
Code: [Select]
Now I am guessing this is due to the following in the generated /tftpboot/spa000e08cb6317.cfg
Code: [Select]
</Resync_Periodic>


</flat-profile>
<Proxy_2_> 192.168.37.251

</Proxy_2_>


this appears to be the merge of spa000e08cb6317line  and spa000e08cb6317pstnline files.
the issue being in the provisioning section for the extension it finishes with
Code: [Select]
</flat-profile>
]
and the provisioning section of the trunk does not have any of these XML tags.

So is my thinking correct?
and if so how to fix this, I guess if my thinking is wrong,  how do I fix it anyway ;-)

G

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #8 on: October 26, 2007, 04:31:21 PM »
But it fails..  looking at the syslog from the SPA  I see...
Code: [Select]

Ooops..  help if I remember to insert the code !!......
Code: [Select]
SPA-3102 00:0e:08:cb:63:17 -- Requesting resync tftp://192.168.37.251:69/spa000e08cb6317.cfg
SPA-3102 00:0e:08:cb:63:17 -- Resync failed: corrupt file
System started: ip@192.168.37.250, reboot reason:H30300010
YM:ERR:AuthServerNotConfig
YM:ERR:AuthServerNotConfig
[0]Reg Addr Change(0) 0:0->c0a825fb:5060
[1]Reg Addr Change(0) 0:0->c0a825fb:5060
SPA-3102 00:0e:08:cb:63:17 -- Requesting resync tftp://192.168.37.251:69/spa000e08cb6317.cfg
SPA-3102 00:0e:08:cb:63:17 -- Resync failed: corrupt file

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #9 on: October 26, 2007, 05:44:32 PM »
It's does not look right.

Here's our test spannnn.cfg file....

Code: [Select]
<flat-profile>
<Proxy_1_> 192.168.1.210
</Proxy_1_>
<Outbound_Proxy_1_> 192.168.1.210
</Outbound_Proxy_1_>
<User_ID_1_> 4006
</User_ID_1_>
<Password_1_> 4006
</Password_1_>
<Display_Name_1_> freddyK
</Display_Name_1_>
<Dial_Plan_1_> (*x.|*xx*x.|x.)
</Dial_Plan_1_>
<Time_Zone> GMT
</Time_Zone>
<Resync_Periodic> 3600
</Resync_Periodic>
</flat-profile>
<Proxy_2_> 192.198.1.210
</Proxy_2_>
<Outbound_Proxy_2_> 192.168.1.210
</Outbound_Proxy_2_>
<User_ID_2_> 514414
</User_ID_2_>
<Password_2_> asterisk
</Password_2_>
<Display_Name_2_> 514414
</Display_Name_2_>
<Dial_Plan_2_2_> (S0&lt;:514414&gt;)
</Dial_Plan_2_2_>
<FAX_Passthru_Method_2_> None
</FAX_Passthru_Method_2_>
<Line_1_VoIP_Caller_DP_2_> none
</Line_1_VoIP_Caller_DP_2_>
<VoIP_Caller_1_DP_2_> 2
</VoIP_Caller_1_DP_2_>
<PSTN_Ring_Thru_Line_1_2_> no
</PSTN_Ring_Thru_Line_1_2_>
<PSTN_CID_For_VoIP_CID_2_> yes
</PSTN_CID_For_VoIP_CID_2_>
<PSTN_Caller_Default_DP_2_> 2
</PSTN_Caller_Default_DP_2_>
<PSTN_Caller_1_DP_2_> 2
</PSTN_Caller_1_DP_2_>
<PSTN_Answer_Delay_2_> 2
</PSTN_Answer_Delay_2_>
<Min_CPC_Duration_2_> 0.09
</Min_CPC_Duration_2_>
<FXO_Port_Impedance_2_> Global
</FXO_Port_Impedance_2_>
<SPA_To_PSTN_Gain_2_> 3
</SPA_To_PSTN_Gain_2_>
<PSTN_To_SPA_Gain_2_> 5
</PSTN_To_SPA_Gain_2_>
<On-Hook_Speed_2_> 3 ms (ETSI)
</On-Hook_Speed_2_>
<Ring1_Cadence> 60(.4/.2,.4/2)
</Ring1_Cadence>
<Ring2_Cadence> 60(1/2)
</Ring2_Cadence>
<Ring3_Cadence> 60(.25/.25,.25/.25,.25/1.75)
</Ring3_Cadence>
<Ring4_Cadence> 60(.4/.8)
</Ring4_Cadence>
<Ring5_Cadence> 60(2/4)
</Ring5_Cadence>
<FXS_Port_Input_Gain> 0
</FXS_Port_Input_Gain>
<Caller_ID_Method> ETSI FSK With PR(UK)
</Caller_ID_Method>
<FXS_Port_Impedance> 370+620||310nF
</FXS_Port_Impedance>
<FXS_Port_Output_Gain> 7
</FXS_Port_Output_Gain>
<Time_Zone> GMT
</Time_Zone>

Whish release of SAIL are you running?

Best

S

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
Re: Help please
« Reply #10 on: October 26, 2007, 11:58:26 PM »
G'day S,
  I am running SAIL Version: 2.1.14-526
Looks like yours does not have an extra line between each ,
but your </flat-profile> is in the middle of the config i.e at the end of the 'line' section,
which is what I assumed must be the problem..
Hmmm
my  spannnnline  and spannnnpstnline  files do not have the extra <CR> between each line.
So the merge of the 2 adds them in ?

G

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #11 on: October 28, 2007, 06:01:59 AM »
yup - it looks like a bug to me.

I'll take a look at why it's glitching.  The 3000/3102 provisioning is a bit tricksey due to the merge (which you've already worked out).

Thanks for the heads up.

Best

S

Offline groutley

  • ****
  • 213
  • +0/-0
    • http://www.routley.homeip.net
SPA provisioning
« Reply #12 on: October 28, 2007, 12:27:24 PM »
Hi S,
 I discovered why I was getting the "Resync failed: corrupt file"
and all my fault !!
I had added a daylight saving rule
Code: [Select]
<Daylight Saving Time Rule> start=3/-1/7/3;end=10/-1/7/2;save=-1

</Daylight Saving Time Rule>
Yes I am sure you spot my error immediately ;-)  I did not replace the spaces with '_'
So it seems the extra <CR> are not a problem, might be curious, but they do not cause an issue.
Correcting my Daylight saving statement now  works correctly..
Code: [Select]
System started: ip@192.168.37.250, reboot reason:H30300010
YM:ERR:AuthServerNotConfig
YM:ERR:AuthServerNotConfig
[0]Reg Addr Change(0) 0:0->c0a825fb:5060
[1]Reg Addr Change(0) 0:0->c0a825fb:5060
SPA-3102 00:0e:08:cb:63:17 -- Requesting resync tftp://192.168.37.251:69/spa000e08cb6317.cfg
SPA-3102 00:0e:08:cb:63:17 -- Successful resync tftp://192.168.37.251:69/spa000e08cb6317.cfg
System started: ip@192.168.37.250, reboot reason:W4
YM:ERR:AuthServerNotConfig
YM:ERR:AuthServerNotConfig
[0]Reg Addr Change(0) 0:0->c0a825fb:5060
[1]Reg Addr Change(0) 0:0->c0a825fb:5060

But if you are looking at the provisioning at all for the SPA 3000/3102 I noticed a couple of things I consider odd, or could be improved.

Firstly For the Trunk definition, I cannot edit the provisioning area manually.
I have to delete the Trunk, modify the SPA-3102 Carrier definition, and then re-Add the Trunk.
A slightly tedious method to make a simple change, and not how I expected this to work.

If I manually alter the provisioning section for the defined Trunk, I save, and then go back in and my changes are no longer there.

The 2nd thing is, the <Display_Name_2_> parameter picks up the trunk "Gateway PSTN number: " that is defined, now That field would seem obvious to be filled out with your PSTN subscriber number.
Now the <Display_Name_2_> field on the SPA-3102 is what is displayed on the phone instead of CID, as we do not pay our PSTN provider extra for CID feature.
So our phone displays our own Phone number on the phone display when someone rings our PSTN line.
This I find a bit odd, with my manual SPA configuration, I set this field to 'Telstra call' which nicely tells us the phone is ringing due to incoming call from our Telco provider.
(this makes more sense to the Wife )
Unfortunately I do not appear to be able to Alter this parameter, as whatever magic you have worked, is picking up the PSTN number, and is not even a variable. If it was a variable, I gather I could replace the Variable with my manually entered text.
This Carrier definition seems to work differenty to the IP Device definition where the use of $desc, $ext or $localip could easily be replaced with text.

Lastly, I am getting odd behavior with the Daylight savings rule, I added.
The definition I believe is correct,  but when the spa is automagically provisioned, the time on the SPA is completely wrong ! (well OK the minutes are correct) but it is 11hours slow !
this is curious as I set
Code: [Select]
<Time_Zone> GMT+11:00
</Time_Zone>
Now this is where is becomes ODD !!
If I now go to the SPA web interface, make no changes,
but click 'Submit All Changes' from the admin/voice/advanced page, the time beomes correct.
Note from the admin/basic display the clock does not correct itself  !

From previous playing with SPA monitor / logging utilities, I note that the SPA-3102 has specific needs, when compared to a spa-3000, to  be managed correctly, perhaps the SAIL provisioning is not working with the 'advanced' access ?

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #13 on: October 28, 2007, 11:22:24 PM »
Hi G

I've had a look at the trunk-side of the code this afternoon (sad bugger that I am... working on a Sunday) and there's a hole in there big enough to drive a bus through....  Heads will roll in the morning.

It's in a fairly tricksie area but I'll get a patch done as soon as we can find a work slot for it.

Thanks for all of your help.

Kind Regards

S

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Help please
« Reply #14 on: October 30, 2007, 12:32:46 AM »
HI G

We've just released an update with fixes for the spa3xxx issues you reported.  Unfortunately, owing to the fact that we don't have a lot of spare development time, the fixes have been done in the 2.2.1 branch ONLY.  2.2.1-538 is available for download from the ftp site and it has been tested with an SPA-3000 and an SPA-2102 ('cos that's all we had lying around).  I think we've fixed the majority of the issues you uncovered but we'd like you to gve it a run 'round the block if you have the time.  I can confirm (because I tested some of the functions myself) that you can now modify the generated entries in Trunks and your changes will persist across commits.  You can also freely modify the 3102 template if you feel it needs work.  We've never tested on a 3102 for the simple reason that we don't have one.  By default, we still generate spa-3000/3102 entries with their own phone number in the CLI/TAG field, however you can change this to whatever you wish.  The current templates (in devices and carriers) generate UK impedances and termination detection timings and you should change these for your own local Telco's settings BEFORE you create any trunks or extensions.

PAP2's will NOT autoprovision with this release.  I'm going to call the distributor tomorrow to see if we can get hold of a PAP2 for testing purposes.

Thanks again for your help

S