Search code examples
asteriskfreepbxdialplan

Asterisk start dialpan many times at the same times


Please help understand out what's going on.
Asterisk starts dialpan many times for one input call.
I use Asterisk 15.4.0 (FreePBX 14.0.5.25),
My extensions_custom.conf:

[bpms_input]
exten => _[A-Za-z0-9]!,1,NoOp(>>>>>>>>>>>>>>>>>>>>>>Exten = ${EXTEN} CONTEXT = ${CONTEXT} DATE = ${DATETIME} STATUS = ${DIALSTATUS})
same => n,Wait(10)

Asterisk log:

  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000000", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000000", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000001", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000001", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000002", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000002", "10") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000003", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000003", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000004", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000004", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000005", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000005", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000006", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000006", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000007", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
  == Setting global variable 'SIPDOMAIN' to '192.168.2.11'
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000007", "10") in new stack
    -- Executing [MyTrunk@bpms_input:1] NoOp("PJSIP/MyTrunk-00000008", ">>>>>>>>>>>>>>>>>>>>>>Exten = MyTrunk CONTEXT = bpms_input DATE =  STATUS = ") in new stack
    -- Executing [MyTrunk@bpms_input:2] Wait("PJSIP/MyTrunk-00000008", "10") in new stack


Edited:
My provider answered to my request.
He says "3 Invitations were created by the 3 available active registrations. Each of the invitations to the line".
Screenshoot:
enter image description here

Additional info:
On the old FreePBX(10.13.66-8) the problem not was repeated. But I need a fresh version of FreePBX

Additional info 2:
I compare registration request from old and new FreePBX version. New version additional include parameter "line" to request's contact. The parameter value is automatically generated each time. While I can not disable sending this parameter. I create a trunk in the pjsip.registration_custom.conf file. But when specifying the parameter "line = no" asterisk full stops registration attempts


Solution

  • I needed to change the section

    [MyTrunk]
    type = registration
    

    I deleted the parameter

    line = yes
    

    Then the asterisk stopped seeing my trunk by

    pjsip show registrations
    

    I have removed the parameter from the same section.

    endpoint = MyTrunk
    

    Now all works.

    PS: This changes impossible create from UI FrePBX. I have to disable trunk from UI. Then i recreate sections (type=registration, type=identify, type=auth, type=endpoint, type=aor) in pjsip.registration_custom.conf

    PS2: Syntax

    [MyTrunk] (+)
    

    no work here.