Redirect a ringing OR in progress call to another extension from command


This script

bridge=$(asterisk -rx 'core show channels concise' | grep PJSIP/$exten | cut -d '!' -f13 ) 
channel=$(asterisk -rx 'core show channels concise' | grep $bridge | grep -v PJSIP/$exten- | cut -d '!' -f1) 
result=$(asterisk -rx "channel redirect $channel $context,$num,1") 
echo $result
exit 0

nicely transfers a connected call to a given extension. I was wondering if it’s possible to modify this script so it will work for calls which are ringing and not yet connected? Thanks!!

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