AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
8 stars 6 forks source link

app_rpt: Deadlock when starting autopatch call #257

Closed KB4MDD closed 2 months ago

KB4MDD commented 9 months ago

I am trying to setup the autopatch function. The call is placed; however, the repeater does not repeat any audio. The repeater stops working. You cannot bring it up after the call starts. A core restart now is required to gain access to the repeater.

Debugging information. (I masked the telephone number and user name) (rpt debug set to 7, verbose set to 7, iax debug on)

wa4tal*CLI> rpt fun 59916 *612569999999
    -- Executing [2569999999@autopatch:1] Dial("DAHDI/pseudo-1445056746", "IAX2/voipms/2569999999") in new stack
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW
    Timestamp: 00014ms  SCall: 05103  DCall: 00000 208.100.60.17:4569
    VERSION         : 2
    CALLED NUMBER   : 2569999999
    CODEC_PREFS     : (ulaw|g726aal2|gsm)
    CALLING NUMBER  : 0000000000
    CALLING PRESNTN : 0
    CALLING TYPEOFN : 0
    CALLING TRANSIT : 0
    CALLING ANI2    : 0
    CALLING NAME    : Repeater
    LANGUAGE        : en
    USERNAME        : 999999_444525
    -- Called IAX2/voipms/2569999999
    FORMAT          : 4
    FORMAT2         : ulaw
    CAPABILITY      : 22
    CAPABILITY2     : Unknown
    ADSICPE         : 2
    DATE TIME       : 2023-12-22  06:35:42

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: CTOKEN
    Timestamp: 00014ms  SCall: 00001  DCall: 05103 208.100.60.17:4569
    CALLTOKEN       : 51 bytes

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW
    Timestamp: 00049ms  SCall: 05103  DCall: 00000 208.100.60.17:4569
    VERSION         : 2
    CALLED NUMBER   : 2569999999
    CODEC_PREFS     : (ulaw|g726aal2|gsm)
    CALLING NUMBER  : 0000000000
    CALLING PRESNTN : 0
    CALLING TYPEOFN : 0
    CALLING TRANSIT : 0
    CALLING ANI2    : 0
    CALLING NAME    : Repeater
    LANGUAGE        : en
    USERNAME        : 999999_444525
    FORMAT          : 4
    FORMAT2         : ulaw
    CAPABILITY      : 22
    CAPABILITY2     : Unknown
    ADSICPE         : 2
    DATE TIME       : 2023-12-22  06:35:42
    CALLTOKEN       : 51 bytes

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: AUTHREQ
    Timestamp: 00004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    AUTHMETHODS     : 3
    CHALLENGE       : \x31\x36\x36\x30\x33\x30\x39\x30\x38
    USERNAME        : 999999_444525

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: AUTHREP
    Timestamp: 00083ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    MD5 RESULT      : 7678b919bdb8325912b412aa9cb2ec3f

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: ACCEPT
    Timestamp: 00038ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    FORMAT          : 4
    FORMAT2         : ulaw

    -- Call accepted by 208.100.60.17:4569 (format ulaw)
    -- Format for call is (ulaw)
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK
    Timestamp: 00038ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 002 ISeqno: 002 Type: VOICE   Subclass: 4
    Timestamp: 00140ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 003 Type: IAX     Subclass: ACK
    Timestamp: 00140ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    -- <DAHDI/pseudo-1073298576> Playing 'rpt/callproceeding.gsm' (language 'en')
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 003 Type: CONTROL Subclass: PROGRES
    Timestamp: 05331ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 003 Type: IAX     Subclass: ACK
    Timestamp: 05331ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 003 ISeqno: 003 Type: VOICE   Subclass: 4
    Timestamp: 05341ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 004 Type: IAX     Subclass: ACK
    Timestamp: 05341ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 004 ISeqno: 003 Type: CONTROL Subclass: PROGRES
    Timestamp: 05344ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 005 Type: IAX     Subclass: ACK
    Timestamp: 05344ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 005 ISeqno: 003 Type: CONTROL Subclass: ANSWER
    Timestamp: 05347ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 006 Type: IAX     Subclass: ACK
    Timestamp: 05347ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 006 ISeqno: 003 Type: CONTROL Subclass: (255?)
    Timestamp: 05350ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 003 ISeqno: 007 Type: IAX     Subclass: ACK
    Timestamp: 05350ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    -- IAX2/voipms-5103 is making progress passing it to DAHDI/pseudo-1445056746
    -- IAX2/voipms-5103 is making progress passing it to DAHDI/pseudo-1445056746
    -- IAX2/voipms-5103 answered DAHDI/pseudo-1445056746
    -- Channel IAX2/voipms-5103 joined 'simple_bridge' basic-bridge <714bddc7-b9a4-4dda-bd3a-bce9178c6dd8>
    -- Channel DAHDI/pseudo-1445056746 joined 'simple_bridge' basic-bridge <714bddc7-b9a4-4dda-bd3a-bce9178c6dd8>
