inbound and internal works. But how on earth should i configure outbound.

JoakimU

New Member
Mar 29, 2021
8
0
1
51
Hi! I'm a total newbie with Fusion, coming from Avaya IPO and FreePBX.

FreePBX was quite easy to set up as a branch(with no external trunks) behind an Avaya IPO.
The Fusion Outbound dial plan leads me to conFusion, so to speak..

(The reason I left FreePBX is the ever recurrent loss of WebServer/Web admin where it eventually didn't help to reboot the server. Fusion seems stable.)

I wonder how I should configure outbound in my lab? None of my efforts has actually made a call use an outbound route.

This setup may be more basic than the most basic: ----SIP-provider---[Avaya PBX]----internal-line----[FusionPBX]---☎

I just want any calls except the internal stuff starting with 8xxxx to hit the outbound: All other dialing rules will be covered by the other PBX which have the public lines.
If I call 1234 or 1234567890 or 98765432 or 54321... - any call that doesn't start with 8xxx from a Fusion extension should just shove it to the trunk to the other PBX?
  • No problem registering phones to fusion, I use 4 digit extensions: 8200 - 8299.
  • No problem calling between internal extensions.
  • Successfully tried both External and Internal SIP profiles without registration. between Fusion and IPO
  • The Gateway is status running, noreg. Proxy is on the same subnet as the Fusion.
  • No problem routing inbound calls from the Avaya PBX to Fusion extensions.
None of the selectable outbound Dial expressions will do it. How sould I set it up? The Log viewer says Regex (Fail) no matter what I do.

Help appreciated :)
 

Adrian Fretwell

Active Member
Aug 13, 2017
766
190
43
Some regex that will do what you ask for the outbound route could be:
Code:
^(?:([0-7,9]\d+|8\d{3}\d+))$

I assume you would want extensions to be able to dial * (star) codes like *97 for voicemail.
 

JoakimU

New Member
Mar 29, 2021
8
0
1
51
Thanks Adrian. Haven't much knowledge of regex but starting to grasp it..
However. I Spent hours trying to get anything out but nothing works. Incoming and internal works though.

For some reason my external sip profile became broken. compared it to FusionPBX docs but still invalid when rescan external.

I will reinstall a completely new virtual machine and start over
 
Last edited:

KitchM

Member
Jul 15, 2019
158
3
18
Please keep in mind that FusionPBX is a web interface for FreeSWITCH. Also, after your fresh install, keep in mind that there are a lot of defaults in the configuration which you may want to stick with. My recommendation is to start with the basic settings before you change them.

Your gateway must show that it is registered with the letters REGED. This is primary.

When you are having trouble with the dialing digits, see what it takes to dial a call sucessfully with what you have, and only after that should you attempt to change the dialing pattern.

Best of luck.
 

JoakimU

New Member
Mar 29, 2021
8
0
1
51
Reinstalled the server (Centos7) and FusionPBX. Still I can't get calls out: entering state [terminated][408]
My gateway is set to register: False and running with state NOREG, because this is a test setup between 2 PBXes.
This is a network problem, I suspect. Both PBX are on the same subnet. No invites arrive at the receiving PBX.



