Looking at the voipzoom website Instructions
http://www.voipzoom.com/en/instructions.html#call
Calling with VoipZoom
Please note that when you call a number (even if it's local) you should always dial 00 + countrycode + areacode + subscribernumber
Looks like dialling (+011 + 86 + 20 + 84220066) is incorrect
(sip:+
011862084220066@sip.voipzoom.com) Bad
your dialplan needs to dial (00 + 86 + 20 + 84220066)
(sip:
00862084220066@sip.voipzoom.com) Good
Here is a dialpan if your home is Chengdu in China.
This
viewtopic.php?f=5&t=1901&start=10 will show UK and Australia versions.
Chengdu in China planplan using voipzoom.com
Code: Select all
def E164num(nume164) # this section uses (86)China country code (028)Chengdu area and (00)international prefix
# you will need to change these rules in the following lines for your country.
if nume164 =~ /^00/ then
nume164 = nume164[2..50] # remove international prefix (00) 2 digits from front of number
else
nume164 = "86" + nume164[1..50] if nume164 =~ /^0/ # national number remove leading 0 add 86
nume164 = "8628" + nume164 if nume164.length == 8 # treat local number 8 digits as Chengdu number add 8628
nume164 = "86" + nume164 if !(nume164 =~ /^86/) # add 86 to remaining China numbers
end
sys.Log("Number in Enum E164 format +#{nume164}") # check this number in console output
return nume164
end
num = req.URI.User.to_s # get number eg. 87654321 A local Chengdu number
num = num.gsub(/[^0-9*#]/,'') # delete all but digits
numE164 = E164num(num) # Expand this number into E164 format eg. 862887654321
# dialout with voipzoom with its international (00)dialout prefix eg. 00862887654321
sys.Dial("00#{numE164}@voipzoom") # (sip:00862887654321@sip.voipzoom.com)
Using this dialplan someone in
Chengdu-China can dial Guangzhou-China with 02084220066 >> sip:
00862084220066@sip.voipzoom.com
Chengdu-China to Australia with 0061287654321 >> sip:
0061287654321@sip.voipzoom.com
neighbour in Chengdu-China with 87654321 >> sip:
00862887654321@sip.voipzoom.com