Tx-Frame Retry[000] -- OSeqno: 003 ISeqno: 007 Type: IAX     Subclass: LAGRQ
    Timestamp: 10016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 007 ISeqno: 004 Type: IAX     Subclass: LAGRP
    Timestamp: 10016ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 004 ISeqno: 008 Type: IAX     Subclass: ACK
    Timestamp: 10016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 008 ISeqno: 004 Type: IAX     Subclass: LAGRQ
    Timestamp: 10004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 004 ISeqno: 009 Type: IAX     Subclass: LAGRP
    Timestamp: 10004ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 009 ISeqno: 005 Type: IAX     Subclass: ACK
    Timestamp: 10004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 005 ISeqno: 009 Type: IAX     Subclass: LAGRQ
    Timestamp: 20016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 009 ISeqno: 006 Type: IAX     Subclass: LAGRP
    Timestamp: 20016ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 006 ISeqno: 010 Type: IAX     Subclass: ACK
    Timestamp: 20016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 010 ISeqno: 006 Type: IAX     Subclass: LAGRQ
    Timestamp: 20004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 006 ISeqno: 011 Type: IAX     Subclass: LAGRP
    Timestamp: 20004ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 011 ISeqno: 007 Type: IAX     Subclass: ACK
    Timestamp: 20004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 007 ISeqno: 011 Type: IAX     Subclass: PING
    Timestamp: 21016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 011 ISeqno: 008 Type: IAX     Subclass: PONG
    Timestamp: 21016ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    RR_JITTER       : 0
    RR_LOSS         : 0
    RR_PKTS         : 1
    RR_DELAY        : 40
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Tx-Frame Retry[-01] -- OSeqno: 008 ISeqno: 012 Type: IAX     Subclass: ACK
    Timestamp: 21016ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 012 ISeqno: 008 Type: IAX     Subclass: PING
    Timestamp: 21004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 008 ISeqno: 013 Type: IAX     Subclass: PONG
    Timestamp: 21004ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    RR_JITTER       : 2
    RR_LOSS         : 0
    RR_PKTS         : 788
    RR_DELAY        : 42
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Rx-Frame Retry[ No] -- OSeqno: 013 ISeqno: 009 Type: IAX     Subclass: ACK
    Timestamp: 21004ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 009 ISeqno: 013 Type: IAX     Subclass: LAGRQ
    Timestamp: 30017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 013 ISeqno: 010 Type: IAX     Subclass: LAGRP
    Timestamp: 30017ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 010 ISeqno: 014 Type: IAX     Subclass: ACK
    Timestamp: 30017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 014 ISeqno: 010 Type: IAX     Subclass: LAGRQ
    Timestamp: 30003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 010 ISeqno: 015 Type: IAX     Subclass: LAGRP
    Timestamp: 30003ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 015 ISeqno: 011 Type: IAX     Subclass: ACK
    Timestamp: 30003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 011 ISeqno: 015 Type: IAX     Subclass: LAGRQ
    Timestamp: 40017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 015 ISeqno: 012 Type: IAX     Subclass: LAGRP
    Timestamp: 40017ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 012 ISeqno: 016 Type: IAX     Subclass: ACK
    Timestamp: 40017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 016 ISeqno: 012 Type: IAX     Subclass: LAGRQ
    Timestamp: 40003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 012 ISeqno: 017 Type: IAX     Subclass: LAGRP
    Timestamp: 40003ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 017 ISeqno: 013 Type: IAX     Subclass: ACK
    Timestamp: 40003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00003ms  SCall: 02474  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: CTOKEN
    Timestamp: 00003ms  SCall: 00001  DCall: 02474 208.100.60.17:4569
    CALLTOKEN       : 51 bytes

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00038ms  SCall: 02474  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    CALLTOKEN       : 51 bytes

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REGAUTH
    Timestamp: 00014ms  SCall: 10823  DCall: 02474 208.100.60.17:4569
    AUTHMETHODS     : 3
    CHALLENGE       : \x31\x39\x36\x36\x32\x33\x38\x38\x31
    USERNAME        : 999999_444525

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: REGREQ
    Timestamp: 00073ms  SCall: 02474  DCall: 10823 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    MD5 RESULT      : 77474896437634f2fdc11e85ab1b2f3f

