Dial-ringall-predial-hook max number error message when too many exenstions?

We are getting a strange garbled command on occasion and the command fails with an error when trying to ring all extensions in a ring group. This only seams to happen when the total number of extensions available climbs to a high number. The command appears to be truncating the end of the command smashing a part of the next command to it making the dial command fail.
It appears to my untrained eye something to do with a max string length issue.

Other than removing the number of extensions in the ring group, is there any way to solve this?
There is currently a maximum of 35 extensions in the ring group and it fails at around 33 extensions. We are trying to work with our customer in reducing the extensions but are looking for other options.

Having multiple extension behind the same NAT gateway appears to make the problem worse in that the “x-ast-orig-host” header gets added to the command string making it longer so perhaps there is something there could be done to work around the issue?

Here is an example of a failure. (I’ve replaced a bunch of the text with “…” to make it easier to read see what is going on:

… pbx.c: Executing [s@macro-dial:22] Dial(“SIP/…:0,40,HhrQ(NO_ANSWb(func-apply-sipheaders^s^1),”) in new stack
… app.c: Missing closing parenthesis for argument ‘Q’ in string ‘NO_ANSWb(func-apply-sipheaders^s^1),’

When it works the command looks like this:
… pbx.c: Executing [s@macro-dial:22] Dial(“SIP/…:0,40,HhrQ(NO_ANSWER)M(auto-blkvm)b(func-apply-sipheaders^s^1),”) in new stack

Here is the complete failure line with IP address replaced with x’s.

Blockquote

[2023-04-04 xx:xx:xx] VERBOSE[xxxxx][C-00000xxx] pbx.c: Executing [s@macro-dial:22] Dial(“Local/2479@from-internal-0000030d;2”, “PJSIP/2480/sip:[email protected]:3717;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2481/sip:[email protected]:3715;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2482/sip:[email protected]:3730;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2483/sip:[email protected]:3727;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2484/sip:[email protected]:3722;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2486/sip:[email protected]:3704;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2487/sip:[email protected]:3712;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2488/sip:[email protected]:3710;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2489/sip:[email protected]:3718;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2490/sip:[email protected]:3719;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2491/sip:[email protected]:3728;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2494/sip:[email protected]:3702;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2495/sip:[email protected]:3732;x-ast-orig-host=10.xx.xx.xx:5060&PJSIP/2433/sip:[email protected]:3700;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2440/sip:[email protected]:5060;x-ast-orig-host=10.x.x.xx:0&PJSIP/2700/sip:[email protected]:5060;x-ast-orig-host=192.xxx.x.xxx:0&PJSIP/2702/sip:[email protected]:18193;x-ast-orig-host=xxx.x.x.x:5060&PJSIP/2703/sip:[email protected]:1024;x-ast-orig-host=192.xxx.x.xx:0&PJSIP/2461/sip:[email protected]:3703;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2462/sip:[email protected]:3721;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2445/sip:[email protected]:5060&PJSIP/2493/sip:[email protected]:3701;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2492/sip:[email protected]:3720;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2709/sip:[email protected]:5060&PJSIP/2485/sip:[email protected]:3708;x-ast-orig-host=10.xx.xx.xx:0&PJSIP/2713/sip:[email protected]:5060;x-ast-orig-host=192.xxx.x.xx:0&PJSIP/2715/sip:[email protected]:5060;x-ast-orig-host=192.xxx.x.x:0&PJSIP/2716/sip:[email protected]:5060;x-ast-orig-host=10.x.x.xxx:0&PJSIP/2727/sip:[email protected]:5060;x-ast-orig-host=192.xx.xx.xxx:0&PJSIP/2718/sip:[email protected]:5060;x-ast-orig-host=10.x.x.xxx:0,40,HhrQ(NO_ANSWb(func-apply-sipheaders^s^1),”) in new stack
[2023-04-04 xx:xx:xx] WARNING[xxxxx][C-00000994] app.c: Missing closing parenthesis for argument ‘Q’ in string ‘NO_ANSWb(func-apply-sipheaders^s^1),’
[2023-04-04 xx:xx:xx] VERBOSE[xxxxx][C-00000994] app_macro.c: Spawn extension (macro-dial, s, 22) exited non-zero on 'Local/2479@from-internal-000003

Does this problem exist if you reduce the number of members in the ring group?

A contributory factor here will be that the devices are registering with the wrong contact address, so Asterisk is having to add the x-ast-orig-host parameter, making them longer.

Also. the ability to have multiple contacts with chan_pjsip, when used, which is probably always the case for FreePBX, means the dial string fragments are much longer than they would be for local devices on any other channel driver. If only the first contact were called for each extension, you would only need PJSIP/extension. without the /URI.

There will be string length limits here.

The best way of doing large ring groups is to use a queue. I actually thought that was what FreePBX did, but I seem to have been mistaken. Maybe it is a configurable option?

Thanks for the replies.

Yes: Or more accurate it is the number of phones that are currently reachable that are in the ring group.

I’ll have to go hunting. Could this be dependent on the version of freepbx? This is our oldest server and we have plans to update it but sadly that process is going to take a while to get done and I’m not even sure it would fix the issue. Free PBX 14.0.16.11

I agree entirely. But what does it mean the devices are registering with the wrong contact address? Are you just pointing out that they are behind a NAT and hence there is nothing really wrong with how the end points are registering as that is how it works, or are you saying that the end points are doing something wrong? I’ve already thought about creating a VPN into the customer to work around that but sadly for this specific customer, I don’t control the firewall and hence that will take time to work with various parties to get done.

They are probably behind NAT and aren’t taking steps to work out what their public address looks like, If they were Asterisk, the public address would be a configuration option.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.