Thanks Steve. but explain me more about your dialplan codes. Im a beginner.
exten => _X.,1,NOOP(Invoking AGI Script now) what is "Invoking AGI Script now" and what should I do in this method? what is _X. it seems it is dynamic extension number. and "n"? Thanks On Wed, Jan 16, 2013 at 11:12 AM, SamyGo <govoi...@gmail.com> wrote: > Hi, > Please see my comments in line. > > Regards, > Sammy > > > On Wed, Jan 16, 2013 at 12:13 PM, Zohair Raza < > engineerzuhairr...@gmail.com> wrote: > >> >> On Wed, Jan 16, 2013 at 11:01 AM, Muhammad <mohammad.ghaz...@gmail.com>wrote: >> >>> *Thanks Zohair! >>> I wrote some php code to working with AGI, but it dosen't work. >>> * >>> >> *I don't know how can run it. please explain me when I put my php code >>> inside /var/lib/asterisk/agi-bin so, what should I do after that. * >>> >> >> Make sure Asterisk has access to your AGI script, and make it executable >> (chmod u+x agi.php). Also make sure it has shebang (!#/usr/bin/php) >> > > Besides that you'll need to create SIP users and define their * > context=my-agi* and in your context call this AGI. > > [my-agi] > exten => _X.,1,NOOP(Invoking AGI Script now) > same => n,AGI(my-agi-filename.php) > same => n,NOOP(Any other post AGI things here) > same => n,Hangup() > > >> >>> *and the second one, how can limit users to call just my number in list >>> at database and permit to call another numbers.* >>> * >>> * >>> >> That depends on logic in your script, you can also separate users by >> contexts >> > > Alternative to the above approach there are other possibilities, like > applying a GotoIF() condition in the *[my-agi]* dialplan code above > restricting a particluar number, or Instead of *_X. *in the above code > implement some regex to enable only local area dialing i.e > > exten => _78XXXXXX,1,NOOP(Invoking AGI Script now for dialled string > starting with 78 and 8 digit in length) > > If you don't like any of the above because you've a list of numbers which > should be dialled only in a DB.table then in your php-AGI script do some > restrictions based on that table. > > >> >>> * * >>> On Tue, Jan 15, 2013 at 12:39 PM, Zohair Raza < >>> engineerzuhairr...@gmail.com> wrote: >>> >>>> you need to run full command, like >>>> >>>> agi show commands topic answer >>>> agi show commands topic gosub >>>> agi set debug on >>>> >>>> >>>> Regards, >>>> Zohair Raza >>>> >>>> >>>> On Tue, Jan 15, 2013 at 1:05 PM, Muhammad >>>> <mohammad.ghaz...@gmail.com>wrote: >>>> >>>>> Hi, >>>>> >>>>> in CLI, I type agi show or other agi commad, but response me "command >>>>> not found". >>>>> How can see agi is work normally in my server? >>>>> >>>>> >>>>> -- >>>>> _____________________________________________________________________ >>>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>>>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>>>> http://www.asterisk.org/hello >>>>> >>>>> asterisk-users mailing list >>>>> To UNSUBSCRIBE or update options visit: >>>>> http://lists.digium.com/mailman/listinfo/asterisk-users >>>>> >>>> >>>> >>>> -- >>>> _____________________________________________________________________ >>>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>>> http://www.asterisk.org/hello >>>> >>>> asterisk-users mailing list >>>> To UNSUBSCRIBE or update options visit: >>>> http://lists.digium.com/mailman/listinfo/asterisk-users >>>> >>> >>> >>> -- >>> _____________________________________________________________________ >>> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >>> New to Asterisk? Join us for a live introductory webinar every Thurs: >>> http://www.asterisk.org/hello >>> >>> asterisk-users mailing list >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-users >>> >> >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> New to Asterisk? Join us for a live introductory webinar every Thurs: >> http://www.asterisk.org/hello >> >> asterisk-users mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users