dial plan help, im confused

Getting started with the SIP Sorcery
pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

dial plan help, im confused

Post by pokie » Wed Aug 31, 2011 4:36 am

i have been at this for a day and a half and the more i read, the more confused i get. i dont no code and am not good with computers, i have only a free sip sorcery acount so only one dial plan. i can recieve calls now with ss and ipkall and a Linksys PAP2T-NA as my ata. i can call out using google but i want to get a dial plan that alows me to just call out from my ata and phone. can someone please think of me as a five year old and try to explain how i put a dial plan that allows me to dial out without going to google. my ipkall number is 1-253-753-xxxx and i live in missouri with an 816 area code. thank you very much.

rick

pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

Re: dial plan help, im confused

Post by pokie » Wed Aug 31, 2011 5:09 am

oh and i might add i am not calling out side of the midwest so no international calls for me just want to keep in contact with my family and friends whom live outside my area for free. thanks again. rick

MikeTelis
Posts: 1582
Joined: Wed Jul 30, 2008 6:48 am

Re: dial plan help, im confused

Post by MikeTelis » Wed Aug 31, 2011 5:55 am

You can use this dialplan. Don't forget to click on "View raw file" before you copy it from the page. You'll only need to enter your area code (816) Google Voice credentials and CB_NUMBER (IPKall 1-253-xxx-xxxx), and then dialplan will be ready to use :)

pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

Re: dial plan help, im confused

Post by pokie » Thu Sep 01, 2011 2:57 am

im sorry to be a pain but i dont under stand any of this i went to the page and hit the veiw raw and got this
# Copyright(c) 2010 Mike Telis

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.

# Click "View raw file" in the lower right for the best copy/paste view

AREA_CODE = '717' # my area code
GV_USER = 'username@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = 'GV password' # my GV password
CB_NUMBER = '1aaaxxxyyyy' # my 11-digit SIP number (only one)

SPEED_DIAL = { # my speed dial numbers
'1' => '19879879876', # Mom
'123' => '12345678901', # Work
'45' => '17479876543', # Gizmo BFF
'411' => '8004664411', # Google 411
'266' => '4153767253@podlinez.com', # CNN Headlines
}

begin
sys.Log "** Call from #{req.Header.From} to #{req.URI.User} **"

if sys.Out # if outbound call
num = req.URI.User.to_s # Get a string copy of the number to dial

num = SPEED_DIAL[num] || num # Substitute with speed dial entry, if any

case num
when /@/ then sys.Dial num # URI dialing
when /^[2-9]\d{6}$/ # Local call, 7-digit number
num = '1'+ AREA_CODE + num # prefix it with country and area code
when /^[01]?([2-9]\d{9})/ # US number with or without country code
num = '1' + $1 # add country code and truncate number to 10-digit
when /^(011|00|\+)(\d{9,})/ # international number
num = '+' + $2 # GoogleVoiceCall works with '+' prefix only


else sys.Respond 603, 'Wrong number, check & dial again'
end

sys.Log "Calling #{num} via Google Voice"
sys.GoogleVoiceCall GV_USER, GV_PASS, CB_NUMBER, num, '.*', CB_NUMBER =~ /^1747/ ? 7 : 1, 30

else # sys.Out
sys.Dial "#{sys.Username}@local"
end

rescue
sys.Log("** Error: " + $!) unless $!.to_s =~ /Thread was being aborted./
end

and i have no idea what to copy and what to replace after i copy it. it says begain so i think i am supposed to copy this. but i dont know what to do after pasting it. or if i copied to much.

sys.Log "** Call from #{req.Header.From} to #{req.URI.User} **"

if sys.Out # if outbound call
num = req.URI.User.to_s # Get a string copy of the number to dial

num = SPEED_DIAL[num] || num # Substitute with speed dial entry, if any