Dialplan: sofia/internal/8201@10.215.212.119:5060 parsing [10.215.212.119->FusionOutToIPO.079d8d3d] continue=false
Dialplan: sofia/internal/8201@10.215.212.119:5060 Regex (PASS) [FusionOutToIPO.079d8d3d] ${user_exists}(false) =~ /false/ break=on-false
Dialplan: sofia/internal/8201@10.215.212.119:5060 Regex (PASS) [FusionOutToIPO.079d8d3d] destination_number(7046) =~ /^(?:([0-7,9]\d+|8\d{3}\d+))$/ break=on-false
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(sip_h_X-accountcode=${accountcode})
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action export(call_direction=outbound)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action unset(call_timeout)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(hangup_after_bridge=true)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(effective_caller_id_name=${outbound_caller_id_name})
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(effective_caller_id_number=${outbound_caller_id_number})
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(inherit_codec=true)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(ignore_display_updates=true)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(callee_id_number=7046)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action set(continue_on_fail=true)
Dialplan: sofia/internal/8201@10.215.212.119:5060 Action bridge(sofia/gateway/29c8e7d8-9f20-458f-aa62-cbe1f636564e/7046)
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:287 (sofia/internal/8201@10.215.212.119:5060) State Change CS_ROUTING -> CS_EXECUTE
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:644 (sofia/internal/8201@10.215.212.119:5060) State ROUTING going to sleep
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:585 (sofia/internal/8201@10.215.212.119:5060) Running State Change CS_EXECUTE (Cur 1 Tot 74)
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:651 (sofia/internal/8201@10.215.212.119:5060) State EXECUTE
2021-04-07 17:40:40.297816 [DEBUG] mod_sofia.c:209 sofia/internal/8201@10.215.212.119:5060 SOFIA EXECUTE
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:329 sofia/internal/8201@10.215.212.119:5060 Standard EXECUTE
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(caller_id_number=8201)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [caller_id_number]=[8201]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(RFC2822_DATE=Wed, 07 Apr 2021 17:40:40 -0400)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [RFC2822_DATE]=[Wed, 07 Apr 2021 17:40:40 -0400]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 export(origination_callee_id_name=7046)
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1310 EXPORT (export_vars) [origination_callee_id_name]=[7046]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 hash(insert/10.215.212.119-last_dial/8201/7046)
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(sip_h_X-accountcode=)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [sip_h_X-accountcode]=[UNDEF]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 export(call_direction=outbound)
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1310 EXPORT (export_vars) [call_direction]=[outbound]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 unset(call_timeout)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1830 UNSET [call_timeout]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(hangup_after_bridge=true)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [hangup_after_bridge]=[true]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(effective_caller_id_name=FusionPBX Jocke)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [effective_caller_id_name]=[FusionPBX Jocke]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(effective_caller_id_number=8201)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [effective_caller_id_number]=[8201]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(inherit_codec=true)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [inherit_codec]=[true]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(ignore_display_updates=true)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [ignore_display_updates]=[true]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(callee_id_number=7046)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [callee_id_number]=[7046]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 set(continue_on_fail=true)
2021-04-07 17:40:40.297816 [DEBUG] mod_dptools.c:1685 SET sofia/internal/8201@10.215.212.119:5060 [continue_on_fail]=[true]
EXECUTE [depth=0] sofia/internal/8201@10.215.212.119:5060 bridge(sofia/gateway/29c8e7d8-9f20-458f-aa62-cbe1f636564e/7046)
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1264 sofia/internal/8201@10.215.212.119:5060 EXPORTING[export_vars] [domain_name]=[10.215.212.119] to event
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1264 sofia/internal/8201@10.215.212.119:5060 EXPORTING[export_vars] [call_direction]=[outbound] to event
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1264 sofia/internal/8201@10.215.212.119:5060 EXPORTING[export_vars] [origination_callee_id_name]=[7046] to event
2021-04-07 17:40:40.297816 [DEBUG] switch_channel.c:1264 sofia/internal/8201@10.215.212.119:5060 EXPORTING[export_vars] [call_direction]=[outbound] to event
2021-04-07 17:40:40.297816 [DEBUG] switch_ivr_originate.c:2272 Parsing global variables
2021-04-07 17:40:40.297816 [NOTICE] switch_channel.c:1118 New Channel sofia/external/7046 [e0c21e6e-b04a-4c4b-883a-1d3b0b0890c9]
2021-04-07 17:40:40.297816 [DEBUG] mod_sofia.c:5102 (sofia/external/7046) State Change CS_NEW -> CS_INIT
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:585 (sofia/external/7046) Running State Change CS_INIT (Cur 2 Tot 75)
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:628 (sofia/external/7046) State INIT
2021-04-07 17:40:40.297816 [DEBUG] mod_sofia.c:93 sofia/external/7046 SOFIA INIT
2021-04-07 17:40:40.297816 [DEBUG] sofia_glue.c:1590 sip:10.215.212.219:5080 Setting proxy route to sofia/external/7046
2021-04-07 17:40:40.297816 [INFO] sofia_glue.c:1621 sofia/external/7046 sending invite call-id: (null)
2021-04-07 17:40:40.297816 [DEBUG] sofia_glue.c:1624 sofia/external/7046 sending invite version: 1.10.6 -release.12 64bit
Local SDP:
v=0
o=FreeSWITCH 1617808180 1617808181 IN IP4 10.215.212.119
s=FreeSWITCH
c=IN IP4 10.215.212.119
t=0 0
m=audio 23460 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:eek:ff - - - -
a=ptime:20
a=sendrecv
e0c21e6e-b04a-4c4b-883a-1d3b0b0890c9
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:40 sofia/external/7046 Standard INIT
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:48 (sofia/external/7046) State Change CS_INIT -> CS_ROUTING
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:628 (sofia/external/7046) State INIT going to sleep
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:585 (sofia/external/7046) Running State Change CS_ROUTING (Cur 2 Tot 75)
2021-04-07 17:40:40.297816 [DEBUG] sofia.c:7406 Channel sofia/external/7046 entering state [calling][0]
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:644 (sofia/external/7046) State ROUTING
2021-04-07 17:40:40.297816 [DEBUG] mod_sofia.c:154 sofia/external/7046 SOFIA ROUTING
2021-04-07 17:40:40.297816 [DEBUG] switch_ivr_originate.c:67 (sofia/external/7046) State Change CS_ROUTING -> CS_CONSUME_MEDIA
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:644 (sofia/external/7046) State ROUTING going to sleep
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:585 (sofia/external/7046) Running State Change CS_CONSUME_MEDIA (Cur 2 Tot 75)
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:663 (sofia/external/7046) State CONSUME_MEDIA
2021-04-07 17:40:40.297816 [DEBUG] switch_core_state_machine.c:663 (sofia/external/7046) State CONSUME_MEDIA going to sleep
2021-04-07 17:41:12.297823 [DEBUG] sofia.c:7406 Channel sofia/external/7046 entering state [terminated][408]
2021-04-07 17:41:12.297823 [NOTICE] sofia.c:8641 Hangup sofia/external/7046 [CS_CONSUME_MEDIA] [RECOVERY_ON_TIMER_EXPIRE]
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:585 (sofia/external/7046) Running State Change CS_HANGUP (Cur 2 Tot 75)
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:848 (sofia/external/7046) Callstate Change DOWN -> HANGUP
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:850 (sofia/external/7046) State HANGUP
2021-04-07 17:41:12.297823 [DEBUG] mod_sofia.c:453 Channel sofia/external/7046 hanging up, cause: RECOVERY_ON_TIMER_EXPIRE
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:60 sofia/external/7046 Standard HANGUP, cause: RECOVERY_ON_TIMER_EXPIRE
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:850 (sofia/external/7046) State HANGUP going to sleep
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:620 (sofia/external/7046) State Change CS_HANGUP -> CS_REPORTING
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:585 (sofia/external/7046) Running State Change CS_REPORTING (Cur 2 Tot 75)
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:936 (sofia/external/7046) State REPORTING
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:174 sofia/external/7046 Standard REPORTING, cause: RECOVERY_ON_TIMER_EXPIRE
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:936 (sofia/external/7046) State REPORTING going to sleep
2021-04-07 17:41:12.297823 [DEBUG] switch_core_state_machine.c:611 (sofia/external/7046) State Change CS_REPORTING -> CS_DESTROY
2021-04-07 17:41:12.297823 [DEBUG] switch_core_session.c:1736 Session 75 (sofia/external/7046) Locked, Waiting on external entities
2021-04-07 17:41:12.317823 [DEBUG] switch_ivr_originate.c:4026 Originate Resulted in Error Cause: 102 [RECOVERY_ON_TIMER_EXPIRE]
2021-04-07 17:41:12.317823 [INFO] mod_dptools.c:3643 Originate Failed. Cause: RECOVERY_ON_TIMER_EXPIRE
 

