• 28Apr
    Categories: Development Comments Off

    I had a hard time recently while setting up my latest Asterisk + FreePBX install. Outbound calls worked fine, but GoTalk’s server wasn’t even contacting my Asterisk box to route incoming calls. I ripped through 3 versions of asterisk and many reinstalls before I discovered the cause. GoTalk need a slightly more convoluted register string than normal. Once I entered the special register string, it registered and received calls fine. If you’re looking for a GoTalk config for Asterisk with the help of any of the guis, use this:

    Outgoing Settings

    Trunk name: GoTalk

    Peer Details:

    host=sip.gotalk.com
    authuser=09xxxxxxx
    username=09xxxxxx
    secret=YNxxxxxx
    type=peer
    fromuser=09xxxxxx
    fromdomain=sip.gotalk.com
    canreinvite=no
    insecure=very
    qualify=yes

    Incoming Settings

    User Context: 09xxxxx

    User Details:

    username=09xxxxx
    fromuser=09xxxxx
    type=peer
    secret=YNxxxxx
    insecure=very
    host=sip.gotalk.com
    fromdomain=sip.gotalk.com
    context=from-pstn

    Register String:

    09xxxxxxx:YNxxxxxxx:09xxxxxx@sip.gotalk.com:5060/09xxxxxx

    After this, just add your inbound route with 09xxxxxx as your DID and divert it to a local extension and you should be in business ! Hope this helps you avoid some hair-pulling.

  • 28Apr
    Categories: Development Comments Off

    I recently switched from using flat zone files to mysql zones using the MySQL Bind SDB Driver to put all my zone records into a database, which lets me update zone records and see the dns changes immediately without needing to reload bind. Unfortunately, one of my sites is a dynamic beast that generates the site based on the subdomain, and if the subdomain doesn’t exist, optionally run an install script to create that subdomain. As such it relied on bind9 wildcard dns to resolve the subdomains. However, even though the the MySQL SDB Driver supports wildcard dns, it has a bit of a flaw in the way it parses the domain name. When given unknown.domain.com it would attempt to resolve *.unknown.domain.com when it should in fact be looking for *.domain.com, which means that lookups for a wildcard record fail.

    As such, I waded neck-deep into the Mysql SDB Driver source in order to come up with a fix, and I emerged with the following patch file:

    wildcard.patch

    Unpack the MySQL Bind SDB Driver source and cd to the mysql-bind directory and patch the file with the following command:

    patch -p0 < /path/to/wildcard.patch

    Then follow the MySQL Bind SDB Driver Installation Document as per usual to add the drivers files to bind and configure bind as normal.

    Wildcard records should be specified in the form *.domain.com and should always be A records as wildcarding a CNAME is not recommended. When a record lookup fails now, it will look for a wildcard record and if found, return that record.