Link to home
Start Free TrialLog in
Avatar of neilballantyne
neilballantyne

asked on

Trixbox with Premicell - outbound calls hangup when answered

We have a Nokia Premicell connected via a X100P to Trixbox (2.8.0.3) and configured to handle all mobile calls. Incoming calls work fine but for outbound calls, the call is hung up as soon as the recipient answers.

The log file is below - after the 'DAHDI/1-1 answered' the recipent phone starts ringing. As soon as the call is answered I see the 'hangupcall'

-- Called g0/077xxxxxxxx
    -- DAHDI/1-1 answered SIP/162-b7307fc8
    -- Executing [h@macro-dialout-trunk:1] Macro("SIP/162-b7307fc8", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] ResetCDR("SIP/162-b7307fc8", "vw") in new stack
    -- Executing [s@macro-hangupcall:2] NoCDR("SIP/162-b7307fc8", "") in new stack
    -- Executing [s@macro-hangupcall:3] GotoIf("SIP/162-b7307fc8", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,6)
    -- Executing [s@macro-hangupcall:6] GotoIf("SIP/162-b7307fc8", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] GotoIf("SIP/162-b7307fc8", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,11)
    -- Executing [s@macro-hangupcall:11] Hangup("SIP/162-b7307fc8", "") in new stack
  == Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/162-b7307fc8' in macro 'hangupcall'
  == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/162-b7307fc8'
    -- Hungup 'DAHDI/1-1'
  == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on 'SIP/162-b7307fc8' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 9077xxxxxxxx, 4) exited non-zero on 'SIP/162-b7307fc8'

Open in new window

Avatar of Member_2_1968385
Member_2_1968385
Flag of United Kingdom of Great Britain and Northern Ireland image

The only explanation I can think of is that the Premicell is signalling that the call was answered by momentarily reversing the line voltage. This is used as a signalling technique on analogue circuits, but the event that triggers a polarity reversal may not always be the same and depends on the equipment.

I believe the default behaviour for Asterisk is to interpret polarity reversal as a hangup which would trigger the "hangupcall" that you see. If so, you should be able to modify the Dahdi settings to make Asterisk interpret polarity reversals correctly. The relevant parameters in /etc/asterisk/chan_dahdi.conf are shown below (a snippet copied from the sample chan_dahdi.conf file included with Asterisk 1.6) but you will probably find that Trixbox has a greatly reduced version of this file. If so, you can simply edit the file, add the missing parameters then restart Asterisk.

; Use a polarity reversal to mark when a outgoing call is answered by the
; remote party.
;
answeronpolarityswitch=yes
;
; In some countries, a polarity reversal is used to signal the disconnect of a
; phone line.  If the hanguponpolarityswitch option is selected, the call will
; be considered "hung up" on a polarity reversal.
;
hanguponpolarityswitch=no
;
; polarityonanswerdelay: minimal time period (ms) between the answer
;                        polarity switch and hangup polarity switch.
;                        (default: 600ms)
Avatar of neilballantyne
neilballantyne

ASKER

Hi feptias - thanks for the suggestion but that's not worked either, albeit in a slightly different way.

WIth answeronpolarityswitch=yes and hanguponpolarityswitch=no I end up with a CHANUNAVAIL and then the call is made through the SIP trunk. Log as follows:

    -- Executing [s@macro-dialout-trunk:19] Dial("SIP/162-b7706c38", "DAHDI/g0/07xxxxxxxxx,300,") in new stack
    -- Called g0/07xxxxxxxxx
    -- Hungup 'DAHDI/1-1'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:20] Goto("SIP/162-b7706c38", "s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] GotoIf("SIP/162-b7706c38", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,3)


I don't see a 'DAHDI/1-1 answered' entry at all but the mobile rings and as soon as I answer it the SIP phone I'm calling from hangs up, and a second later the mobile hangs up. (the call through the SIP trunk actually comes through before the first call has hung up on the mobile)
ASKER CERTIFIED SOLUTION
Avatar of Member_2_1968385
Member_2_1968385
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not sure that we have the kit/expertise to listen in on the line. We'll probably look into a SIP to GSM device as you've suggested, though out of interest is there any way to get additional debugging information in the asterisk logs? I've tried a couple of suggestions including settig a value of '1' in '/sys/module/dahdi/parameters/debug', and 'options dahdi debug=1' in '/etc/modprobe.conf' but neither seem to make any difference.
I always use the Command Line Interface (CLI) when debugging asterisk. You access it from the Linux prompt using the command "asterisk -r". Then you should see a CLI> prompt. At the CLI prompt, you can list every command by typing "help". Useful commands are:
core set verbose 3                                     // sets the general debug output level to detailed
core set verbose 1                                     // sets it back to quiet
dahdi show status                                     // shows general status of dahdi cards
dahdi show channels                                 // shows status of the dahdi channels
sip show peers                                          // shows the status of sip peers and IP phones
sip show registry                                       // status of registrations Asterisk has made to other peers
sip set debug on                                       // traces all sip packets
sip set debug peer <peername>              // only traces SIP packets to/from specified peer
sip set debug off                                       // turns sip packet tracing off again

Just type "help" and scan through the list to see what looks interesting. You can filter the help output by typing "help <something>". For example:
help dahdi show                                   // only lists the commands that start "dahdi show"

Unfortunately, I don't know of any debug methods that show what is happening on analogue channels when they are doing call progress analysis, but setting "core set verbose 3" will give you some info.
No further joy with the Premicell so we have opted for a temporary bluetooth solution using chan_mobile as a temporary option while we have a look into SIP to GSM.

As a side point when we initially set up chan_mobile it worked fine with both inbound and outbound calls, but no audio when an external (SIP) call was re-directed out through the mobile. Setting 'progressinband=yes' on the SIP Trunk has fixed this but am wondering if there are any issues with doing this?
Expert's suggested alternative solution was useful