Re: [Asterisk-Users] context question

2005-09-26 Thread Bruno De Luca




this can help u:

SIP.CONF


[1]
host = dynamic
type = friend
language = it
qualify = no
dtmfmode = rfc2833
callgroup = 1
pickupgroup = 1
callerid = "Bruno De Luca 1" 1
secret = 1234
mailbox = 1
context=1


[2]
host = dynamic
type = friend
language = it
qualify = no
dtmfmode = rfc2833
callgroup = 2
pickupgroup = 2
callerid = "Bruno De Luca 2" 2
secret = 1234
mailbox = 2
context=2

[3]
...
context=1

[4]
...
context=2


EXTENSIONS.CONF

[1]
exten = 1,1,Dial(SIP/1)
exten = 3,1,Dial(SIP/3)

[2]
exten = 2,1,Dial(SIP/2)
exten = 4,1,Dial(SIP/4)



trixter http://www.0xdecafbad.com wrote:

  They are aware of each other in 2 senses.  First you can goto() them.  I
wanted to stop the ability of someone to put in a goto() in their
dialplan to a context that is someone elses (think asterisk hosting).
Second naming collissions.  I wanted to stop two people from having the
same name and causing grief that way.

That is why I made the references about prepending some customer id or
something, but I dont think that is the best way to accomplish this
(personal preference), so it will either be an AGI to accomplish this or
it will be something else that already exists that I havent been able to
locate as yet.


On Fri, 2005-09-23 at 21:50 -0500, [EMAIL PROTECTED] wrote:
  
  
I may be missing something, but aren't all contexts unaware of each 
other be default?

If I do the following

[contexta]
exten = 3200,1,Dial(SIP/3200,5)

[contextb]
exten = 3300,1,Dial(SIP/3300,5)

Each context has a phone and they can't call each other.  The are 
completely isolated.  Unless I'm missing what you are trying to do


trixter http://www.0xdecafbad.com wrote:


  Is there any way within asterisk to limit the scope of contexts,
basically to make one context totally unaware of another.

The application I had in mind involved allowing users to create their
own dial plans.  To that end I wanted to make it so that a given user
could not call a different users dialplan.  

I could filter everything and prepend a customer id to every context
they specify, but that can get ugly fast, especially when the parser
misses something.

If this doesnt exist I can surely do it with an agi, and that is the
road I am headed down right now, but why duplicate an effect that may
already exist?

Thanks.





___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
  

___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
  



-- 


 BRUNO DE LUCA
 Tel. +39 02 9350 4780 (102)
 
 FGA Software
 20017 Rho - Via Puccini, 8

 E-Mail :
[EMAIL PROTECTED]
 Internet:
http://www.fgasoftware.com




___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] context question

2005-09-26 Thread trixter http://www.0xdecafbad.com
That doesnt really help.  As stated in the email you replied to what is
to prevent someone doing say 

[1]
exten = 1,1,goto(2,1,1)

or customer A *and* customer B trying to define the same context name,
to use your example lets say they both want to create context '1'.  

I want to be able to create 1 system that has multiple users who are
able to create their own dialplans without naming collisions with other
customers or gotos going to other customers, etc. 

This is more for a virtual hosting type setup so I can have one large
machine instead of many smaller ones, thus allowing for better ROI.

While many have suggested that I learn the basics of contexts (as you
did) no one has been able to ansewr the actual question asked making me
think there is no current answer, and an AGI is the way to go.  That way
I can have more control over what data is observed and all that.  I just
didnt want to write an AGI if there was an existing solution, especially
if it was part of asterisk itself and not an external program.

On Mon, 2005-09-26 at 09:31 +0200, Bruno De Luca wrote:
 this can help u:
 EXTENSIONS.CONF
 
 [1]
 exten = 1,1,Dial(SIP/1)
 exten = 3,1,Dial(SIP/3)
 
 [2]
 exten = 2,1,Dial(SIP/2)
 exten = 4,1,Dial(SIP/4)
 
 
 trixter http://www.0xdecafbad.com wrote: 
  They are aware of each other in 2 senses.  First you can goto() them.  I
  wanted to stop the ability of someone to put in a goto() in their
  dialplan to a context that is someone elses (think asterisk hosting).
  Second naming collissions.  I wanted to stop two people from having the
  same name and causing grief that way.
  
  That is why I made the references about prepending some customer id or
  something, but I dont think that is the best way to accomplish this
  (personal preference), so it will either be an AGI to accomplish this or
  it will be something else that already exists that I havent been able to
  locate as yet.
  
  
  On Fri, 2005-09-23 at 21:50 -0500, [EMAIL PROTECTED] wrote:

   I may be missing something, but aren't all contexts unaware of each 
   other be default?
   
   If I do the following
   
   [contexta]
   exten = 3200,1,Dial(SIP/3200,5)
   
   [contextb]
   exten = 3300,1,Dial(SIP/3300,5)
   
   Each context has a phone and they can't call each other.  The are 
   completely isolated.  Unless I'm missing what you are trying to do
   
   
   trixter http://www.0xdecafbad.com wrote:
   