Tx-Frame Retry[000] -- OSeqno: 013 ISeqno: 017 Type: IAX     Subclass: PING
    Timestamp: 42017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 017 ISeqno: 014 Type: IAX     Subclass: PONG
    Timestamp: 42017ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    RR_JITTER       : 0
    RR_LOSS         : 0
    RR_PKTS         : 1
    RR_DELAY        : 40
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Tx-Frame Retry[-01] -- OSeqno: 014 ISeqno: 018 Type: IAX     Subclass: ACK
    Timestamp: 42017ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 018 ISeqno: 014 Type: IAX     Subclass: PING
    Timestamp: 42003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 014 ISeqno: 019 Type: IAX     Subclass: PONG
    Timestamp: 42003ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    RR_JITTER       : 2
    RR_LOSS         : 0
    RR_PKTS         : 1838
    RR_DELAY        : 42
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Rx-Frame Retry[ No] -- OSeqno: 019 ISeqno: 015 Type: IAX     Subclass: ACK
    Timestamp: 42003ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
    Timestamp: 00637ms  SCall: 10823  DCall: 02474 208.100.60.17:4569
    USERNAME        : 999999_444525
    DATE TIME       : 2023-12-22  07:36:24
    REFRESH         : 60
    APPARENT ADDRES : IPV4 71.82.31.81:4570
    CALLING NUMBER  : 2568254471

Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK
    Timestamp: 00637ms  SCall: 02474  DCall: 10823 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 015 ISeqno: 019 Type: IAX     Subclass: LAGRQ
    Timestamp: 50018ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 019 ISeqno: 016 Type: IAX     Subclass: LAGRP
    Timestamp: 50018ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 016 ISeqno: 020 Type: IAX     Subclass: ACK
    Timestamp: 50018ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 020 ISeqno: 016 Type: IAX     Subclass: LAGRQ
    Timestamp: 50002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 016 ISeqno: 021 Type: IAX     Subclass: LAGRP
    Timestamp: 50002ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 021 ISeqno: 017 Type: IAX     Subclass: ACK
    Timestamp: 50002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 017 ISeqno: 021 Type: IAX     Subclass: LAGRQ
    Timestamp: 60019ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 021 ISeqno: 018 Type: IAX     Subclass: LAGRP
    Timestamp: 60019ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 018 ISeqno: 022 Type: IAX     Subclass: ACK
    Timestamp: 60019ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 022 ISeqno: 018 Type: IAX     Subclass: LAGRQ
    Timestamp: 60002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 018 ISeqno: 023 Type: IAX     Subclass: LAGRP
    Timestamp: 60002ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 023 ISeqno: 019 Type: IAX     Subclass: ACK
    Timestamp: 60002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 019 ISeqno: 023 Type: IAX     Subclass: PING
    Timestamp: 63018ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 023 ISeqno: 020 Type: IAX     Subclass: PONG
    Timestamp: 63018ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    RR_JITTER       : 0
    RR_LOSS         : 0
    RR_PKTS         : 1
    RR_DELAY        : 40
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Tx-Frame Retry[-01] -- OSeqno: 020 ISeqno: 024 Type: IAX     Subclass: ACK
    Timestamp: 63018ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 024 ISeqno: 020 Type: IAX     Subclass: PING
    Timestamp: 63002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 020 ISeqno: 025 Type: IAX     Subclass: PONG
    Timestamp: 63002ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    RR_JITTER       : 2
    RR_LOSS         : 0
    RR_PKTS         : 2888
    RR_DELAY        : 42
    RR_DROPPED      : 0
    RR_OUTOFORDER   : 0

