How to ring my subaccount?

Catalog of dial plans
Trimline
Posts: 28
Joined: Sat May 15, 2010 7:59 pm

Re: How to ring my subaccount?

Post by Trimline » Mon May 17, 2010 11:14 am

mnipp wrote:Lets say you have two sipsorcery acc under the SIP Accounts area called.....

By default your (second number) Register Contact will be sip:Line1@sipsorcery.com, change that to sip:Line2@sipsorcery.com to ring your (sub acc name) directly instead.
Well a big thanks to you! I was searching for a complex solution and your suggestion was just too easy.. Cheers

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

Re: How to ring my subaccount?

Post by phvrc2nt » Thu Aug 19, 2010 12:35 pm

This might be out of topic. But this is the closest thread i can find.

So the dial in plan is as follows as i understand it.

sys.Dial("mainaccount@local&sub1@local&sub2@local") - will ring the main account and all sub accout specified.

sys.Dial("#{sys.Username}@local") will ring the main account as specified or as registered in the sip account.

My question is. What if i wanted my phones to work this way.

Sipline 1 - rings main account and sub accounts
And
Sipline 2 - only rings main account.

Sipline in reference to the sip provider.
How will the syntax be and what switches or commands should i interject to the code? Sorry for the long question. Confused noob here...

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

Re: How to ring my subaccount?

Post by MikeTelis » Thu Aug 19, 2010 2:29 pm

Here is what you need to do:

1. Send incoming calls from Sipline1 to one of your subaccounts. That is, Register Contact for Sipline1 should be sub1@sip.sipsorcery.com (I'm assuming that subaccount's name is sub1). If you do not register to receive incoming calls, change your SIP forwarding address (Sipline1 settings @ Sipline1 provider) to sub1@sip.sipsorcery.com.

2. Send incoming calls from Sipline2 to your main account (similar to #1 above).

At this point, Sipline2 should ring main account only; Sipline1 rings sub1 subaccount only. Thus, everything is okay with Sipline2; all you need to do is forward incoming calls from sub1 to main account and all other subaccounts. Use the following lines ("In" dialplan for sub1):

sys.SetFromHeader(req.Header.From.FromName, req.Header.From.FromURI.User, req.Header.From.FromURI.Host) # Preserve caller ID
sys.Dial("#{sys.Username}@local&sub1@local&sub2@local")

I'm assuming that the name of your other subaccount is sub2.

You don't need "In" dialplan for your main account and sub2. If you want to use "In" dialplan, do it for main account only and use

sys.Dial("#{sys.Username}@local")

to forward incoming calls to the ATA registered to main account.
Last edited by MikeTelis on Thu Aug 19, 2010 3:51 pm, edited 1 time in total.

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

Re: How to ring my subaccount?

Post by phvrc2nt » Thu Aug 19, 2010 3:38 pm

Thank you so much.
Will test this as soon.

Will update this thread for my success or failure.
Thanks again.

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

Re: How to ring my subaccount?

Post by phvrc2nt » Fri Aug 20, 2010 12:49 am

thanks for all the help.
works like a charm.

i have another question though.
what code do i need to add if i for example...

i want to have the capability to choose which sip provider i want to use, like adding a prefix to a number so that when i add that prefix, calls will always be routed to the specific provider i want, and not the provider attached to the subaccount.

eg.
subacct1 - provider1
subacct2 - provider2

i would want to have manual override so that when i use subacct2, i can manually add a prefix or something so calls will be routed to provider1.

thanks again!
best regards to everyone.

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

Re: How to ring my subaccount?

Post by mnipp » Fri Aug 20, 2010 1:32 am

This is a thread on incoming calls and the inplan options.

If you are looking at an outplan option. This simple example can be set on all phones main sub1 sub2 as your outplan.

viewtopic.php?f=5&t=2608
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)

Post Reply