Is there any way within asterisk to limit the scope of contexts,
basically to make one context totally unaware of another.

The application I had in mind involved allowing users to create their
own dial plans.  To that end I wanted to make it so that a given user
could not call a different users dialplan.  

I could filter everything and prepend a customer id to every context
they specify, but that can get ugly fast, especially when the parser
misses something.

If this doesnt exist I can surely do it with an agi, and that is the
road I am headed down right now, but why duplicate an effect that may
already exist?

Thanks.

-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

RE: [Asterisk-Users] context question

2005-09-24 Thread Alex Vishnev
I briefly looked thru the code and I don't believe there is a way to
separate the context or really make them independent. I know exactly what
you want to accomplish. I think it could be done with a little trick. For
example, every customer on hosted pbx would be given some kind of unique
identifier. The back-end would silently place the identifier at the
beginning or the end of the context making the new name totally unique. The
front-end would hide identifier from users view and just present the name of
the context. That way, customers can name their context anything they like
and there would be no collision. In that case, Goto would also be local to
the context as the real context name will contain customer id. 

Does that work for you?

Alex

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of trixter
http://www.0xdecafbad.com
Sent: Friday, September 23, 2005 11:04 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [Asterisk-Users] context question

They are aware of each other in 2 senses.  First you can goto() them.  I
wanted to stop the ability of someone to put in a goto() in their
dialplan to a context that is someone elses (think asterisk hosting).
Second naming collissions.  I wanted to stop two people from having the
same name and causing grief that way.

That is why I made the references about prepending some customer id or
something, but I dont think that is the best way to accomplish this
(personal preference), so it will either be an AGI to accomplish this or
it will be something else that already exists that I havent been able to
locate as yet.


On Fri, 2005-09-23 at 21:50 -0500, [EMAIL PROTECTED] wrote:
 I may be missing something, but aren't all contexts unaware of each 
 other be default?
 
 If I do the following
 
 [contexta]
 exten = 3200,1,Dial(SIP/3200,5)
 
 [contextb]
 exten = 3300,1,Dial(SIP/3300,5)
 
 Each context has a phone and they can't call each other.  The are 
 completely isolated.  Unless I'm missing what you are trying to do
 
 
 trixter http://www.0xdecafbad.com wrote:
  Is there any way within asterisk to limit the scope of contexts,
  basically to make one context totally unaware of another.
  
  The application I had in mind involved allowing users to create their
  own dial plans.  To that end I wanted to make it so that a given user
  could not call a different users dialplan.  
  
  I could filter everything and prepend a customer id to every context
  they specify, but that can get ugly fast, especially when the parser
  misses something.
  
  If this doesnt exist I can surely do it with an agi, and that is the
  road I am headed down right now, but why duplicate an effect that may
  already exist?
  
  Thanks.
  
  
  
  
  
  ___
  --Bandwidth and Colocation sponsored by Easynews.com --
  
  Asterisk-Users mailing list
  Asterisk-Users@lists.digium.com
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
 ___
 --Bandwidth and Colocation sponsored by Easynews.com --
 
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [Asterisk-Users] context question

2005-09-24 Thread trixter http://www.0xdecafbad.com
On Sat, 2005-09-24 at 09:10 -0400, Alex Vishnev wrote:
 I briefly looked thru the code and I don't believe there is a way to
 separate the context or really make them independent. I know exactly what
 you want to accomplish. I think it could be done with a little trick. For
 example, every customer on hosted pbx would be given some kind of unique
 identifier. The back-end would silently place the identifier at the
 beginning or the end of the context making the new name totally unique. The
 front-end would hide identifier from users view and just present the name of
 the context. That way, customers can name their context anything they like
 and there would be no collision. In that case, Goto would also be local to
 the context as the real context name will contain customer id. 
 
 Does that work for you?
 

