Connecting Asterisk with Freeswitch
https://wiki.freeswitch.org/wiki/Connecting_Freeswitch_and_Asterisk
a) connected Freeswitch to Asterisk server (https://wiki.freeswitch.org/wiki/Connecting_Freeswitch_and_Asterisk)
b) dialed Freeswitch extension in Asterisk as
exten => 1100,1,Dial(SIP/freeswitch_1/${EXTEN},30,M(testme))
Where the macro testme is:
[macro-testme]
exten => s,1,NoOp()
exten => s,n,Set(TIMEOUT(digit)=100)
exten => s,n,Verbose(3,in macro testme)
exten => s,n,Read(DIGIT_PRESSED,,1,,100)
exten => s,n,Set(GLOBAL(DIGIT_PRESSED)=${DIGIT_PRESSED})
exten => s,n,Verbose(DIGIT PRESSED=${DIGIT_PRESSED})
exten => s,n,Set(MACRO_RESULT=CONTINUE)
c) Then transferred the call
same => n,GotoIf($[${DIALSTATUS}=ANSWER]?answered:noAnswer)
same => n(answered),Verbose(3, digit pressed=${DIGIT_PRESSED})
same => n,GotoIf("${DIGIT_PRESSED}" = "3" ?call-agi:noDigit)
No comments:
Post a Comment