case num
when /@/ then sys.Dial num # URI dialing
when /^[2-9]\d{6}$/ # Local call, 7-digit number
num = '1'+ AREA_CODE + num # prefix it with country and area code
when /^[01]?([2-9]\d{9})/ # US number with or without country code
num = '1' + $1 # add country code and truncate number to 10-digit
when /^(011|00|\+)(\d{9,})/ # international number
num = '+' + $2 # GoogleVoiceCall works with '+' prefix only


else sys.Respond 603, 'Wrong number, check & dial again'
end

sys.Log "Calling #{num} via Google Voice"
sys.GoogleVoiceCall GV_USER, GV_PASS, CB_NUMBER, num, '.*', CB_NUMBER =~ /^1747/ ? 7 : 1, 30

else # sys.Out
sys.Dial "#{sys.Username}@local"
end

rescue
sys.Log("** Error: " + $!) unless $!.to_s =~ /Thread was being aborted./
end


how much am i supposed to copy of this and were am i suppose to copy my info into it. i really dont no how to do this sorry for the trouble.

pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

Re: dial plan help, im confused

Post by pokie » Thu Sep 01, 2011 3:55 am

i tried to do the wizard and got this, can you tell me what i need to put into the dial plan

# your OUTGOING call processing.

sys.SetFromHeader("#{req.Header.From.FromName}", nil, nil) # Set Display Name from phone in CallerID

#**************************************************
# Simple outplan generated using mnipp-RubyWizard
# Thu, 01 Sep 2011 03:31:30 +0000 GMT/UTC
#**************************************************
# viewtopic.php?f=5&t=1901
#**************************************************
# >> googleVoice << is a name I used in my SIPSorcery SIP Provider settings for calls.
#**************************************************
# Settings to call via GoogleVoice Section
# http://www.sipsorcery.com/help/dialplans.html
# viewtopic.php?f=15&t=1962
#######################################################
Area = '816' # my USA area code
GV_USER = 'sampler****@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = '*****' # my GV password
CB_NUMBER = '253753****' # my 10-digit Callback number (or Gizmo5 11-digit)

# Use "googleVoice" in dialplan below to callout with these settings
def googleVoice(noprefix=0,replprefix="",gvnum=req.URI.User.to_s)
gvnum = replprefix + gvnum[noprefix..50]
case gvnum
when /^[2-9]\d{6}$/ # Local call, 7-digit number
gvnum = '1'+ Area + gvnum # prefix it with "1" country and ()area code
when /^[01]?([2-9]\d{9})/ # US number with or without "1" country code
gvnum = '1' + $1 # add country code and truncate number to 10-digit
when /^(011|00|\+)(\d{10,})$/ # International number
gvnum = '+' + $2 # GoogleVoiceCall works with '+' prefix only
else
sys.Log("Calling #{gvnum} via GoogleVoice")
sys.Respond(603,"Wrong number, check & dial again")
end
sys.Log("Calling #{gvnum} via GoogleVoice")
sys.GoogleVoiceCall(GV_USER, GV_PASS, CB_NUMBER, gvnum, '.*', CB_NUMBER =~ /^1747/ ? 7 : 1, 30)
end
#############################
# End of googleVoice settings
#############################


case req.URI.User

# Select dialout provider with 1* 2* etc.. in front of number, ${dst:2} will remove the 1* prefix
when /^1\*/ then googleVoice(2) # dial (1*number) for (number@googleVoice).
when /^2\*/ then sys.Dial("${dst:2}@sip sorcery") # dial (2*number) for (number@sip sorcery).
when /^3\*/ then sys.Dial("${dst:2}@ipkall") # dial (3*number) for (number@ipkall).

# 9*+sipbroker number dialling (eg 9*234..to *234..@sipbroker.com)
when /^9\*/ then sys.Dial("${dst:1}@sipbroker.com[rm=a]") # dial (9*number) for (*number@sipbroker.com)

