Almost all numbers on google, emails, websites etc. have a plus (+) in front of them. Its tedious removing the + sometimes, it means you have to copy paste it into SIP client, and then minus the +.
Of course, for one call, this is easy and not a big deal. But for a lot of the time its tedious, some websites you struggle to copy on mobile etc…
I am just wondering, if this is such a common issue, is there an easy way to handle the +?
He’s giving the underlying Asterisk representation. I believe FreePBX always adds the _, itself.
Firstly many providers expect number to be in the + format, and nothing needs to be done, or the + actually needs to be added, when not present. Bur if not the case for your provider, and considering the case where all numbers are NANP numbers and they all start with the area code,
prefix; +
prepend: (empty)
match: NXXNXXXXXX
prefix, what needs to prefix the number for its to be recognized, but not included in the outgoing digits.
prepend, what has to be added in front of the outgoing number, but wasn’t provided by the user.
match, the format of the rest of the number, to be passed through, unchanged.
Thanks david so i was correct with the usage of prefix… haven’t used freepbx in a while (it runs too smoothly )
So ill have to double the number of match patterns, for each current one. Ill have to add another same one, but with a plus in the prefix, is that correct? To account for +123456789 and also 123456789?
Also dont most providers require e164 format which doesnt want a plus?
Not quite, e164 REQUIRES the + which is considered a ‘metacharacter’ which represents the internationdial prefix in your locale, 011 for the NANP mostly 001 for the rest of the world, For example Irelands countrycode is +353 and from the states you coud dial 011353xxxx… but from France 001353xxxx… . From Ireland, depending on your VSP you could leave off E164 and just dial the “national” prefix I believe 0 in Eire or perhaps 001353xxx… (leaving off the ‘national’ prefix )
If your provider will accept numbers beginning with +, you can just add a single pattern:
prepend: (leave blank), prefix: (leave blank), match pattern: +XXXXXXX.
If not, but they will accept numbers beginning with the country code, then:
prepend: (leave blank), prefix: +, match pattern: XXXXXXX.
If not, but they will accept 00 followed by the country code and number, even for domestic, then:
prepend: 00, prefix, +, match pattern: XXXXXXX.
If not (they require 0 plus areacode and number for domestic), then two patterns are needed:
prepend: 0, prefix: +353, match pattern: XXXXXXX.
prepend: 00, prefix: +, match pattern: XXXXXXX.
Thanks guys, I didnt know E.164 format requires a +.
To be honest a lot of my match patterns seems to work without any plus, unless I am looking at it wrong.
There are no ‘plus’ symbol in any of the trunk’s dial manipulation rules.
Many match patterns have no plus in the prepend: prefix: or match pattern:
Somehow it seems, dialling e.g. “353871234567” will diall irish numbers happily, but if you put in a +, e.g. ‘+353871234567’ , it will fail. I know now this is due to no match pattern having a plus, but somehow my SIP trunk provider is accepting numbers without a +?
It seems my SIP trunk provider wants us to send them without a +, so possibly I should add more match patterns which has a ‘+’ in the prefix
On their website they state their guidance for FreePBX outbound routes match pattern as one rule with
prepend: empty
prefix: empty
match pattern: ZXXXXXXX.
Anyway thank you, as you said, if they accept +, I can leave it within the match pattern, if they DONT accept it, I can add the + into the prefix, and it will match and remove the +.