I HAVE A DREAM Incredible PBX 12 for Ubuntu 14.04

Discussion in 'Developers' Corner' started by wardmundy, Nov 1, 2014.

  1. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450

    Nothin' that I'm aware of.
     
  2. wa4zlw

    wa4zlw Member

    Joined:
    Feb 14, 2008
    Messages:
    845
    Likes Received:
    22
    HI Ward...desktop or server install for Ubuntu? I would think server is smaller footprint?

    Leon
     
  3. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    Basic server is fine.
     
  4. jie394

    jie394 Guru

    Joined:
    Nov 2, 2014
    Messages:
    5
    Likes Received:
    2

    Ok, for anyone else interested, I fiddled around last night and learned the following:

    • The PJSIP module does support IPv6 for both TCP and UDP. There are a number of other IPv6-related things that the PJSIP project says it doesn't do yet (such as IPv6 SRV lookups), but it's not clear what is and is not relevant to Asterisk's use of it. It may use PJSIP only for the signalling stack, and do its own DNS look-ups, for example.
    • It's not enabled by default when compiling. I enabled it by tweaking the Incredible install script via:
    Code:
    echo "#define PJ_HAS_IPV6 1" > pjlib/include/pj/config_site.h

    ... at the appropriate spot (after configure, before make dep && make install)​
    • FreePBX doesn't have a way to modify the pjsip.transports.conf to add or modify other transports. You can sort of do this via editing the file followed by amportal restart, but there's a warning that it will get overwritten at some point. It will only get overridden if you modify the transports, which FreePBX doesn't really give you a way to do... but in short, they don't support it now.
    • I turned up trunks to Vitelity as a pjsip trunk with no issue. Configure, called inbound with a DID routed to IVR, and bam. No problem.
    • .... However, I couldn't get any softphones to register. I tried both Linphone and X-lite softphones, and could never finish registration. It worked from an IPv6 transport perspective, but I could never get the endpoint -> aor -> identify -> etc chain of events to work. One extension kept failing due to "AOR not found in vitelity-outbound" (and why would an extension be seen in that context?). Others would fail to map an extension to the proper endpoint. As this was my first foray into pjsip endpoints (and my asterisk is a few years rusty), I don't know if problems were configuration in general, or something about IPv6 and transport. I didn't want to reconfigure my network to use IPv4, so I called it a night at 11pm and converted everything back to SIP.
      • Googling error messages for pjsip was less than helpful. One of the hits I did find was a request to add some debugging to aid in..., well debugging, but the request was closed with a statement that the endpoint was misconfigured, and you wouldn't need to troubleshoot if it wasn't misconfigured. True statement, but not helpful.
    • When you convert extensions from PJSIP to SIP, FreePBX DIAL section isn't updated properly from PJSIP/701 to SIP/701. This breaks things until you notice.
    • Probably not relevant to any of my testing, but as I broke the cardinal rule of troubleshooting by changing multiple things at once: this build did not have the dahdi or libpri modules.
    In short:
    • PJSIP doesn't have IPv6 enabled by default.
    • FreePBX doesn't have a field to let you add or modify transports. (Not specific to IPv6, I guess. Can't change any bind address, only the port)
    • It worked on my trunk with no issue, but jury is out for endpoints.
    • FreePBX misses a few things when converting extension from PJSIP to SIP driver (also not specific to IPv6)
    HTH,
    Joel
     
    wardmundy likes this.
  5. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    Great info. Thanks, Joel.
     
  6. xrobau

    xrobau Guru

    Joined:
    May 14, 2009
    Messages:
    10
    Likes Received:
    8
    As I'm the kinda go-to guy with Ubuntu, this was pointed out to me.. There's a couple of things that seem to have been lost in translation when the Incredible stuff was built - specifically, all the IPv6 stuff has been missed. You mention it here:

    That's actually done as a parameter passed to configure - see:
    http://wiki.freepbx.org/display/HTG...nUbuntuServer14.10-Compileandinstallpjproject

    I know that's wrong - I wrote the code to do that!
    [​IMG]
    Yes. This is true. However, you probably need to be asking for that sort of in-depth stuff at community.freepbx.org, rather than here, as those sort of things you'd need to speak to Andrew or I about -- or jump onto IRC and ask us there. (I even fixed the Online Support IRC module so it works with current java versions, too, which I was all excited about, you guys should use it!)
    Oh. That IS a bug. Andrew's gone and opened a bug for you about that here -- http://issues.freepbx.org/browse/FREEPBX-8212 -- it would be awesome if, as you find more bugs, you tell us about them so we can fix 'em.

    Also, If you think the transports aren't configurable ENOUGH, please feel free to open a feature request. I think I managed to hit 95% of what people would need. If not, they can just use a _custom.conf file.

    --Rob
     
    jie394 and wardmundy like this.
  7. Bob Helbush

    Bob Helbush Member

    Joined:
    May 22, 2013
    Messages:
    96
    Likes Received:
    25
    Jake likes this.
  8. jie394

    jie394 Guru

    Joined:
    Nov 2, 2014
    Messages:
    5
    Likes Received:
    2

    Hi Rob,

    Thanks for pointing out the Ubuntu specific link. I'll take a look in those forums as well. I browsed those in years past and this week, but there seemed to be more technical meat here. "Nerd vittles" also makes me chuckle.

    For adding IPv6 via the Advanced Settings page you referenced that creates pjsip.transports.conf, I still can't create a config to bind to an IPv6 address. With or without advanced (and advanced just shows me the loopback interface), all bind parameters are set to 0.0.0.0. The other options there I assumed were ways to override the advanced SIP defaults to set the external address if there's a NAT, but tried pasting various interfaces here. I rechecked the .conf after every update, and the bind address was always 0.0.0.0.

    This is on FreePBX 12.0.5. I don't see any other buttons to click.

    I didn't try the _custom.conf version, as I know the available transports are listed as options for pjsip extensions, and didn't know if freepbx would dynamically learn anything there if I created new transport types. A manual edit seemed safe enough for testing by changing only the bind address to :: and leaving the transport name unaffected. I briefly thought of trying the _custom.conf, but I admit I was getting tired at 11pm and frustrated with [trying to] learn how pjsip tied together endpoints with aors. I was starting to wonder if it expects different transports for internal and external interfaces when I saw extensions trying to locate aorss with my trunk.

    Will do, but I'm not too proud to admit I'm still re-learning Asterisk, learning pjsip, and unlearning the non-SIP "voice-over-IP" cluttering up my brain. In other words, I try not to report bugs unless I know it's a bug and not me screwing things up. As I was fiddling with conf files, changing site files, leaving out modules at the same time, I figured odds were decent it was me messing with things under the hood that FreePBX couldn't see.

    Thanks for the response and insights,

    Joel
     
    wardmundy likes this.
  9. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    xrobau: We've updated the Incredible PBX 12 installer and adjusted the IPtables setup to better accommodate IPv6. Thanks for the tips!

    Modified PJSIP configure setup as recommended. Added jie394 rules.v6 to the mix. Also, new IPtables setup no longer gets activated during the install. This gives folks an opportunity to adjust rules.v4 and rules.v6 as desired. You still must manually add user-specific and vendor-specific WhiteList entries to rules.v6! On reboot or running of iptables-restart, all the rules kick in. Haven't adjusted the PJsip settings in FreePBX until we get that nailed down.

    Also added a modified installer for voicemail to MP3 attachments: installmp3stt.sh. Thanks, Bob Helbush.
     

    Attached Files:

  10. kwimberl

    kwimberl New Member

    Joined:
    Aug 27, 2008
    Messages:
    26
    Likes Received:
    2
    I just tried this out and get the following error:

    Code:
    [SIZE=4][B][SIZE=13px][COLOR=gray][FONT=Lucida Grande]Reload failed because retrieve_conf encountered an error: 255[/FONT][/COLOR][/SIZE][/B][/SIZE]
    
    exit: 255
    found language dir fr for directory, not installed on system, skipping
    PHP Fatal error:  Call to undefined function core_devices_list() in /var/www/html/admin/modules/digium_phones/classes/digium_phones.php on line 102
     
  11. Ken Thomas

    Ken Thomas New Member

    Joined:
    Aug 20, 2014
    Messages:
    4
    Likes Received:
    1
    Same error here. Installed per the instructions and then upgraded all the modules currently available for upgrade and got the same error after "Apply Config". Bummer.

    kwimberl - Okay, I pulled the trigger soon. As soon as I posted this I noticed you needed to upgrade CORE and a few others. This wasn't immediately apparent to me, but once I manually upgraded all the modules that were in red, I hit "Apply Config" again and we are good to go.
     
    wardmundy likes this.
  12. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    jeff.h likes this.
  13. RizSher

    RizSher Guru

    Joined:
    Oct 18, 2007
    Messages:
    146
    Likes Received:
    7
    Ward,

    Any14.04 instructions/ISO to use on Cu-box pro??

    Riz
     
  14. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    RizSher: Not yet. Waiting on release of the new CuBox next week.
     
  15. RizSher

    RizSher Guru

    Joined:
    Oct 18, 2007
    Messages:
    146
    Likes Received:
    7
    Trying the 3rd time - is there any special instructions for choosing PJSIP over Chan_SIP??... for extensions... trunks?...unlike previous incredibles...the script doesn't create any trunks... is that by design?..... its not proving to be quite as turnkey as previous versions have been.!!!
     
  16. Ken Thomas

    Ken Thomas New Member

    Joined:
    Aug 20, 2014
    Messages:
    4
    Likes Received:
    1
    I did another fresh install today as well. This time I took several snapshots along the way in order to rollback in case something went wrong. One of the issues I was facing was the errors after upgrading the modules and them being unsigned/"tampered". I hadn't read the entire article that clearly states this is a known issue. This should probably be stated earlier in the article as I like to check things as I'm moving through instructions and spent a lot of time troubleshooting this that didn't need to be had it been stated earlier in the instructions.

    Another issue is that the 701 extension is set up with Chan_PJSIP, however, it is disabled in the beginning and you need to enable it. I was unable to connect Yate and register the ext. 701 until I enabled Chan_PJSIP and allowed "Allow SIP Guests" in the PJSip Settings page. I realize this is still being worked out, but this is definitely not production ready. Soup still needs to cook before this is paradise for all.

    Oh, I also noticed there isn't an IVR created. I have my own custom IVR so this wasn't a big deal, just something I noticed wasn't in this version of Incredible. Having this in the old one pre-configured helped me figure out how the IVR set up works.

    PS - Lenny fooled me. Good job! I'd love to see how that was configured Ward. :)
     
  17. RizSher

    RizSher Guru

    Joined:
    Oct 18, 2007
    Messages:
    146
    Likes Received:
    7
    On the 4th attempt, get the following in CLI:


     
  18. RizSher

    RizSher Guru

    Joined:
    Oct 18, 2007
    Messages:
    146
    Likes Received:
    7
    ContinueD:


    Code:
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'macro-ccss-default' tries to include nonexistent context 'macro-ccss-default-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'sub-ccss' tries to include nonexistent context 'sub-ccss-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-campon-request' tries to include nonexistent context 'app-campon-request-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-campon-cancel' tries to include nonexistent context 'app-campon-cancel-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'ext-local' tries to include nonexistent context 'ext-local-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-campon-toggle' tries to include nonexistent context 'app-campon-toggle-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-callwaiting-cwon' tries to include nonexistent context 'app-callwaiting-cwon-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-callwaiting-cwoff' tries to include nonexistent context 'app-callwaiting-cwoff-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'ext-cf-hints' tries to include nonexistent context 'ext-cf-hints-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-unavailable-on' tries to include nonexistent context 'app-cf-unavailable-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-unavailable-off' tries to include nonexistent context 'app-cf-unavailable-off-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-on' tries to include nonexistent context 'app-cf-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-off' tries to include nonexistent context 'app-cf-off-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-off-any' tries to include nonexistent context 'app-cf-off-any-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-busy-on' tries to include nonexistent context 'app-cf-busy-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-busy-off' tries to include nonexistent context 'app-cf-busy-off-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-busy-off-any' tries to include nonexistent context 'app-cf-busy-off-any-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-prompting-on' tries to include nonexistent context 'app-cf-prompting-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-busy-prompting-on' tries to include nonexistent context 'app-cf-busy-prompting-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-unavailable-prompt-on' tries to include nonexistent context 'app-cf-unavailable-prompt-on-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-cf-toggle' tries to include nonexistent context 'app-cf-toggle-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist-add-invalid' tries to include nonexistent context 'app-blacklist-add-invalid-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist-add' tries to include nonexistent context 'app-blacklist-add-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist-remove' tries to include nonexistent context 'app-blacklist-remove-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist-last' tries to include nonexistent context 'app-blacklist-last-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist-check' tries to include nonexistent context 'app-blacklist-check-custom'
    [2014-11-10 19:39:41] WARNING[5829]: pbx.c:12112 ast_context_verify_includes: Context 'app-blacklist' tries to include nonexistent context 'app-blacklist-custom'
    [B][2014-11-10 19:39:41] ERROR[2088]: netsock2.c:303 ast_sockaddr_resolve: getaddrinfo("incrediblepbx", "(null)", ...): Name or service not known
    [2014-11-10 19:39:41] WARNING[2088]: acl.c:800 resolve_first: Unable to lookup 'incrediblepbx'
    [2014-11-10 19:39:41] WARNING[5829]: pbx_dundi.c:4844 set_config: Unable to look up host 'incrediblepbx'
    [2014-11-10 19:39:41] NOTICE[5829]: pbx_lua.c:1640 load_or_reload_lua_stuff: Lua PBX Switch loaded.
    [2014-11-10 19:39:41] NOTICE[5829]: res_odbc.c:1546 odbc_obj_connect: Connecting asteriskcdrdb
    [2014-11-10 19:39:41] WARNING[5829]: res_odbc.c:1571 odbc_obj_connect: res_odbc: Error SQLConnect=-1 errno=0 [unixODBC][Driver Manager]Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so' : file not f
    [2014-11-10 19:39:41] WARNING[5829]: res_odbc.c:1386 _ast_odbc_request_obj2: Failed to connect to asteriskcdrdb
    [2014-11-10 19:39:41] NOTICE[5829]: res_odbc.c:933 load_odbc_config: Registered ODBC class 'asteriskcdrdb' dsn->[MySQL-asteriskcdrdb]
    [2014-11-10 19:39:41] WARNING[2088]: chan_sip.c:30645 build_peer: 'tcp' is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.[B]
    [2014-11-10 19:39:41] WARNING[2088]: chan_sip.c:30645 build_peer: 'tls' is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
    [2014-11-10 19:39:41] NOTICE[2088]: chan_sip.c:30647 build_peer: 'Auto' is not a valid transport type. if no other is specified, the defaults from general will be used.
    [2014-11-10 19:39:41] WARNING[2088]: chan_sip.c:30645 build_peer: 'tcp' is not a valid transport type when tcpenable=no. If no other is specified, the defaults from general will be used.
    [2014-11-10 19:39:41] WARNING[2088]: chan_sip.c:30645 build_peer: 'tls' is not a valid transport type when tlsenable=no. If no other is specified, the defaults from general will be used.
    

    the only changes to the default freepbx setting post running the 12 script and signing in the first time (which triggers the update) are:

    1) Deleted Ext 701 and created it again with chan_sip (Ext 701 otherwise said it used PjSIP shich isn't enabled, so, instead of enabling it, I deleted and re-created with chan_sip)
    2) Created 2 new Ext 702 and 703 - All 3 extensions register successfully
    3) Made changes to SIP Settings:
    i) Allow anonymous sio inbound calls
    ii) Chnaged RTP Port range to 10000-10100
    iii) Only enabled ulaw and alaw
    iv) NAT = yes, and set ipconfiguratin to Dynamic IP and specified my dyndns host
    v) Changes Bind port to 5060
    vi) Allowed SIP Guests to yes
    4) Added 2 new trunks (VoipTalk.org and a OBiHai FXO trunk
    5) Added a GoogleVoice trunk through motif
    6) Added an any CID/Any DID Inbound route
    7) Added a ring group

    Lets see where this goes, Two more things, the form settings in FreePBX12 seem to be out of whack, using Tab to move between fields seems to move out of sequence (FrePBX issue I guesS), and status in SSH brings up Incredible PBX 12.0.3 for Ubuntu 14, followed by green flags for the various services. The nxt line, which is supposed to show

    RAM: 4 GB "Ubuntu 14.04.1 LTS" DISK: 65G

    In my case, it just shows:

    RAM: "Ubuntu 14.04.1 LTS" DISK: 65G

    The ram value field is missing.

    Riz
     
  19. RizSher

    RizSher Guru

    Joined:
    Oct 18, 2007
    Messages:
    146
    Likes Received:
    7
    OK -

    So, The google voice trunk works, can get incoming calls on the Voice trunk - the VoipTalk trunk, same trunk config hat has worked for the last 5 yrs, doesn't seem to work anymore... the caller keeps hearing the ring back tone, but my extensions don't ring, CLI doesn't show anything... Sip Show registry shows the voiptalk trunk being registered.
     
  20. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,432
    Likes Received:
    2,450
    RizSher: Warning messages are nothing new in new releases of FreePBX. Presumably they will get resolved as time goes by.

    I cannot replicate the PJsip problems. Our installs work fine out of the box without deleting or reactivating anything. PJsip as configured by FreePBX uses 5060 with 5061 reserved for chan_sip. We've set up a YateClient softphone, registered to default 701 PJsip extension on 5060, and calls complete. Are you sure you're using the latest Incredible PBX installer?? If so, try a default install without "the improvements" and see what you get.