[Elastix general] Execute PHP script post-hangup

Josiah Spackman josiah at c2s.co.nz
Thu Feb 2 16:13:03 EST 2012


Hi Augusto,

As-per my first email, I've tried adding it in to extensions_custom.conf :)

Thanks


Jo

On Thu, Feb 2, 2012 at 3:59 PM, Augusto Sepulveda <
augusto.sepulveda at nextortelecom.com> wrote:

> In wich file are you making this changes?
>
>
>
>
> Enviado desde Samsung Galaxy Tablet
> Josiah Spackman <josiah at c2s.co.nz> wrote:
> Hi all,
>
> I'm wanting to run a script to modify some DB variables after the user has
> hung up a call.
>
> However no matter what I try I can't get the jolly thing to go and run
> this PHP after the call is over?
> I've tried adding it in to extensions_custom.conf but it doesn't overwrite
> the macro-hangupcall. it looks like this:
> [macro-hangupcall]
> include => macro-hangupcall-custom
> exten => s,1(start),AGI(endcall.php)
> exten => s,n,GotoIf($["${USE_CONFIRMATION}"="" | "${RINGGROUP_INDEX}"="" |
> "${CHANNEL}"!="${UNIQCHAN}"]?skiprg)
> exten => s,n,Noop(Cleaning Up Confirmation Flag:
> RG/${RINGGROUP_INDEX}/${CHANNEL})
> exten => s,n(delrgi),Noop(Deleting: RG/${RINGGROUP_INDEX}/${CHANNEL}
> ${DB_DELETE(RG/${RINGGROUP_INDEX}/${CHANNEL})})
> exten => s,n(skiprg),GotoIf($["${BLKVM_BASE}"="" |
> "BLKVM/${BLKVM_BASE}/${CHANNEL}"!="${BLKVM_OVERRIDE}"]?skipblkvm)
> exten => s,n,Noop(Cleaning Up Block VM Flag: ${BLKVM_OVERRIDE})
> exten => s,n(delblkvm),Noop(Deleting: ${BLKVM_OVERRIDE}
> ${DB_DELETE(${BLKVM_OVERRIDE})})
> exten => s,n(skipblkvm),GotoIf($["${FMGRP}"="" | "${FMUNIQUE}"="" |
> "${CHANNEL}"!="${FMUNIQUE}"]?theend)
> exten => s,n(delfmrgp),Noop(Deleting: FM/DND/${FMGRP}/${CHANNEL}
> ${DB_DELETE(FM/DND/${FMGRP}/${CHANNEL})})
> exten => s,n(theend),Hangup
>
> It looks like this:
>   == Spawn extension (from-internal, 77, 2) exited non-zero on
> 'SIP/907-0000020c'
>     -- Executing [h at from-internal:1] Macro("SIP/907-0000020c",
> "hangupcall") in new stack
>     -- Executing [s at macro-hangupcall:1] GotoIf("SIP/907-0000020c",
> "1?endmixmoncheck") in new stack
>     -- Goto (macro-hangupcall,s,9)
>     -- Executing [s at macro-hangupcall:9] NoOp("SIP/907-0000020c", "End of
> MIXMON check") in new stack
>     -- Executing [s at macro-hangupcall:10] GotoIf("SIP/907-0000020c",
> "1?nomeetmemon") in new stack
>     -- Goto (macro-hangupcall,s,15)
>     -- Executing [s at macro-hangupcall:15] NoOp("SIP/907-0000020c",
> "MEETME_RECORDINGFILE=") in new stack
>     -- Executing [s at macro-hangupcall:16] GotoIf("SIP/907-0000020c",
> "1?noautomon") in new stack
>     -- Goto (macro-hangupcall,s,18)
>     -- Executing [s at macro-hangupcall:18] NoOp("SIP/907-0000020c",
> "TOUCH_MONITOR_OUTPUT=") in new stack
>     -- Executing [s at macro-hangupcall:19] GotoIf("SIP/907-0000020c",
> "1?noautomon2") in new stack
>     -- Goto (macro-hangupcall,s,25)
>     -- Executing [s at macro-hangupcall:25] NoOp("SIP/907-0000020c",
> "MONITOR_FILENAME=") in new stack
>     -- Executing [s at macro-hangupcall:26] GotoIf("SIP/907-0000020c",
> "1?skiprg") in new stack
>     -- Goto (macro-hangupcall,s,29)
>     -- Executing [s at macro-hangupcall:29] GotoIf("SIP/907-0000020c",
> "1?skipblkvm") in new stack
>     -- Goto (macro-hangupcall,s,32)
>     -- Executing [s at macro-hangupcall:32] GotoIf("SIP/907-0000020c",
> "1?theend") in new stack
>     -- Goto (macro-hangupcall,s,34)
>     -- Executing [s at macro-hangupcall:34] Hangup("SIP/907-0000020c", "")
> in new stack
>   == Spawn extension (macro-hangupcall, s, 34) exited non-zero on
> 'SIP/907-0000020c' in macro 'hangupcall'
>   == Spawn extension (from-internal, h, 1) exited non-zero on
> 'SIP/907-0000020c'
>
> It's supposed to be echoing just to say "Hi I'm here", which I've tested
> and it logs that prior to playing back the pre-recorded message via PHP, so
> it's not that I'm logging it incorrectly, it just doesn't appear to be
> doing anything :-/
>
> Any ideas on what I'm doing wrong? For the purposes of this test, I'm Ext
> 907 dialing 77 which just plays back a pre-recorded message then hangs up.
>
> Cheers
>
>
> Jo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.elastix.org/pipermail/general/attachments/20120203/43473d56/attachment.html 


More information about the General mailing list