Rx-Frame Retry[ No] -- OSeqno: 025 ISeqno: 021 Type: IAX     Subclass: ACK
    Timestamp: 63002ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 021 ISeqno: 025 Type: IAX     Subclass: LAGRQ
    Timestamp: 70019ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 025 ISeqno: 022 Type: IAX     Subclass: LAGRP
    Timestamp: 70019ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[-01] -- OSeqno: 022 ISeqno: 026 Type: IAX     Subclass: ACK
    Timestamp: 70019ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 026 ISeqno: 022 Type: IAX     Subclass: LAGRQ
    Timestamp: 70001ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 022 ISeqno: 027 Type: IAX     Subclass: LAGRP
    Timestamp: 70001ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 027 ISeqno: 023 Type: IAX     Subclass: ACK
    Timestamp: 70001ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
Rx-Frame Retry[ No] -- OSeqno: 027 ISeqno: 023 Type: IAX     Subclass: HANGUP
    Timestamp: 70688ms  SCall: 13562  DCall: 05103 208.100.60.17:4569
    CAUSE CODE      : 16

Tx-Frame Retry[-01] -- OSeqno: 023 ISeqno: 028 Type: IAX     Subclass: ACK
    Timestamp: 70688ms  SCall: 05103  DCall: 13562 208.100.60.17:4569
    -- Channel IAX2/voipms-5103 left 'simple_bridge' basic-bridge <714bddc7-b9a4-4dda-bd3a-bce9178c6dd8>
    -- Channel DAHDI/pseudo-1445056746 left 'simple_bridge' basic-bridge <714bddc7-b9a4-4dda-bd3a-bce9178c6dd8>
    -- Hungup 'IAX2/voipms-5103'
  == Spawn extension (autopatch, 2569999999, 1) exited non-zero on 'DAHDI/pseudo-1445056746'
    -- Hungup 'DAHDI/pseudo-1445056746'
       > Received OK from Echolink server nasouth.echolink.org.
       > Directory completed downloading(partial,compressed), 664 records.
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00017ms  SCall: 00197  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: CTOKEN
    Timestamp: 00017ms  SCall: 00001  DCall: 00197 208.100.60.17:4569
    CALLTOKEN       : 51 bytes

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00052ms  SCall: 00197  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    CALLTOKEN       : 51 bytes

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REGAUTH
    Timestamp: 00008ms  SCall: 02323  DCall: 00197 208.100.60.17:4569
    AUTHMETHODS     : 3
    CHALLENGE       : \x31\x33\x31\x32\x39\x36\x33\x31\x37
    USERNAME        : 999999_444525

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: REGREQ
    Timestamp: 00087ms  SCall: 00197  DCall: 02323 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    MD5 RESULT      : 62203c231a2ac526e9cae2ce45769c2b

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
    Timestamp: 00043ms  SCall: 02323  DCall: 00197 208.100.60.17:4569
    USERNAME        : 999999_444525
    DATE TIME       : 2023-12-22  07:37:14
    REFRESH         : 60
    APPARENT ADDRES : IPV4 71.82.31.81:4570
    CALLING NUMBER  : 2568254471

Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK
    Timestamp: 00043ms  SCall: 00197  DCall: 02323 208.100.60.17:4569
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00003ms  SCall: 05913  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: CTOKEN
    Timestamp: 00003ms  SCall: 00001  DCall: 05913 208.100.60.17:4569
    CALLTOKEN       : 51 bytes

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
    Timestamp: 00038ms  SCall: 05913  DCall: 00000 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    CALLTOKEN       : 51 bytes

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REGAUTH
    Timestamp: 00013ms  SCall: 00392  DCall: 05913 208.100.60.17:4569
    AUTHMETHODS     : 3
    CHALLENGE       : \x31\x32\x39\x34\x34\x38\x31\x36\x36
    USERNAME        : 999999_444525

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: REGREQ
    Timestamp: 00072ms  SCall: 05913  DCall: 00392 208.100.60.17:4569
    USERNAME        : 999999_444525
    REFRESH         : 60
    MD5 RESULT      : 5ddf4871152ec85f182b791fd66ac4d5

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: REGACK
    Timestamp: 00047ms  SCall: 00392  DCall: 05913 208.100.60.17:4569
    USERNAME        : 999999_444525
    DATE TIME       : 2023-12-22  07:38:04
    REFRESH         : 60
    APPARENT ADDRES : IPV4 71.82.31.81:4570
    CALLING NUMBER  : 2568254471

Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK
    Timestamp: 00047ms  SCall: 05913  DCall: 00392 208.100.60.17:4569
