News:

On Tuesday September 6th the forum will be down for maintenance from 9:30 PM to 11:59 PM PDT

Main Menu

ring and disconnect detection on pstn line

Started by Tobbe, May 10, 2014, 11:28:00 AM

Previous topic - Next topic

Tobbe

hello.

i have a problem, i think i know what the cause is but i'm not sure how to fix it.

lets start from the beginning.
i have an obi202 with obi-line and the device is used in sweden.
my setup is more or less according to documentation i found regarding how to setup the obi with asterisk (freepbx).

i have configured it so that when i get an incoming ring on the pstn line, this gets forwarded to a ring group in asterisk and when noone answers in this ring group it is supposed to be forwarded to voice mail.

the problem i have is that the timeout set in the ring group never kicks in and the phones keeps ringing forever.

after a lot of troubleshooting i think i've found the cause.
when the pstn line rings each ring is treated as a separate call to asterisk.
so when it rings, the it drops the last call attempt and makes a new one so from asterisk point of view it gets lots of separate calls (one for each ring).

this is not good.
the way the line port is setup on the obi is for disconnect detection to be done on polarity reversals and this works fine.
problem is that there is also a polarity reversal for each ring.

so how do i modify the disconnect and ring detection so it works properly?
if i remove detect polarity reversal from disconnect detection i bet the ringing part will work but then it wont know when the call is over.

any advice?

i really wish there was some country specific defaults you could use instead of having to guess more or less.
like a dropdown where you pick a country or region and then it would set many default settings that is needed.

azrobert

How did you setup routing from the OBi202 to Asterisk?

I have an OBi110 in the USA.
I'm running Raspbx.
In my Line Port InboundCallRoute I have:
{ph,sp2(100@192.168.1.100:5060;ui=$1)}

100 is an extension on Raspbx.
192.168.1.100 is the IP address of Raspbx.
I have a trunk defined in Raspbx pointing to the OBi110's IP address.
This trunk allows uri calls to be accepted by Raspbx from the OBi110.

If I call my PSTN phone number and don't pickup I get routed to voice mail.
I think this proves in my setup Raspbx is not treating each ring as a new call.

Tobbe

Quote from: azrobert on May 10, 2014, 01:44:39 PM
How did you setup routing from the OBi202 to Asterisk?
the inbound call route is set to: SP1(xxx) where xxx is my real phone number for the pots line.
SP1 is setup as a trunk on the asterisk side.

Quote from: azrobert on May 10, 2014, 01:44:39 PM
I have an OBi110 in the USA.
I'm running Raspbx.
In my Line Port InboundCallRoute I have:
{ph,sp2(100@192.168.1.100:5060;ui=$1)}

100 is an extension on Raspbx.
192.168.1.100 is the IP address of Raspbx.
I have a trunk defined in Raspbx pointing to the OBi110's IP address.
This trunk allows uri calls to be accepted by Raspbx from the OBi110.

If I call my PSTN phone number and don't pickup I get routed to voice mail.
I think this proves in my setup Raspbx is not treating each ring as a new call.
well...
i can make a call from the outside and get it to ring on all of my extensions in the ring group and i can answer without any problems.
the issue is that the timeout in the ring group fails completely since each ring is treated as a separate "call".

i bet my problem has to do with the line setup on the obi.
i did find a specification from the operator of how ringing and stuff like that is supposed to work.
apparently polarity reversals is used for caller id during ringing and it is also used to detect that the call has been picked up and hanged up.

right now i have:
LINE Port
DetectOutboundConnectMethod: Detect polarity reversal (was assume connected after short delay)

PSTN Disconnect Detection
DetectPolarityReversal: Checked

Port Settings
ACImpedance: the one that starts with 270+
CallerIDDetectMethod: DTMF(Finland, Sweden)


i'll experiment a bit more, perhaps i can adjust the ring detection timers...

Tobbe

problem solved by setting RingValidationTime to 640 and RingTimeout to 1408.
not sure if it was just one of them or both that made it work.
either way the obi202 device no longer sends multiple sip invites for each ring any more.