Incorporating Incoming and Outgoing dial plans

Catalog of dial plans
Post Reply
phvrc2nt
Posts: 16
Joined: Thu Aug 19, 2010 6:52 am

Incorporating Incoming and Outgoing dial plans

Post by phvrc2nt » Fri Aug 26, 2011 5:41 am

Due to sipsorcery free account restrictions.
i'm limited to just 1 dial plan.

is there a way i can configure an outgoing dial plan with an incoing dial plans?

1 sip provider.
2 sip account.
calls routing / ringing both sip accounts.

this used to be a no brainer when multiple dial plans were allowed.
now im stuck on finding a dial plan that incorporates it with my outgoing plan below

----
case req.URI.User.to_s
when /^1777/
sys.Dial("xxx")
when /^*123/
sys.Dial("xxx")
else
sys.GoogleVoiceCall("xxx@gmail.com","password","callbacknumb",req.URI.User.to_s,".*",1)
end
----

i hope someone helps out.
please? :)

thanks!

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Incorporating Incoming and Outgoing dial plans

Post by Aaron » Fri Aug 26, 2011 5:58 am

If your dial plans are simple it's relatively easy to roll them up into a single one.

Code: Select all

if sys.In
 # Incoming calls.
 sys.Dial("account1@sipsorcery&account2@sipsorcery")
else
 # Outgoing calls.
 case req.URI.User.to_s
  when /^1777/
   sys.Dial("xxx")
  when /^*123/
   sys.Dial("xxx")
  else
   sys.GoogleVoiceCall("xxx@gmail.com","password","callbacknumb",req.URI.User.to_s,".*",1)
  end
end

phvrc2nt
Posts: 16
Joined: Thu Aug 19, 2010 6:52 am

Re: Incorporating Incoming and Outgoing dial plans

Post by phvrc2nt » Fri Aug 26, 2011 12:48 pm

thanks!
thanks!

ur a genius... :)

gentlehints
Posts: 1
Joined: Thu Sep 15, 2011 5:35 pm

Re: Incorporating Incoming and Outgoing dial plans

Post by gentlehints » Thu Sep 15, 2011 5:40 pm

I've been trying to get my phone system working properly for months...
Is this everything that i need to include for the 100% complete dial plan....do i need to include the simple and complex as well?????
I put in my username, password and callback number in the xxx fields
do i need to put in my google voice area code or phone number as well?

should i change any information under account1@sipsorcery & account2@sipsorcery.com is this where I type my username@sipsorcery.com?

also do i change the xxx fields under the following ?????

sys.Dial("xxx")
when /^*123/
sys.Dial("xxx")

I am using sipgate, google voice and sipsorcery



Thanks in advance
Last edited by gentlehints on Thu Sep 15, 2011 5:44 pm, edited 1 time in total.

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

Re: Incorporating Incoming and Outgoing dial plans

Post by mnipp » Fri Sep 16, 2011 9:44 am

You can try this dialplan for sipgate and googleVoice.
But first go through this post on setting-up googleVoice viewtopic.php?f=5&t=3760

Code: Select all

if sys.In  #### Incoming calls.

  sys.Dial("#{req.URI.User}@local") # ring phone on the called account.

else       #### Outgoing calls.

  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 sys.Dial("${dst:2}@sipgate")     # dial (1*number) for (number@sipgate).
  else
     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.")
  end

end        #### end of Outgoing calls.
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)

Post Reply