アスタリスクでの基本的なコール センターのセットアップに C 言語で AGI を使用しています。
[PUNDIT]
exten =>92186,1,agi(Pundit/PunditBin)
exten=>92186,2,Hangup
PunditBin は C アプリケーションです。通話を受信すると、アプリはエージェントの SIP URI を直接ダイヤルし、機能します (エージェントの電話が鳴る)。
fprintf(stdout,"EXEC Dial SIP/%s,50\n",Free_Pundit);
しかし問題は、アプリ自体に ACD ロジックを含める必要があることです。ただし、Asterisk Queue と ACD メカニズムを使用したいと考えています。
次の方法でアスタリスク ACD を構成しました。
**queues.conf:-**
[exchat_pundit]
musicclass=default ; play [default] music
strategy=rrmemory ; use the Round Robin Memory strategy
joinempty=no ; do not join the queue when no members available
leavewhenempty=yes ; leave the queue when no members available
ringinuse=no ; don't ring members when already InUse (prevents
context=QueueMemberFunctions
**Extension.conf**
//Moving the call to Queue of agents
[Queues]
exten => 7001,1,Verbose(2,${CALLERID(all)} entering the chat Pundit queue)
same => n,Queue(exchat_pundit)
same => n,Hangup()
[LocalSets]
include => Queues ; allow phones to call queues
//Agent Registration, Pause etc..
[QueueMemberFunctions]
exten => *54,1,Verbose(2,Logging In Queue Member)
same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
same => n,AddQueueMember(exchat_pundit,${MemberChannel})
; ${AQMSTATUS}
; ADDED
; MEMBERALREADY
; NOSUCHQUEUE
exten => *56,1,Verbose(2,Logging Out Queue Member)
same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
same => n,RemoveQueueMember(exchat_pundit,${MemberChannel})
; ${RQMSTATUS}:
; REMOVED
; NOTINQUEUE
; NOSUCHQUEUE
exten => *72,1,Verbose(2,Pause Queue Member)
same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
same => n,PauseQueueMember(exchat_pundit,${MemberChannel})
; ${PQMSTATUS}:
; PAUSED
; NOTFOUND
exten => *87,1,Verbose(2,Unpause Queue Member)
same => n,Set(MemberChannel=${CHANNEL(channeltype)}/${CHANNEL(peername)})
same => n,UnpauseQueueMember(exchat_pundit,${MemberChannel})
; ${UPQMSTATUS}:
; UNPAUSED
; NOTFOUND
**Sip.conf:-**
//Agents
[ABC]
type=friend; 'user' takes incoming calls
secret=welcome ; password for authenticating the user
nat=yes
disallow=all ; Disallow all codecs for this peer or user definition.
allow=speex
allow=gsm
allow=ulaw
allow=alaw
host=dynamic ; what kind of host you are dealing with and the value .dynamic.
context=QueueMemberFunctions; this is what ties up the Asterisk SIP user with the dialplan in
username=ABC; this field specifies the user name for authentication.
regexten=ABC;
[XYZ]
type=friend; 'user' takes incoming calls
secret=welcome ; password for authenticating the user
disallow=all ; Disallow all codecs for this peer or user definition.
allow=speex
allow=gsm
allow=ulaw
allow=alaw
host=dynamic
context=QueueMemberFunctions
username=XYZ;
regexten=XYZ;
ここで、SIP 電話を使用して直接内線番号 7001 に電話をかけると、電話はラウンド ロビン方式でエージェントに送信され、問題なく動作します。
問題は、次のように C コードから内線番号 7001 をダイヤルすると機能しないことです。
fprintf(stdout,"EXEC Dial 7001,50\n");
着信コールをエージェントのキューに送信できません。
問題を解決するために私を助けてください。
よろしく、 ラグヴェンドラ・クマール