InterLinked1 commented 9 months ago

A full backtrace is needed.

K2IE commented 2 months ago

I believe this may relate to my issue with autopatch in ASL 3.0. Here are some observations:

Issue 1 – Calls dialed out over IAX to my pbx were failing because bridge technology is not available. Solution was to load simple_bridge.so.

Issue 2 – Calls answers on the pbx extension pass no audio.

Issue 3 – Once answered, my simplex node remains in transmit state. No audio is passed from the radio to the pbx extension. Hanging up the pbx extension does not take the radio out of transmit mode. Asterisk must be stopped and then the radio goes back to receive mode.

mkmer commented 2 months ago

Shouldn't we unlock the mutex before this call? Not sure this is the deadlock or not, but inside the function call we are again trying to lock the already locked mutex. https://github.com/AllStarLink/app_rpt/blob/67c6a63081dd06a9be2a061e50f947ce9e1b1bb7/apps/app_rpt.c#L1381

KB4MDD commented 2 months ago

@InterLinked1 thought this was a deadlock issue. I have a sip provider setup on my system, I however have not had a chance to get a dump to check on the deadlock.

I will try to do that tomorrow and see if I can identify the deadlock.

mkmer commented 2 months ago

I think you can force the deadlock simply by bringing up the autopatch to a local extension as described in #358 . Even if the extension only has `n, Hangup() the app goes out to lunch. I believe they are related.

KB4MDD commented 2 months ago

You did find a problem, but there are others. I am recompiling changes now.

KB4MDD commented 2 months ago

More debugging information:

=== Thread ID: 0x7fbaae0cf6c0 LWP:173361 (rpt                  started at [ 5692] app_rpt.c rpt_master())
=== ---> Waiting for Lock #0 (app_rpt.c): MUTEX 5357 rpt &myrpt->lock 0x7fbaf087a260
===      478098:15:16.229956, 00:00:00.000000, 00:00:17.398070 (1, 1)
        [0x557d251fd7e0] asterisk lock.c:273 __ast_pthread_mutex_lock()
        [0x7fbaf085e6c6] app_rpt.so rpt_telemetry.c:2550 rpt_tele_thread()
        [0x557d252d4bfc] asterisk utils.c:1607 dummy_start()
        [0x7fbaf441d044] libc.so.6 pthread_create.c:442 start_thread()
        [0x7fbaf449d61c] libc.so.6 clone3.S:83 clone3()
