Customizing Yeastar U100

Earlier this year I deployed a Yeastar MyPBX U100 for a new customer. This was prior to the S-Series becoming available in my area. The U100 supports 8 modules and I installed 4 x O2 and 2 x SO modules, leaving 2 free slots. This configuration allows for 10 analogue phone lines and 2 analogue phones. The customer currently has 8 lines and 1 fax machine.

I had issues with the fax machine talking and had to dive into the configuration files as not every option is exposed in the U100’s web interface. In doing this I found that the U100 was running Asterisk 1.6.2.6 so I downloaded that version of asterisk to get the appropriate documentation.
The U100 would recognize an inbound fax call okay, it would even receive it and send it on by email. None of the email clients I tried would display the file properly though (Android = blank picture, Outlook = blank picture, Thunderbird on Linux = distorted image as it ignored the DPI). Installing the “File Viewer” app on Android fixed the image presentation issue. The U100 would only send as a TIFF file. So I decided to try forwarding the inbound fax call to the fax machine on the FXS port and let the fax machine handle the call by printing the fax as well as emailing a PDF version. However, this did not work out completely. I was able to pass the inbound calls but they were not received properly, nor was I able to send faxes from the fax machine. I ended up having to edit the chan_dahdi.conf and users.conf as the fax detection was set to “incoming” and I needed it set to “both”.

chan_dahdi_custom.conf

[channels]
usecallerid=yes
hidecallerid=no
usecallingpres=yes
echocancel=yes
echocancelwhenbridged=yes
immediate=no
language=en
;faxdetect=incoming
faxdetect=both
;#include dahdi-pri.conf
#include dahdi-channels.conf

users_custom.conf

I had to edit the settings on the FXS port adding the “faxdetect = both” line.

[399]
dahdichan = 13
fullname = 399
cid_number = 399
vmsecret = 603
emailaddress = 
email = 
rxflash = 1000
callgroup = -1
pickupgroup = -1
callwaiting = no
hasmanager = yes
hasvoicemail = no
hasagent= yes
;mailbox = 
signalling = fxo_ks
threewaycalling = no
call-limit = 100
context = DLPN_DialPlan399
srtpcapable = no
faxdetect = both
rxgain = 0
txgain = 0

I also had to edit each of the trunks (there are 8 of them) adding the “faxdetect = both” line.

trunkname = pstn1
dahdichan = 1
channel = 1
group = 21
busydetect = yes
busycount = 4
busypattern = 
busydetecttype = 0
busyfrequency = 
cidstart = ring
cidsignalling = bell
trunkstyle = analog
hasexten = no
hasiax = no
hassip = no
answeronpolarityswitch = no
hanguponpolarityswitch = no
usecallerid = yes
flash = 750
gui_volume = 2
signalling = fxs_ks
gui_fxooffset = 0
rxgain = 0
txgain = 0.0
context = DID_trunk_1
busyinterval = 1
accuratebilling = 
ring_deviation = 5
silence_deviation = 5
custom_ring_tone = no
ring_length = 
silence_length = 
mintonedetect = no
minringlength = 
minsilencelength = 
ringtimeout = 8000
faxdetect = both

Since I had to customize the trunk settings here, the web interface is now useless for editing the trunks.
With the “faxdetect = both” line added I can now send and receive faxes via the fax machine on the FXS port.

Custom Forwarding

The way these people wanted to work, they would be out of the office quite a bit. So I was able to enable the mobile extension support and have the system recognize their mobile phones. Forwarding to their mobile was easy but required multiple steps: 1) set forward always to a custom number 2) set the custom number. This was too complicated so I ended up creating a 2 digit star code for them.

Forward to Mobile

I edited the extensions_custom.conf adding the “*76” extension.

[set-out-of-office-to-mobile]
exten = *76,1,Answer()
 same = 2,Wait(1)
 same = 3,Set(MobileNo=${DB(FindMobile/${CONTEXT:13})})
 same = 4,GotoIf($[${LEN(${MobileNo})}>0]?7)
 same = 5,Playback(beeperr)
 same = 6,Goto(end)
 same = 7,Set(DB(CFD/${CONTEXT:13})=0)
 same = 8,Set(DB(CFB/${CONTEXT:13})=1)
 same = 9,Set(DB(CFN/${CONTEXT:13})=1)
 same = 10,Set(DB(DND/${CONTEXT:13})=0)
 same = 11,Set(DB(CF/${CONTEXT:13})=9${MobileNo})
 same = 12,Set(DB(CFA/${CONTEXT:13})=1)
 same = 13,Wait(1)
 same = 14,Playback(record/cf2mobile)
 same = 15,Wait(1)
 same = 16,Hangup()

This dial plan makes use of Yeastar’s FindMobile functionality to identify the mobile number assigned to the calling extension.
It then sets a number of entries in the database.

  • It sets the call forward destination (CFD) to “0” meaning a custom number.
  • It enables the call forward on busy (CFB)
  • It enables the call forward no answer (CFN)
  • It disabled the do not disturb (DND)
  • It sets the call forward number (CF) to the mobile number with the outbound prefix 9
  • It enables the call forward always (CFA)

After all that a prompt is played that tells the user their extension has been forwarded to the mobile.

Forward to Voicemail

I also added the “*77” extension to forward all calls to voice mail.

exten = *77,1,Answer()
 same = n,Wait(1)
 same = n,Set(DB(CFD/${CONTEXT:13})=1)
 same = n,Set(DB(CFB/${CONTEXT:13})=1)
 same = n,Set(DB(CFN/${CONTEXT:13})=1)
 same = n,Set(DB(DND/${CONTEXT:13})=0)
 same = n,Set(DB(CFA/${CONTEXT:13})=1)
 same = n,Playback(record/cf2vm)
 same = n,Wait(1)
 same = n,Hangup()

This sets the database entries to always forward to voicemail.

How these people work

Enter the office, dial “*70” to set the phone to default forwarding settings so the phone will ring normally.
Before leaving for lunch dial “*76” so that all calls will be sent to the mobile phone.
Return from lunch dial “*70”.
Before leaving the office at the end of the day dial “*76” to forward to mobile.
From home they will continue to work for a few more hours as needed. When they call it quits they call in with their mobile and dial “*77” which then forwards their extension to voice mail.

Remote Workers

This office has people that work 9-5 in the office and work from home after that when required. They also have sales people that work from home 95% of the time and sales people that are in the office 50% of the time. Then there’s me and the owners.
The office staff and sales people all have mobile phones linked to the system via the mobility extensions.
The owners and myself have extensions on this system running out of our locations. We use SIP remotely for these extensions. This eliminates all long distance calls between the office and us and also does not use the phone lines on the system.
I have experimented with Zoiper on my Android phone.
I have not divulged, to the office staff, that we could use a soft phone on their laptops nor that video can also be used.
NAT has to be set up properly for remote SIP access to function.

Limitations

You can only have a single connection per protocol for an extension. So only 1 phone using SIP and only 1 device using IAX. So for me I can have my desk phone using SIP and my Android phone using Zoiper with IAX.

Guests

I was unable to get “guest calls” to work. So the system will not accept VoIP calls from the internet. It was supposed to be just a matter of checking the “allow guest” in the web interface but that did nothing that I could find, I was always prompted for a login. Maybe it has something to do with the NAT settings as well.
Not a big deal, though it would be nice to chop the long distance and international calling off the phone bill.

Bookmark the permalink.

Comments are closed.