dial plan help, im confused

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

Re: dial plan help, im confused

Post by pokie » Fri Sep 02, 2011 9:59 pm

perfect i was missing the last " after my cb number thank you very much. may i ask one more thing. what code and were do i put the code to dial with just seven numbers in my area code in this dial plan

sys.GoogleVoiceCall("sampler****@gmail.com","**PW**","253753****","#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")

is it in this string of code. and what part. and were do i put the part i need to insert into the dial plan

def googleVoice(noprefix=0,replprefix="",gvnum=req.URI.User.to_s)
gvnum = replprefix + gvnum[noprefix..50]
case gvnum
when /^[2-9]\d{6}$/

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

Re: dial plan help, im confused

Post by mnipp » Sat Sep 03, 2011 10:23 am

Lets keep it simple

Code: Select all

num = req.URI.User.to_s                 # get dialled number and place in num variable   eg num = 7654321
num = "816" + num   if num.length == 7  # add areacode(816) in front if num is 7 digits. eg num = 8167654321

sys.GoogleVoiceCall("sampler****@gmail.com","**PW**","253753****",num,".*",1)  # place num in googleVoice call
sys.Log("Sorry, Google Voice Call failed.")
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 » Sat Sep 03, 2011 8:58 pm

my dial plan is this

num = req.URI.User.to_s
num = "816" + num if num.length == 7
sys.GoogleVoiceCall("sampl******@gmail.com","poki****","253753****","#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")

when i call seven digits it rings then says this number is not available for call return, good bye.
did i miss something or put something i was not suposed to to dial just seven numbers.

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

Re: dial plan help, im confused

Post by mnipp » Sat Sep 03, 2011 9:35 pm

you did not replace the dialled number
**","#{req.URI.User}",".*",1)

with your new destination number in the googlevoice call.
***", num ,".*",1) # place num in googleVoice 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 » Sat Sep 03, 2011 10:01 pm

i did this and it rings 4 or 5 time then a busy signal.
num = req.URI.User.to_s
num = "816" + num if num.length == 7
sys.GoogleVoiceCall("sampl******@gmail.com","poki****","253753****"," num ",".*",1)
sys.Log("Sorry, Google Voice Call failed.")

did i do it wrong. lol i am a pain aint i.

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

Re: dial plan help, im confused

Post by mnipp » Sat Sep 03, 2011 10:11 pm

**"," num ",".*",1)

remove the ( " )quotes around num, you need the number inside not the word "num" as the destination.
**", num ,".*",1)
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 » Sun Sep 04, 2011 12:06 am

wow now i can call out with seven digit number but all my incoming calls go to voicemail. i check my google voice do not desturb and it was not clicked, so i put my dial plan back to how it was win i had to dial area code and my incoming call still go to voice mail. what is happening lol coding gives me a headache. here is my basic plan you gave me, could you look at it and see if i forgot a " or something please.
sys.GoogleVoiceCall("sample*****@gmail.com","pok*****","25375*****","#{req.URI.User}",".*",1)
sys.Log("Sorry, Google Voice Call failed.")

the only thing i can see that has changed is on the sipscorcery site under sip accounts were it says

username domain out dial plan in dial plan keep alives in only disabled switchboard


under in dial plan it say default were i dont remember it saying that before. i thought it was a blank there.

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

Re: dial plan help, im confused

Post by pokie » Sun Sep 04, 2011 4:41 am

ok i fixed something on my own lol, it was the default under the dial plan, cleared it and now every thing works like it is supposed to. thank you for all your help getting my dial plan going.

rick

Post Reply