=== --- ---> Locked Here: app_rpt.c line 1341 (rpt_call)
=== -------------------------------------------------------------------
===
=== Thread ID: 0x7fbaf1c0b6c0 LWP:173373 (rpt_call             started at [  981] app_rpt/rpt_functions.c function_autopatchup())
=== ---> Lock #0 (app_rpt.c): MUTEX 1341 rpt_call &myrpt->lock 0x7fbaf087a260
===      478098:15:16.228639, 00:00:00.000000, 00:00:17.868313 (1, 1)
        [0x557d251fd7e0] asterisk lock.c:273 __ast_pthread_mutex_lock()
        [0x7fbaf0808fa7] app_rpt.so app_rpt.c:1342 rpt_call()
        [0x557d252d4bfc] asterisk utils.c:1607 dummy_start()
        [0x7fbaf441d044] libc.so.6 pthread_create.c:442 start_thread()
        [0x7fbaf449d61c] libc.so.6 clone3.S:83 clone3()
=== -------------------------------------------------------------------
===
=== Thread ID: 0x7fbaf1d056c0 LWP:173374 (rpt_tele_thread      started at [ 2923] app_rpt/rpt_telemetry.c rpt_telemetry())
=== ---> Waiting for Lock #0 (app_rpt/rpt_telemetry.c): MUTEX 2549 rpt_tele_thread &myrpt->lock 0x7fbaf087a260
===      478098:15:18.309725, 478098:15:18.309535, 00:00:16.083308 (1, 1)
        [0x557d251fd7e0] asterisk lock.c:273 __ast_pthread_mutex_lock()
        [0x7fbaf085e6c6] app_rpt.so rpt_telemetry.c:2550 rpt_tele_thread()
        [0x557d252d4bfc] asterisk utils.c:1607 dummy_start()
        [0x7fbaf441d044] libc.so.6 pthread_create.c:442 start_thread()
        [0x7fbaf449d61c] libc.so.6 clone3.S:83 clone3()
=== --- ---> Locked Here: app_rpt.c line 1341 (rpt_call)
KB4MDD commented 2 months ago
[2024-07-16 13:15:14.771] DEBUG[173361]: app_rpt/rpt_telemetry.c:381 cancel_pfxtone: cancel_pfxfone!!
[2024-07-16 13:15:14.772] DEBUG[173361]: app_rpt.c:1432 collect_function_digits: digits=6  source=0
[2024-07-16 13:15:14.903] DEBUG[173361]: app_rpt/rpt_telemetry.c:381 cancel_pfxtone: cancel_pfxfone!!
[2024-07-16 13:15:14.903] DEBUG[173361]: app_rpt.c:1432 collect_function_digits: digits=61  source=0
[2024-07-16 13:15:14.903] DEBUG[173361]: app_rpt.c:1484 collect_function_digits: @@@@ action: autopatchup, param = noct = 1,farenddisconnect = 1,dialtime = 20000,context = autopatch
[2024-07-16 13:15:14.904] DEBUG[173361]: app_rpt.c:1490 collect_function_digits: @@@@ table index i = 1
[2024-07-16 13:15:14.904] DEBUG[173361]: app_rpt/rpt_functions.c:905 function_autopatchup: @@@@ Autopatch up
[2024-07-16 13:15:14.904] DEBUG[173361]: app_rpt.c:1502 collect_function_digits: rv=3
[2024-07-16 13:15:14.907] DEBUG[173373]: app_rpt.c:1181 rpt_call: Requested channel DAHDI/pseudo-326500165
[2024-07-16 13:15:14.907] DEBUG[173373]: app_rpt/rpt_call.c:32 rpt_disable_cdr: No CDR present on DAHDI/pseudo-326500165
[2024-07-16 13:15:14.910] DEBUG[173373]: app_rpt.c:1198 rpt_call: Requested channel DAHDI/pseudo-520732042
[2024-07-16 13:15:14.910] DEBUG[173373]: app_rpt/rpt_call.c:32 rpt_disable_cdr: No CDR present on DAHDI/pseudo-520732042
[2024-07-16 13:15:16.195] DEBUG[173361]: app_rpt/rpt_telemetry.c:2613 rpt_telemetry: Tracepoint rpt_telemetry() entered mode=1
[2024-07-16 13:15:16.195] DEBUG[173361]: app_rpt/rpt_telemetry.c:2613 rpt_telemetry: Tracepoint rpt_telemetry() entered mode=46
[2024-07-16 13:15:16.196] DEBUG[173361]: app_rpt/rpt_telemetry.c:2930 rpt_telemetry: Tracepoint rpt_telemetry() exit
[2024-07-16 13:15:16.199] DEBUG[173374]: app_rpt/rpt_telemetry.c:1028 rpt_tele_thread: Requested channel DAHDI/pseudo-1428510647
[2024-07-16 13:15:16.200] DEBUG[173374]: app_rpt/rpt_call.c:32 rpt_disable_cdr: No CDR present on DAHDI/pseudo-1428510647
[2024-07-16 13:15:16.200] DEBUG[173374]: app_rpt/rpt_telemetry.c:1036 rpt_tele_thread: Queued telemetry, active_telem = (nil), mytele = 0x7fbab4082db0
[2024-07-16 13:15:16.200] DEBUG[173374]: app_rpt/rpt_telemetry.c:1056 rpt_tele_thread: Beginning telemetry, active_telem = 0x7fbab4082db0, mytele = 0x7fbab4082db0
[2024-07-16 13:15:16.200] DEBUG[173374]: app_rpt/rpt_channel.c:56 wait_interval: Delay interval = 1000
[2024-07-16 13:15:17.251] DEBUG[173374]: app_rpt/rpt_channel.c:60 wait_interval: Delay complete
KB4MDD commented 2 months ago