no, because as I stated I didnt like that for personal reasons.  That
sounds exactly what I was thyinking too, prepending some customer
specific identifier.  If that is the only way to do this, then I think I
will just have to run everything through an AGI, which can differentiate
between customers since none of the 'dialplan' is in extensions.conf :)


Thanks though, at least its confirmed that this doesnt exist (yet
anyway).


-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[Asterisk-Users] context question

2005-09-23 Thread trixter http://www.0xdecafbad.com
Is there any way within asterisk to limit the scope of contexts,
basically to make one context totally unaware of another.

The application I had in mind involved allowing users to create their
own dial plans.  To that end I wanted to make it so that a given user
could not call a different users dialplan.  

I could filter everything and prepend a customer id to every context
they specify, but that can get ugly fast, especially when the parser
misses something.

If this doesnt exist I can surely do it with an agi, and that is the
road I am headed down right now, but why duplicate an effect that may
already exist?

Thanks.

-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [Asterisk-Users] context question

2005-09-23 Thread [EMAIL PROTECTED]
I may be missing something, but aren't all contexts unaware of each 
other be default?


If I do the following

[contexta]
exten = 3200,1,Dial(SIP/3200,5)

[contextb]
exten = 3300,1,Dial(SIP/3300,5)

Each context has a phone and they can't call each other.  The are 
completely isolated.  Unless I'm missing what you are trying to do



trixter http://www.0xdecafbad.com wrote:

Is there any way within asterisk to limit the scope of contexts,
basically to make one context totally unaware of another.

The application I had in mind involved allowing users to create their
own dial plans.  To that end I wanted to make it so that a given user
could not call a different users dialplan.  


I could filter everything and prepend a customer id to every context
they specify, but that can get ugly fast, especially when the parser
misses something.

If this doesnt exist I can surely do it with an agi, and that is the
road I am headed down right now, but why duplicate an effect that may
already exist?

Thanks.





___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] context question

2005-09-23 Thread trixter http://www.0xdecafbad.com
They are aware of each other in 2 senses.  First you can goto() them.  I
wanted to stop the ability of someone to put in a goto() in their
dialplan to a context that is someone elses (think asterisk hosting).
Second naming collissions.  I wanted to stop two people from having the
same name and causing grief that way.

That is why I made the references about prepending some customer id or
something, but I dont think that is the best way to accomplish this
(personal preference), so it will either be an AGI to accomplish this or
it will be something else that already exists that I havent been able to
locate as yet.


On Fri, 2005-09-23 at 21:50 -0500, [EMAIL PROTECTED] wrote:
 I may be missing something, but aren't all contexts unaware of each 
 other be default?
 
 If I do the following
 
 [contexta]
 exten = 3200,1,Dial(SIP/3200,5)
 
 [contextb]
 exten = 3300,1,Dial(SIP/3300,5)
 
 Each context has a phone and they can't call each other.  The are 
 completely isolated.  Unless I'm missing what you are trying to do
 
 
 trixter http://www.0xdecafbad.com wrote:
  Is there any way within asterisk to limit the scope of contexts,
  basically to make one context totally unaware of another.
  
  The application I had in mind involved allowing users to create their
  own dial plans.  To that end I wanted to make it so that a given user
  could not call a different users dialplan.  
  
  I could filter everything and prepend a customer id to every context
  they specify, but that can get ugly fast, especially when the parser
  misses something.
  
  If this doesnt exist I can surely do it with an agi, and that is the
  road I am headed down right now, but why duplicate an effect that may
  already exist?
  
  Thanks.
  
  
  
  
  
  ___
  --Bandwidth and Colocation sponsored by Easynews.com --
  
  Asterisk-Users mailing list
  Asterisk-Users@lists.digium.com
  http://lists.digium.com/mailman/listinfo/asterisk-users
  To UNSUBSCRIBE or update options visit:
 http://lists.digium.com/mailman/listinfo/asterisk-users
 ___
 --Bandwidth and Colocation sponsored by Easynews.com --
 
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com
 http://lists.digium.com/mailman/listinfo/asterisk-users
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
Trixter http://www.0xdecafbad.com Bret McDanel
UK +44 870 340 4605   Germany +49 801 777 555 3402
US +1 360 207 0479 or +1 516 687 5200
FreeWorldDialup: 635378


signature.asc
Description: This is a digitally signed message part
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users