Skip to content

Instantly share code, notes, and snippets.

@frutik
Created March 19, 2012 12:57
Show Gist options
  • Save frutik/2111131 to your computer and use it in GitHub Desktop.
Save frutik/2111131 to your computer and use it in GitHub Desktop.
[kyivstar_out]
exten => s,1,Set(CALLERID_ORIG=${CALLERID(num)})
exten => s,n,Set(CDR(userfield)=${DST_NUM})
exten => s,n,NoOp(${DIALEDPEERNUMBER})
exten => s,n,Log(WARNING, ${DST_NUM})
exten => s,n,NoOp(${CALLERID_ORIG})
exten => s,n,Monitor(wav,${UNIQUEID},mb)
exten => s,n,Set(LIMIT_WARNING_FILE=beep)
exten => s,n,Set(LIMIT_PLAYAUDIO_CALLER=no)
exten => s,n,Set(LIMIT_PLAYAUDIO_CALLEE=yes)
exten => s,n,Dial(SIP/${DST_NUM}@kyivstar,180,rT)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-BUSY,1,Log(WARNING, "${CONTEXT} - BUSY FALLBACK")
exten => s-BUSY,n,Set(ODBC_LOG_CHANNEL_STATUS("${CONTEXT}", "${DST_NUM}", "${DIALSTATUS}", "false")=sql_result)
exten => s-BUSY,n,Goto(farlep_out,s,1)
exten => s-CONGESTION,1,Log(WARNING, "${CONTEXT} - CONGESTION FALLBACK")
exten => s-CONGESTION,n,Set(ODBC_LOG_CHANNEL_STATUS("${CONTEXT}", "${DST_NUM}", "${DIALSTATUS}", "false")=sql_result)
exten => s-CONGESTION,n,Goto(farlep_out,s,1)
exten => s-.,1,Log(WARNING, "Status: ${DIALSTATUS}")
exten => s-.,n,Set(ODBC_LOG_CHANNEL_STATUS("${CONTEXT}", "${DST_NUM}", "${DIALSTATUS}", "true")=sql_result)
exten => h,1,Log(WARNING, ${DIALSTATUS})
exten => h,n,Set(ODBC_LOG_CHANNEL_STATUS("${CONTEXT}", "${DST_NUM}", "${DIALSTATUS}", "true")=sql_result)
exten => t,1,Log(WARNING, ${DIALSTATUS})
exten => t,n,Set(ODBC_LOG_CHANNEL_STATUS("${CONTEXT}", "${DST_NUM}", "${DIALSTATUS}", "false")=sql_result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment