Created
December 19, 2018 04:33
-
-
Save ambiorixg12/e376c5e814a09a67ff507b55c48f43f0 to your computer and use it in GitHub Desktop.
redirecting both call legs to different destination using in a live call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| exten=>_6XXX,1,NoCDR() | |
| same=>n,Noop(${EXTEN} ${CHANNEL} ${CDR(dstchannel)}) | |
| same=>n,Set(__DYNAMIC_FEATURES=transf) | |
| exten=>_6XXX,n,Dial(PJSIP/${EXTEN}) | |
| ;;;;custom transfer | |
| [customtransfer] | |
| exten=>s,1,Noop(${EXTEN} ${CHANNEL}) | |
| same=>n,Set(__a=${SHELL(asterisk -x " core show channels " | grep 'PJSIP/6005-' | awk '{print $1}')}) | |
| same=>n,Set(__b=${SHELL(asterisk -x " core show channels " | grep 'PJSIP/6001-' | awk '{print $1}')}) | |
| same=>n(vmcaller),System(/usr/sbin/asterisk -x "Channel Redirect ${a:0:-1} internal,8095445555,1") | |
| same=>n(vmcaller),System(/usr/sbin/asterisk -x "Channel Redirect ${b:0:-1} park,s,1") | |
| [park] | |
| exten=>s,1,Answer() | |
| same=>n,MusicOnHold(default) | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
| /etc/asterisk/features.conf | |
| transf =>*1,peer,Dial(Local/s@customtransfer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment