Jun
28
2009
1

Polycom 501 XML configuration file Example

This file is named by the MAC address of your Polycom SoundPoint IP SIP phone followed by, ‘-phone.cfg’.  In your FTP folder you would have a file for each phone – I have a single phone.  It’s MAC is ‘0004F202734B’; so my phones configuration file would be named, ‘0004f202734b-phone.cfg’.  I believe there are other conventions for naming this file as well.

The example below was used to connect my phone with a VoiceIP Solutions Asterisk PBX.  This example shows just a fraction of the many possible features in this line.  For my purposes, I defined the Asterisk server IP address, and it’s SIP credentials.  I also added the NTP server.  The ‘mwi’ tag refers to ‘message waiting information’, here I set the mailbox(s) I’m subscribing to and the extension to check voicemail.   My Asterisk voicemail menu is extension ‘299’.

0004f202734b-phone.cfg:

<?xml version=”1.0″ encoding=”UTF-8″ standalone=”yes”?>
<!– Example Per-phone Configuration File –>
<!– $RCSfile: phone1.cfg,v $  $Revision: 1.104.2.2 $ –>
<phone1>
<reg
reg.1.displayName=”5555″
reg.1.address=”5555″
reg.1.auth.userId=”5555″
reg.1.auth.password=”2005″
reg.1.server.1.address=”192.168.1.254″
tcpIpApp.sntp.address=”pool.ntp.org”
tcpIpApp.sntp.gmtOffset=”-33600″
>
<mwi
msg.mwi.1.subscribe=”5555″
msg.mwi.1.callBackMode=”contact”
msg.mwi.1.callBack=”299″
>
</phone1>

Apr
22
2009
0

Asterisk: Creating an Extension to Logout Agents from CallerID

I told a customer for the company I for that I would figure out how to logout agents by CID(Caller ID). So I figured, why not kill two birds with one stone. Today we will create a single Queue, Agent, and dial plan to accomplish this goal. I’m using Asterisk 1.4, Fedora 10 and a Polycom IP SIP phone for my demonstration purposes.

When I started this project four hours ago, I thought I would google my way to another successful blog post(and happy customer), but no…  logging out agents in Asterisk is very unintuitive.  The agentcallbacklogin utility has the exact same prompts for logging in as out.  AgentCallbackLogin (when initiated, from the dial plan)  asks for three things, agent, agent password, and call back number.  To eliminate all these prompts I’m using the ‘$CallerID(num)’ variable to automatically answer the agent and call back number.  So the user 8888 dials ‘1000’ and and AgentCallbackLogin assumes he is AGENT/8888 with a password of ‘8888’.

from /etc/asterisk/extensions.conf

exten => 1000,1,AgentcallbackLogin(${CALLERID(num)}||${CALLERID(num)}@savelono-queue-out)
exten => 1000,n,hangup

(more…)

Apr
22
2009
1

extensions.conf – agent logoff example

[general]

static=yes
writeprotect=no

[bogon-calls]

exten => _x.,1,Congestion

[macro-stdexten]
;
;for dialing internal extensions

exten => s,1,Set(dynext=${DB(dynext/${ARG1})})
exten => s,n,NoOp(${dynext})
exten => s,n,NoOp(${LEN(${dynext})})
exten => s,n,GotoIf($[“${LEN(${dynext})}” = “7”]?s,100)
exten => s,n,GotoIf($[“${LEN(${dynext})}” = “10”]?s,100)
exten => s,n,GotoIf($[“${LEN(${dynext})}” = “11”]?s,100)
exten => s,n,GotoIf($[“${LEN(${dynext})}” = “6”]?s,200) ; Calls 6-digit Extension
exten => s,n,GotoIf($[“${LEN(${dynext})}” = “0”]?s,300) ; Calls 6-digit Extension
exten => s,n(dial),Dial(SIP/${dynext},20,twW) ; Ring the interface, 20 seconds maximum
exten => s,n,Goto(s-${DIALSTATUS},1) ; Jump based on status
exten => s,100,Dial(ZAP/g1/${dynext},20,twW) ; Ring the interface, 20 seconds maximum
exten => s,101,Goto(s-${DIALSTATUS},1) ; Jump based on status
exten => s,200,Goto(from-sip,${dynext},1); Calls 6-digit Extension
exten => s,300,Set(dynext=${ARG1})
exten => s,301,Goto(dial)

exten => s-BUSY,1,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce
exten => s-BUSY,2,Hangup
exten => s-NOANSWER,1,Voicemail(u${ARG1}) ; If unavailable, send to voicemail
exten => s-NOANSWER,2,Hangup
exten => _s-.,1,Goto(s-NOANSWER,1) ; Treat anything else as no answer

[from-sip]

include => test
include => from-internal

[test]

exten => 1234,1,agi(matts-test.agi)
exten => 1234,2,wait(2)
;exten => 1234,n,voicemail(8888)
exten => 1234,n,hangup

[from-internal]

;Standard Internal Extensions

exten => _888X,1,Macro(stdexten,${EXTEN},sip/${EXTEN})
exten => _888X,2,Hangup

;Logon
exten => 1000,1,AgentcallbackLogin(${CALLERID(num)}||${CALLERID(num)}@savelono-queue-out)
exten => 1000,n,hangup

;Logoff – best alternative I’ve found so far
;could be better with additional logic

exten => 1001,1,System(/usr/sbin/asterisk -rx “agent logoff Agent/${CALLERID(NUM)}”)
exten => 1001,n,RemoveQueueMember(savelono-support|Agent/${CALLERID(NUM)})
exten => 1001,n,Playback(agent-loggedoff)
exten => 1001,n,Playback(auth-thankyou)
exten => 1001,n,Hangup

;Logoff this way works but is not very intuitive because you
;have to hit the # key when prompted for a dial back extension
;it really doesn’t make sense to endusers
;
exten => 1002,1,AgentcallbackLogin(${CALLERID(num)}||)
exten => 1002,n,hangup

[savelono-queue-out]

include => from-internal