[asterisk-users] Getting DIALSTATUS from SIP provider
Jim Dickenson
dickenson at cfmc.com
Thu Feb 5 21:51:03 CST 2009
I use sipphone.com as my sip provider for testing. If I use the following
AMI packet and extensions I connect to the QueueAnswer extension, as if the
called party answered, before the called phone even rings once. This
prevents me from getting no answer or busy status returned from the Dial
application. What might I be doing wrong to not have the sip provider return
me correct call statuses?
I am using version 1.4.23.1
Action: Originate
Channel: Local/DialNumber at cfmc_cdi_info
Exten: QueueAnswer
Context: cfmc_cdi_info
Priority: 1
Variable: CfMC_ActionID=callE1321
Variable: CfMC_QueueToUse=tqe
Variable: CfMC_AgentToUse=1001
Variable: CfMC_DialInfo=SIP/xxxyyyzzzz at proxy01.sipphone.com
Variable: CfMC_RingTimeout=20
Variable: CfMC_DoAMD=No
ActionID: callE1321
Async: true
exten =>
DialNumber,1,UserEvent(BeforeDial,ActionID:${CfMC_ActionID}=${CHANNEL} &
${UNIQUEID} & ${CfMC_DialInfo} ** ${CfMC_RingTimeout})
exten => DialNumber,n,Dial(${CfMC_DialInfo},${CfMC_RingTimeout})
; DIALSTATUS - CHANUNAVAIL CONGESTION NOANSWER BUSY ANSWER CANCEL DONTCALL
TORTURE INVALIDARGS
exten =>
DialNumber,n,UserEvent(AfterDial,ActionID:${CfMC_ActionID}=${CHANNEL} &
${UNIQUEID} & ${CfMC_DialInfo} == ${DIALSTATUS})
exten => DialNumber,n,Hangup()
exten => QueueAnswer,1,Answer()
exten => QueueAnswer,2,Set(CfMC_AMDValue="NotChecked")
exten => QueueAnswer,3,GotoIf($["${CfMC_DoAMD}"!="Yes"]?NoAMD)
exten => QueueAnswer,4,AMD()
; AMDSTATUS - MACHINE HUMAN NOTSURE HANGUP
exten => QueueAnswer,5,Set(CfMC_AMDValue="${AMDSTATUS}")
exten => QueueAnswer,6(NoAMD),Wait(0.3)
exten =>
QueueAnswer,7,UserEvent(BeforeQueue,ActionID:${CfMC_ActionID}=${CHANNEL} &
${CfMC_DialInfo} & ${CfMC_AMDValue})
exten => QueueAnswer,8,GotoIf($["${CfMC_AMDValue}"="NotChecked"]?QueueIt)
exten => QueueAnswer,9,GotoIf($["${CfMC_AMDValue}"!="HUMAN"]?ForceHangUp)
exten => QueueAnswer,10(QueueIt),Queue(${CfMC_QueueToUse},n,,,20)
; QUEUESTATUS - TIMEOUT FULL JOINEMPTY LEAVEEMPTY JOINUNAVAIL LEAVEUNAVAIL
exten =>
QueueAnswer,11,UserEvent(AfterQueue,ActionID:${CfMC_ActionID}=${CHANNEL} &
${CfMC_DialInfo} & ${CfMC_QueueToUse} & ${CfMC_AgentToUse} & ${QUEUESTATUS})
exten => QueueAnswer,12(ForceHangUp),Hangup()
--
Jim Dickenson
mailto:dickenson at cfmc.com
CfMC
http://www.cfmc.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090205/e3093e69/attachment.htm
More information about the asterisk-users
mailing list