Adrian Fretwell

Active Member
Aug 13, 2017
766
190
43
Your gateway must show that it is registered with the letters REGED. This is primary.
The Gateway will only show REGED if you are actually registering with the gateway, if the gateway does not require registration then the gateway will show NOREG. Please try not to confuse people with misleading information.
 

Adrian Fretwell

Active Member
Aug 13, 2017
766
190
43
@JoakimU Yes the 408 Request timeout would suggest that there may be a network problem. I would set up a packet capture to find out where the INVITES are going. sngrep is one of the easiest tools to use and is fine as long as your server is not too busy.
 
  • Like
Reactions: JoakimU

JoakimU

New Member
Mar 29, 2021
8
0
1
51
@JoakimU Yes the 408 Request timeout would suggest that there may be a network problem. I would set up a packet capture to find out where the INVITES are going. sngrep is one of the easiest tools to use and is fine as long as your server is not too busy.
Thanks, will check that.
 

JoakimU

New Member
Mar 29, 2021
8
0
1
51
@JoakimU Yes the 408 Request timeout would suggest that there may be a network problem. I would set up a packet capture to find out where the INVITES are going. sngrep is one of the easiest tools to use and is fine as long as your server is not too busy.
sngrep! Perfect tool! :D
 

JoakimU

New Member
Mar 29, 2021
8
0
1
51
Working now. Thank you!
Actually the 408 I don't know what solved it. After installing and running sngrep it suddenly disappeared..
(Then the next step was a 404 from the other PBX because I had no incoming routes for this trunk in the IPO. easliy soved.)
Now I can go on and explore the potential of FusionPBX!
 