# Add 0* in front of the number for sipsorcery only dial.
when /^0\*/ then sys.Dial("${dst:2}@local") # dial (0*number) for (number@sipsorcery.com)

else
googleVoice # default output provider if no matches above.
end


do i need to put the whole thing in or just parts of it.

mnipp
Posts: 192
Joined: Sat Oct 03, 2009 9:48 am
Location: NSW Australia

Re: dial plan help, im confused

Post by mnipp » Thu Sep 01, 2011 1:55 pm

Copy the whole dialplan to sipsorcery.

In dialplan above make sure you have your googlevoice password, callback number to your sipsorcery phone etc.. in this section.

Code: Select all

Area = '816' # my USA area code
GV_USER = 'sampler****@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = '*****' # my GV password
CB_NUMBER = '253753****' # my 10-digit Callback number (or Gizmo5 11-digit)
To automate the log-in and set destination and callback number on the googlevoice website when you dialout on your sipsorcery phone.
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)

pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

Re: dial plan help, im confused

Post by pokie » Thu Sep 01, 2011 11:57 pm

still not gooing out, get a busy signal, i will try to explain what i have. i have go a ipkall number, a gvoice number, a gmail address, a free sipsorcery acount, and an ata. my ata is a lynsys PAP2T-NA, when i started setting every thing up i got a gvoice number, a ipkall number, and a sipsorcery free acount. i then set my ata to work with the ipkall number and sipsorcery and could get incoming calls if my ipkall number was called. then i put my ipkall number into gvoice and could call out from gvoice. i haven't puta sip provider in sipsorcer or any other thing except trying to put a dial plan in. the last time i put a dial plan in i put this.

dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)
Area = '816' # my USA area code
GV_USER = 'sample*****@gmail.com' # my GV e-mail address (user@gmail.com)
GV_PASS = 'poki****' # my GV password
CB_NUMBER = '253753**** # my 10-digit Callback number (or Gizmo5 11-digit)

it did not work and as you might see from the plan i put in i dont no what i am doing at all. i have tried copying every thing, and just parts of it. i just dont know what to copy and paste. this will be my last attempt to get this working as i have taken up enough of you time. sorry for the trouble.

mnipp
Posts: 192
Joined: Sat Oct 03, 2009 9:48 am
Location: NSW Australia

Re: dial plan help, im confused

Post by mnipp » Fri Sep 02, 2011 12:26 pm

step 1: setup IPKall number with your sipsorcery address to ring your sipsorcery phone when number is called. dial number to test.
step 2: goto https://www.google.com/voice and test IPKall number as callback number when calling other destinations.
step 3: copy the following 2 line dialplan with your correct gmail address, password and IPKall number to sipsorcery as your outplan.

Code: Select all

sys.GoogleVoiceCall("sampler****@gmail.com","**PW**","253753****","#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")
step 4: Check "SIP Accounts" page has "Out Dial Plan" set to the name of your outplan.
step 5: Check "In Dial Plan" has been set to a BLANK Empty setting.
step 6: goto Console page click the connect button before dialling a number to see if sorcery receives that number correctly or any other problems on the call.
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)

pokie
Posts: 12
Joined: Wed Aug 31, 2011 4:23 am

Re: dial plan help, im confused

Post by pokie » Fri Sep 02, 2011 4:18 pm

set up everything but still get a busy signall, it says i got a syntax error 0n line 2, please check
uas call failed with a response status of 500 and dial plan syntax error.

mnipp
Posts: 192
Joined: Sat Oct 03, 2009 9:48 am
Location: NSW Australia

Re: dial plan help, im confused

Post by mnipp » Fri Sep 02, 2011 8:56 pm

check you are not missing a ( " ) quote around your changed gmail-address, password or IPKall number in the 2 line dialplan. Or missing the end of line 2.

Code: Select all

sys.GoogleVoiceCall("sampler****@gmail.com","**PW**","253753****","#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)

Post Reply