internal call between sipsorcery subaccounts
internal call between sipsorcery subaccounts
Hello,
I have one sip provider/did configured.
Several sip accounts ( subaccounts ) with phones attached.
When I call to my did every phone rings, this works perfect.
I tried to make a shortcut to one certain local subaccount I have.
like this: when '200' then sys.Dial("123@local")
But when I call 200 all my phones ring not only 123@local
I know this is because all of my sipaccount use the same incoming dialplan What is ringing all of my phones.
But how to create a simple dialplan what also would allow these internal calls?
any hint appreciated ...
Thanks in advance
Joost
I have one sip provider/did configured.
Several sip accounts ( subaccounts ) with phones attached.
When I call to my did every phone rings, this works perfect.
I tried to make a shortcut to one certain local subaccount I have.
like this: when '200' then sys.Dial("123@local")
But when I call 200 all my phones ring not only 123@local
I know this is because all of my sipaccount use the same incoming dialplan What is ringing all of my phones.
But how to create a simple dialplan what also would allow these internal calls?
any hint appreciated ...
Thanks in advance
Joost
for incoming dialplan I have
Outgoing
Code: Select all
sys.Dial("123@local&456@local&789@local",60) # ring your phone for 60 seconds
sys.Respond(480, "(#{sys.Username}) Not Available") # response if not answered.
Code: Select all
sys.SetFromHeader("joost", nil, nil)
case req.URI.User
when '200' then sys.Dial("123@local")
end
I don't think you can have both
if you make a dialplan like this
Then all your phones will ring
If you only want to ring 1 phone
you must do something like this
You could make a primary account with an in dialplan attached
and 2 subaccounts with no dialplan attached
if you make a dialplan like this
Code: Select all
sys.Dial("123@local&456@local&789@local",60) # ring your phone for 60 seconds
sys.Respond(480, "(#{sys.Username}) Not Available") # response if not answered.
If you only want to ring 1 phone
you must do something like this
Code: Select all
sys.Dial("123@local",60) # ring your phone for 60 seconds
sys.Respond(480, "(#{sys.Username}) Not Available") # response if not answered.
Code: Select all
sys.Dial("123@local&456@local&789@local",60) # ring your phone for 60 seconds
sys.Respond(480, "(#{sys.Username}) Not Available") # response if not answered.
Code: Select all
sys.Dial("123@local&456@local&789@local",60)
maybe this will be the answer as a shared incoming dialplan were a call from outside rings all three phones and a call from another sipsorcery account rings only the phone called.
inplan
Code: Select all
if req.Header.From.FromURI.host.to_s == "sipsorcery.com"
sys.Dial("#{req.URI.User}@local",60) # ring the phone called.
else
sys.Dial("123@local&456@local&789@local",60) # ring all three
end
billion 7404VGP
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)
dialplan (<9*:*>[0-9*][0-9*].T<:@sipbroker>|[0-9*].T)
Re: internal call between sipsorcery subaccounts
Added my note. If you use number "12345" instead of char "abcde" as your sub-account name, you can dial it directly (voxlaot has a similar feature). I remember someone at the forums mentioned this point (possibly by mnipp ).
Anyway, my primary account is still using complex char because when I created my account I didn't know this. I created sub-account all in this way "98765". and "98765" can dial another sub "43210" directly. cannot be easier.
Aaron doesn't allow less than than 5-digital as account name. "12", "89" could NOT be used as sub-account name. but for speed-dial is still ok. that' what I did for dialing among primary accounts.
Anyway, my primary account is still using complex char because when I created my account I didn't know this. I created sub-account all in this way "98765". and "98765" can dial another sub "43210" directly. cannot be easier.
Aaron doesn't allow less than than 5-digital as account name. "12", "89" could NOT be used as sub-account name. but for speed-dial is still ok. that' what I did for dialing among primary accounts.
Re: internal call between sipsorcery subaccounts
Of course, you can also set up speed dials..
Code: Select all
case req.URI.User
when /^6$/ then sys.Dial("xx@local")
end
Help document SIP Sorcery on the wiki!
If you solved an issue you were having or figured out how to do something, please share on the wiki! It will save everyone lots of time and frustration.
If you solved an issue you were having or figured out how to do something, please share on the wiki! It will save everyone lots of time and frustration.
-
- Posts: 179
- Joined: Thu Aug 27, 2009 3:00 am
Re: internal call between sipsorcery subaccounts
Thanks for sharing this information. As for the 5-digit dialing, do you mean you can do it without dialplan, or still need dialplan to dial the subaccount? Thanks.beaver wrote:Added my note. If you use number "12345" instead of char "abcde" as your sub-account name, you can dial it directly (voxlaot has a similar feature). I remember someone at the forums mentioned this point (possibly by mnipp ).
Anyway, my primary account is still using complex char because when I created my account I didn't know this. I created sub-account all in this way "98765". and "98765" can dial another sub "43210" directly. cannot be easier.
Aaron doesn't allow less than than 5-digital as account name. "12", "89" could NOT be used as sub-account name. but for speed-dial is still ok. that' what I did for dialing among primary accounts.
Re: internal call between sipsorcery subaccounts
Add this line in dial-out plan. it works for me. I take my zip-code as my account number (easy to remember).
when /^\d{5}$/ then sys.Dial("${dst}@local")
I didn't use 7-dig, standard USA dial number in some areas. 6-dig has been used by voxalot. 5-dig is my only choice. As said, I use 2-dig speed-dial for
'99' => 'client1@local',
'98' => 'client2@local',
...
primary member call (some of them already use digits as account name). I really wish I cut my long speed-dial table.
when /^\d{5}$/ then sys.Dial("${dst}@local")
I didn't use 7-dig, standard USA dial number in some areas. 6-dig has been used by voxalot. 5-dig is my only choice. As said, I use 2-dig speed-dial for
'99' => 'client1@local',
'98' => 'client2@local',
...
primary member call (some of them already use digits as account name). I really wish I cut my long speed-dial table.