Call php file on incoming call (asterisk)

hello i created a CRM for myself with php and now im trying to add Call notification for it When somoone call
i searched alot and find Very few example(im suprised why?) how to it and i dident readed all voip document so know me as newbe in voip :smiley: but im trying.
for now i added this 3 line of code in extenstions-custom

    exten => s,1,Verbose(Incoming call from Sip line CallerID=${CALLERID(all)})
    exten => s,2,AGI(testest.php,${CALLERID(all)})

It work and its awesome and easy but Only problem is its work on outgoing Call and not incoming call
can anyone please give me example change what so its work only on incoming calls? there is easy way for it? or i need to read whole voip document?

Different use case, but @billsimon’s solution will work for you as well. Essentially make a custom context that calls the AGI and use that for your inbound route.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.