Redirect call by excluding caller before answering (extension.conf)

I got three phones. 37100 37200 and 37300 .

Trying to call 37200 through 37100, but then I want it to hangup and do another thing after the hangup but as everyone knows that after executing the hangup application in extensions.conf then the rest of the script would not be executed !

so here comes my concern !

If i am calling from 37100 to 37200, then could I (by scripting in extensions.conf) make the call be originated from 37200 to 37300 ! which means exclude the phone that originated the first call (hang its call up) then make the asterisk generate another call from 37200 to 37300.

The g option on Dial allows the dialplan to continue after the callled party hangs up.

@david551
thanks for the help but to be clear and sorry for being not …
what i am trying to do is :
if 37100 called 37200 then i want this call to hangup with or without answering and another call (37200 to 37300) be originated …

Sounds like you want to use originate.

does originate allow me to choose from which to which ? or only to which ?
since i am trying to exclude the caller from the new call

Originate sets up a completely new call. You would never call the callee in the initial call. You could check if they were busy.

1 Like

@david551 alright then …
if 37100 called 37200 and 37200 is busy then for example by originate i could make 37300 call 37400 right ?

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