Jul
03
2017
0

How to connect Asterisk SIP Clients over Duel Layers of NAT

A common problem with SIP is it’s difficulty handling NAT(especially over multiple layers).  A common symptom is no audio stream.  The Asterisk CLI  shows a successful call connection succeeding followed by an error in /var/log/asterisk/messages:

[Jun 14 17:16:26] WARNING[2967] chan_sip.c: Retransmission timeout reached on transmission 4e2a8586-3a91c1cf-e73f6b64@10.1.10.115 for seqno 2 (Critical Response) — See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 6399ms with no response

(more…)

Jun
25
2012
0

Ping Test script

The script below records a ping results every 3 seconds to /var/log/ping.log.  I created this script to detemine if my NIC is losing conectivity with switch at the same time as Asterisk SIP peers are lagging out.  Enjoy!

(more…)

Written by mattb in: Asterisk,Asterisk Post,Linux | Tags: , , ,
Jul
16
2010
1

Resample MP3’s for Polycom Ringtones with Audacity

A customer of VoiceIP Solutions sent me this useful tutorial for re-sampling Polycom Ringtones.   If you have an MP3 you like, it can be re-sampled for use with a Polycom IP SIP phone!  The procedure is pretty straight forward, Install Audacity with yum or your favorite package manager, re-sample the track, then edit the proper Polycom Soundpoint boot files.

Goals of this Post:

– Install Audacity Digital Audio Editor
– Convert a MP3 to Polycom compatible track
– Enable custom special Ringtone on Polycom Soundpoint IP SIP phone

(more…)

Dec
21
2009
0

How to setup auto-provisioning for Polycom SoundPoint IP phones using the Asterisk Appliance

The Digium Asterisk Appliance has built-in features for handling Polycom SIP handsets.  It’s very easy to do and will save you the trouble of individually configuring the settings of each phone.  I have a Digium AA50 configured with a standard dial plan and a Polycom Soundpoint IP 501.

Goals of this Post:

– Configure AA50 Polycom Provisioning
– Configure Polycom SoundPoint IP 501 phone

(more…)

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

Apr
22
2009
1

sip.conf – agent logoff example

[general]

context=default                 ; Default context for incoming calls
;allowguest=no                  ; Allow or reject guest calls (default is yes)
allowoverlap=no                 ; Disable overlap dialing support. (Default is yes)
;allowtransfer=no               ; Disable all transfers (unless enabled in peers or users)

bindport=5060                   ; UDP Port to bind to (SIP standard port is 5060)
; bindport is the local UDP port that Asterisk will listen on

bindaddr=0.0.0.0                ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls

; Note: Asterisk only uses the first host
; in SRV records
; Disabling DNS SRV lookups disables the

[8888]
type=friend                    ; Friends place calls and receive calls
context=from-sip               ; Context for incoming calls from this user
secret=2005
host=dynamic                   ; This peer register with us
dtmfmode=rfc2833               ; Choices are inband, rfc2833, or info
username=8888
mailbox=8888
callerid=<8888>

Apr
02
2009
5

How to configure a Polycom SoundPoint IP phone for Asterisk on Fedora 10

In my opinion the best IP business phones on the market are made by Polycom. Anyone that knows anything about the VoIP Industry knows that!  High quality Polycom desk phones combined with Asterisk are a great combination of quality/price. So to that end we’re doing this lab.

Polycom employs several methods of provisioning the SIP phones.  For general configuration Sound Point IP have an excellent built web GUI,  but for multiple phones Polycom has an XML based system as well.  Every Sound Point IP can be provisioned based on MAC address.  Polycom’s provisioning method makes use of TFTP, FTP, or HTTP to deliver firmware updates and individual phone settings.

The goals of this post:

– Configure FTP server for Polycom firmware and configuration

– Configure Asterisk SIP extension

– deploy firmware and XML configuration files to Polycom SoundPoint IP 501 SIP phone

(more…)

Mar
19
2009
4

VoiceIP Solutions offers Asterisk PHP GUI for large scale deployments



VoiceIP Solutions
is a Asterisk ‘consulting & deployment’ company in Seattle Washington.  They deploy Asterisk solutions for businesses of all sizes.  From small offices to universities and call centers.  They have sites deployed all over the United States, but mostly on the West Coast.  I’ve been following them for some time; I guess they started deploying Asterisk before 1.2 was released.  I talked to one of their sales rep’s(I think his name was Liam) about the business and wondered if they had done any development work?  He told me that they had done some PHP work for managing larger installs and proceeded to direct me to one of there engineer/developers.

(more…)