Great, great, i got a little further regarding the hang up cause by changing async=false and events=true as @tm1000 Andrew suggested. I updated my php code in the first posting. This produces responses like:
Response: Success
Message: Originate successfully queued
–
Response: Error
Message: Originate failed
Cause: 16
Cause-txt: Normal Clearing
–
Response: Error
Message: Originate failed
Cause: 17
Cause-txt: User busy
–
Response: Error
Message: Originate failed
Cause: 58
Cause: 58
Cause-txt: Bearer capability not available
And the codes can be looked up on evil voip-info: http://www.voip-info.org/wiki/view/Asterisk+variable+hangupcause
I already love it and you all were a great help! I will also look at ARI a little later.
here it goes on regarding the outbound-allroutes issue which still exists: Originate a call via outbound-allroutes instead of a trunk