ad5ou

Active Member
Jun 12, 2018
584
138
43
The pbx does not need a "REGED" gateway as you stated earlier. Which is what Adrian said.

Also note Freeswitch can in fact operate without a gateway setup. Others have told you so in the past.
 

KitchM

Member
Jul 15, 2019
158
3
18
@ad5ou , please provide references.

How does a person setup a connection with a SIP trunk provider if not using the FusionPBX Gateway configuration?
 

ad5ou

Active Member
Jun 12, 2018
584
138
43

KitchM

Member
Jul 15, 2019
158
3
18
Thank you for that. My mistake appears to be that when I noticed that the OP referenced Fusion, I did not assume manual configuration of FS. I should have also noted that the OP was communicating with another PBX instead of the provider. These things would make a difference.

@JoakimU , I'm sorry I misunderstood your setup. I did not mean to mislead you. By the way, do you feel that the Fusion interface does not provide everything you need in your specific situation?
 

JoakimU

New Member
Mar 29, 2021
8
0
1
51
Thank you for that. My mistake appears to be that when I noticed that the OP referenced Fusion, I did not assume manual configuration of FS. I should have also noted that the OP was communicating with another PBX instead of the provider. These things would make a difference.

@JoakimU , I'm sorry I misunderstood your setup. I did not mean to mislead you. By the way, do you feel that the Fusion interface does not provide everything you need in your specific situation?
No problem. In most cases a PBX is set up to connect with a provider, so I wasn't misled :). The reason for my Fusion-Avaya setup was mainly this:
  • I needed a quick and costless way to simulate municipal branch PBXes(from other vendors) behind a main PBX in the town hall, to investigate how to translate/convert SIP traffic from the branches(which are old and we cannot configure them or make test calls from) to reach town hall extensions as well as national and international numbers.
  • Also there are 3rd party voice servers, such as contact centers, callback booking systems for healthcare, car repair shops etc. - which some have strange behaviours that the installers refuse to think out of their boxes about to adjust or test. With a Fusion extension I can simulate that.
  • Another use case could be to help smaller existing customers with another PBX to expand extensions in warehouses and work shops without the need to buy expensive extension/endpoint licences in the main PBX (I can simulate licence free phantom/mobility extensions in the main PBX)
So I need a way to fire away calls with different flavors of From:/To:/Diversion:/PAI: from a sub-PBX to learn how to handle and convert it the best way possible in the main PBX. From what I've seen so far with the FusionPBX, It looks good. I'm just not accustomed to the interface yet,
 

KitchM

Member
Jul 15, 2019
158
3
18
Thank you very much for the explanation. It is refreshing to see such a well explained situation. It also gives us a view into the many possibilities others may face.

Realizing the limitations of one person's authority to make needed changes, sometimes working thru the issue by steps is the only way others will accept the changes. You have a very large project but you have found a cost-effective way to demonstrate new ways.

Your benefits are that using FreeSWITCH will eventually do all you want and make it possible to replace everything with one free program. It is infinitely expandable and adaptable to your needs.

I sympathize with you as to learning the FusionPBX interface. I have often found that very talented programmers are often not very good at understanding intuitive design as other would need it. It always reminds me of the CEO, who when asked about the tech support available for his software product, said that he figured that most people had never heard of the Maytag repairman. For those who never had, it was a television commercial where the repair man was the loneliest person in the world because the product never broke down. The CEO said that if designed correctly, there never was a need for help. I respect that man a lot and will never forget him.

Best of luck learning the system and solving your problems, and thank you very much for your explanation. I find the insight extremely useful.
 
  • Like
Reactions: JoakimU