Do you want to hangup the calling channel? This is what Hangup() does. If so, then what would the next context do exactly? Some details may help get a good answer
Call him back from where? You would be calling him back from himself, except that he has already hung up. The channel on which the PBX is running represents the incoming call from him.
I think you are going to have to use a call file to do this. There may be other, sneaky, ways of originating the call back, but I think a call file will be easiest.
I haven’t tried this. But, what about having an ‘h’ extension in the context containing the Hangup(), and then doing an Originate() from there? What I don’t know is whether Hangup() calls the ‘h’ extension. Also, I don’t know what version brought in Originate().
I am looking for the same thing. That is, after an inside extension completes a call on a trunk, I want to call back that extension. It does seem like it should be easy.
Based on the discussion so far, I will take a look at Originate. I am using 1.8.x.