Apr 13

This setup will enable per extension CallerID to be sent through your SIP trunk provider. It also enables CID to be passed through the system when a call is forwarded. This allows the receiver of the forwarded call to see the calling parties CID rather than the CID of the trunk or PBX. This setup also circumvents a common problem when a phone is forwarded, wherein all attempted calls to the forwarded extension fail with a ‘604 Does Not Exist Anywhere’ error being returned from the provider.

This has been tested with Cbeyond SIPconnect and Speakeasy SIP Trunking and is likely to work with any provider that uses a BroadWorks platform to deliver SIP trunks. The CID functionality is accomplished by adding a diversion header into the call setup.

First, connect to your PBXinaFlash PBX and edit /etc/asterisk/extensions_override_freepbx.conf using your favorite text editor. (You will most likely want to connect to your PBXinaFlash system via SSH using a client like PuTTY.) The file will probably be empty except for a comment in the first line. Add the following lines to the file (note the changes to the 3rd to the last line below):

[macro-outbound-callerid]
include => macro-outbound-callerid-custom
exten => s,1,ExecIf($[“${CALLINGPRES_SV}” != “”],SetCallerPres,${CALLINGPRES_SV})
exten => s,n,ExecIf($[“${REALCALLERIDNUM:1:2}” = “”],Set,REALCALLERIDNUM=${CALLERID(number)})
exten => s,n(start),GotoIf($[ $[“${REALCALLERIDNUM}” = “”] | $[“${KEEPCID}” != “TRUE”] | $[“${OUTKEEPCID_${ARG1}}” = “on”] ]?normcid)
exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM})
exten => s,n,GotoIf($[“foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}” = “foo”]?bypass)
exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)})
exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
exten => s,n,GotoIf($[ $[“${EMERGENCYROUTE:1:2}” = “”] | $[“${EMERGENCYCID:1:2}” = “”] ]?trunkcid)
exten => s,n,Set(CALLERID(all)=${EMERGENCYCID})
exten => s,n(exit),MacroExit()
exten => s,n(trunkcid),ExecIf($[“${TRUNKOUTCID:1:2}” != “”],Set,CALLERID(all)=${TRUNKOUTCID})
exten => s,n(usercid),ExecIf($[“${USEROUTCID:1:2}” != “”],Set,CALLERID(all)=${USEROUTCID})
exten => s,n(usercid),SIPAddHeader(Diversion: <sip:NPANXXXXXX@provider.domain.or.proxy>;reason=unconditional)
exten => s,n(hidecid),ExecIf($[“${CALLERID(name)}”=”hidden”],SetCallerPres,prohib_passed_screen)
; end of [macro-outbound-callerid]

Next, in the 3rd to the last line, you will need to customize the string that reads ‘<sip:NPANXXXXXX@provider.domain.or.proxy>‘. Replace ‘NPANXXXXXX’ with your main phone number. On Cbeyond, this is also your username. If you are on Cbeyond, replace ‘provider.domain.or.proxy’ with the FQDN of the Cbeyond proxy (will be similar to ‘sipconnect.atl0.cbeyond.net’). If you use Speakeasy, replace ‘provider.domain.or.proxy’ with ‘speakeasy.net’. The resulting line will look similar to the following:

exten => s,n(usercid),SIPAddHeader(Diversion: <sip:4045551212@speakeasy.net>;reason=unconditional)

Assuming you already had a working trunk, no other changes should be necessary, however it is worth checking a couple settings before reloading. With regard to the trunk settings, it is important to ensure that you don’t have a ‘fromuser’ line in peer details section. If you do, simply remove it. Depending on your version of PIAF, you may have a setting for ‘Never override CallerID’. Be sure that this is not checked. Also, it is a good idea to leave the ‘Outbound Caller ID’ blank. On later versions of PIAF, there is a ‘CID Options:’ setting. Set this to ‘Allow any CallerID’

NOTE: Each extension MUST INDIVIDUALLY have an outbound CID specified. Otherwise, the call will get rejected and you will get a “all circuits busy” message when attempting to make a call.

Reload PIAF and give it a try!

Sep 19

How to enable SIP video in PBX in a Flash

By agatewood VoIP Comments Off on How to enable SIP video in PBX in a Flash

Add the following to /etc/asterisk/sip_general_custom.conf

videosupport=yes
allow=h261
allow=h263
allow=h263p

For each extension that will use video, diallow all codecs, then allow needed audio codecs (usually ulaw, alaw, gsm, speex) and allow needed video codecs (usually h261, h263, h263p). Through the GUI, this can be accomplished by separating each codec with and ampersand character ‘ & ‘.

Asterisk 1.4 cannot negotiate the video codec as its support for video is really pass-thru. Becuase of this, video UAs need to have codecs matched manually to establish a video call.

Tagged with:
Aug 19

How to remove errors on status screen about default passwords in PIAF

By agatewood VoIP Comments Off on How to remove errors on status screen about default passwords in PIAF

Excerpted from http://pbxinaflash.com/forum/archive/index.php?t-665.html

/var/www/html/admin/header.php: starting around line 137

// default password check
$nt = notifications::create($db);
//if ($amp_conf[‘AMPMGRPASS’] == $amp_conf_defaults[‘AMPMGRPASS’][1]) {
// $nt->add_warning(’core’, ‘AMPMGRPASS’, _(”Default Asterisk Manager Password Used”), _(”You are using the default Asterisk Manager$
//} else {
$nt->delete(’core’, ‘AMPMGRPASS’);
//}

/var/www/html/admin/common/db_connect.php: starting around line 77
// Now send or delete warning wrt to default passwords:
//
$nt = notifications::create($db);

//if ($amp_conf[‘AMPDBPASS’] == $amp_conf_defaults[‘AMPDBPASS’][1]) {
// $nt->add_warning(’core’, ‘AMPDBPASS’, _(”Default SQL Password Used”), _(”You are using the default SQL password that is widely kn$
//} else {
$nt->delete(’core’, ‘AMPDBPASS’);
//}

Refresh your browser on the FreePBX System Status page after making all the changes to each file to make sure you commented out the correct lines!!

Tagged with:
preload preload preload