0

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

Vladimir
  • 157
  • 2
  • 16

2 Answers2

1

Acordinly to your log thoose calls are DIFFERENT(PJSIP/MyTrunk-00000008 is not same as PJSIP/MyTrunk-00000001)

Use tcpdump or sip debug to see packet.

Likly your provider have setup - if no valid response from server - do recall.

P.S Try not use such providers. It is bad sign.

arheops
  • 15,544
  • 1
  • 21
  • 27
  • 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". Could you tell, why Freepbx (asterisk) creates multiple registrations at the same time. Thank you. Provider's screenshoot attached to original question – Vladimir Feb 18 '19 at 06:01
  • 1
    asterisk -rx "sip show registry". If more then 1, search in your config files. – arheops Feb 18 '19 at 07:47
  • Command "pjsip show registrations" showed only 1 registred (i use pjsip trunk). But the call still opens many channels – Vladimir Feb 18 '19 at 12:29
  • On the old FreePBX(10.13.66-8) the problem not was repeated. But I need a fresh version of FreePBX – Vladimir Feb 18 '19 at 12:33
  • Play with re-register timeout etc. Or just put Progress/Answer as first line in your dialplan. – arheops Feb 18 '19 at 17:42
  • 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 – Vladimir Feb 19 '19 at 07:23
0

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.

Vladimir
  • 157
  • 2
  • 16