UK Outbound rule using E.164 format


(Chris) #21

according to their website i’m connected

58

i can also make inbound calls ok


(Chris) #22

Here’s some more settings


(Jared Busch) #23

Why aren’t you use a pjsip trunk?

On your sipgate trunk prefix a +
I mean you can do it in the outbound route also, but if you get a different provider for backup, they might not need it.


#24

This looks like the 447950931734 was sent directly from the soft phone, so it didn’t match your Outbound Route.

Paste the complete log for a failing call (with SIP trace) at pastebin.freepbx.org and post the link here.


#25

Actually there are a couple of challenges you will need to address.

  1. You need to manipulate the outbound to strip the 9 and then determine if it is a national or international call.
  2. You need to add the 9 on inbound calls, otherwise the Missed Call list on the phone will not be able to redial any numbers.

To really understand how that should look you would need to get a trace of an Incoming Invite from the provider.

My provider does not want numbers in E164 format so my inbound manipulation looks like this:

root@freepbx:/etc/asterisk# cat extensions_custom.conf
[from-uk-addprefix]

exten => _X.,1,Verbose(2, "UK add 9 Prefix")
exten => _X.,2,Set(CALLERID(num)=9${CALLERID(num)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
include => from-pstn

;End of [from-uk-addprefix]

My guess is your carrier will return calls in E164 therefore you cannot just add a 9 like I have, you will first have to strip the + and then add the 9. You may need to get a bit fancier and check the origin number if its a +44 then strip +44 and add a 90 and do the same or international.

Your manipulation will look like this

+44. = strip +44 add 90
+. = strip + add 900

as well as set your trunk to use this new custom context.

For outbound calls you will need to use patterns that follow this logic.

900 - strip 900 and add a +
90 - strip 90 and add a +44

Then you have to ask your carrier how they handle emergency calls.

Do they want a 112 or a +112. The same holds true for special numbers.

I hope this helps.

  • Steve

#26

IMO dialing an initial 9 or other prefix has many problems and should be avoided if at all possible. You should be able to dial calls the same as from a local landline or mobile call. For example:

But then when forwarding to a mobile phone, you’d need to remove it again, so the outbound caller ID is in the format required by the trunking provider.

If your desk phone or app is smart about displaying numbers with spaces or dashes for easier reading, the 9 will mess that up.

If you absolutely must keep the 9 prefix, make sure that 999, 9999, 112 and 9112 all work.


(system) closed #27

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