David Shirley
2005-Jun-27 06:52 UTC
[Asterisk-Users] Accessing SIP username from AGI script
Hi, I'm writing an AGI script to manage outgoing calls. We need to interrogate a database to work out which line a particular user is allowed to use for outgoing calls. However, I cannot find a way for my AGI script to access the SIP username. Does anyone know if this is possible (even if it is just passing a variable from extensions.conf to the script)? Thanks in advance, David Shirley -- The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don?t just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and riffle their pockets for new vocabulary. ?James Nicoll -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050627/c15aebb4/attachment.htm
Hello, Why don't you try using the the CALLERIDNUM or maybe the ACCOUNTCODE and based on that to take your decision? -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of David Shirley Sent: Monday, June 27, 2005 4:52 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Accessing SIP username from AGI script Hi, I'm writing an AGI script to manage outgoing calls. We need to interrogate a database to work out which line a particular user is allowed to use for outgoing calls. However, I cannot find a way for my AGI script to access the SIP username. Does anyone know if this is possible (even if it is just passing a variable from extensions.conf to the script)? Thanks in advance, David Shirley -- The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and riffle their pockets for new vocabulary. -James Nicoll -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20050627/879259c7/attachment.htm
Moises Silva
2005-Jun-27 08:01 UTC
[Asterisk-Users] Accessing SIP username from AGI script
i guess you have to trust the agi_callerid and agi_channel var. With agi_channel you know if the originating party is a SIP, then with the caller id you know the sip user. best regards. On 6/27/05, David Shirley <ds-lists@thinkative.com> wrote:> Hi, > > I'm writing an AGI script to manage outgoing calls. We need to interrogate a > database to work out which line a particular user is allowed to use for > outgoing calls. However, I cannot find a way for my AGI script to access the > SIP username. Does anyone know if this is possible (even if it is just > passing a variable from extensions.conf to the script)? > > Thanks in advance, > > David Shirley > > > -- > > The problem with defending the purity of the English language is that > English is about as pure as a cribhouse whore. We don't just borrow words; > on occasion, English has pursued other languages down alleyways to beat them > unconscious and riffle their pockets for new vocabulary. > > ?James Nicoll > > _______________________________________________ > 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 > >-- "Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"