Discussing the following code with @InterLinked1 👍

        /* put vox channel monitoring on the channel  */
        if (dahdi_conf_add(myrpt->voxchannel, res, DAHDI_CONF_MONITOR)) {
                ast_hangup(mychannel);
                return -1;
        }

This goes to

static int __join_dahdiconf(struct ast_channel *chan, struct dahdi_confinfo *ci, const char *file, int line, const char *function)
{
    ci->chan = 0;

    /* First put the channel on the conference in proper mode */
    if (ioctl(ast_channel_fd(chan, 0), DAHDI_SETCONF, ci) == -1) {
        ast_log(LOG_WARNING, "%s:%d (%s) Unable to set conference mode on %s\n", file, line, function, ast_channel_name(chan));
        return -1;
    }
    return 0;

The ioctl call is hanging.

KB4MDD commented 2 months ago

I have a fresh locks and backtrace. The lock is on thread id 0x7fcaef1ff6c0 - the backtrace does not show that thread.

locks.txt backtrace.txt

mkmer commented 2 months ago

This is probably my lack of understanding showing here, but why are we mutex locking for so long (amount of code) in this area? https://github.com/AllStarLink/app_rpt/blob/67c6a63081dd06a9be2a061e50f947ce9e1b1bb7/apps/app_rpt.c#L1341-L1409

Usually one only locks things that 2 threads can change while changing "stuff", but I don't see a lot changing in this chunk of code. Do we need to freeze all of the vars for the tests in here? Things like https://github.com/AllStarLink/app_rpt/blob/67c6a63081dd06a9be2a061e50f947ce9e1b1bb7/apps/app_rpt.c#L1344-L1345 are called while the lock is in place.

KB4MDD commented 2 months ago

cli_channels.txt cli_threads.txt cli_locks.txt core-asterisk-running-2024-07-17T13-03-10Z-brief.txt core-asterisk-running-2024-07-17T13-03-10Z-full.txt core-asterisk-running-2024-07-17T13-03-10Z-info.txt core-asterisk-running-2024-07-17T13-03-10Z-locks.txt

KB4MDD commented 2 months ago

Looks like we are getting an invalid conference number when joining to the vox channel.

DAHDI/pseudo-2088963636 conference: 32779

Looking inside DAHDI, the conference number maximum is 1024.

KB4MDD commented 2 months ago

The problem is associated with getting the vox channel to join the conference. When I remove the code for the vox channel, the patch comes up and everything works properly. Disconnect worked also.

KB4MDD commented 2 months ago

I now have this working. I am consulting on the changes.

Allan-N commented 2 months ago

The fix for this issue has been incorporated into ASL3-Asterisk 20.9.1+asl3-3.0.4-1