Outbound route impact on inbound calls

Feb 1, 2017
41
3
8
108
I have 4-digit extensions and ring groups.
I want to dial out without a 9 prefix, anything 3+ digits.

^(\d{3,20})$

works for outbound, but it then seems to break inbound calls - anything inbound then is treated as outbound.

I know there are trivial workaround but is this the expected behaviour?
 
Check the sip_from_user variable and make sure it doesn't match one of your extensions via regex before testing the "^(\d{3,20})$" condition. This should work to bypass your outbound rule.

 
When I last played with fusion there was a global dialplan record called user_exists. This did many things but crucially it set a channel variable called ${from_user_exists}. All you need to to is check if this is true in your outbound route. (user_exists makes use of the sip_from_user variable that @pbxgeek mentioned above).

There are often many ways of achieving something, one other alternative may be to use the toll_allow variable to steer the outbound route selection.