[asterisk-users] how to configure callcentric peer: no fqdn address matching?

Sean Darcy seandarcy2 at gmail.com
Wed Apr 16 18:45:05 CDT 2014


On 04/15/2014 06:52 PM, Kai-Uwe Jensen wrote:
> Oops, had it wrong. Here's how it works for me:
>
> [callcentric-template](!)
> type=friend
> context=from-callcentric
> fromdomain=callcentric.com <http://callcentric.com>
> defaultuser=1777xxxxxxx
> fromuser=1777xxxxxxx
> secret=password
> insecure=port,invite
> dtmfmode=rfc2833
> disallowed_methods=UPDATE
> session-timers=refuse
> videosupport=no
> qualify=no
> disallow=all
> allow=ulaw
>
> [alpha11](callcentric-template)
> host=alpha11.callcentric.com <http://alpha11.callcentric.com>
>
> [alpha12](callcentric-template)
> host=alpha12.callcentric.com <http://alpha12.callcentric.com>
>
> [...]
>
>
>
> On Tue, Apr 15, 2014 at 4:29 PM, Kai-Uwe Jensen <kujensen at gmail.com
> <mailto:kujensen at gmail.com>> wrote:
>
>         So do I need 7 contexts, one for each ip address?
>
>         sean
>
>
>     Yes, if what you call a "context" is your peer definition in
>     sip.conf. CC routes calls through a varying number of SBCs, all
>     (also) resolving to callcentric.com <http://callcentric.com>, but
>     each having their own name, typically "alphaxy.callcenctric.com
>     <http://alphaxy.callcenctric.com>".
>
>     I think you can use asterisk's configuration template syntax to
>     create the required peer definitions. This would likely look similar
>     to this (from memory):
>
>     [alpha11]
>     host=alpha11.callcentric.com <http://alpha11.callcentric.com>
>
>     [alpha12]
>     host=alpha12.callcentric.com <http://alpha12.callcentric.com>
>
>     [callcentric](alpha11,alpha12)
>     type=peer
>     context=from-callcentric
>     defaultuser=1777<myccid>
>     secret=<mysecret>
>     fromuser=1777<myccid>
>     fromdomain=callcentric.com <http://callcentric.com>
>
>     insecure=port,invite
>     disallowed_methods=UPDATE
>     directmedia=no
>     videosupport=no
>     disallow=all
>     allow=ulaw
>
>     Add templates for all IPs that callcentric.com
>     <http://callcentric.com> returns. Note that this approach isn't
>     foolproof: if/when CC change their pool of SBCs, you may have to add
>     more hosts, or remove them from this config. And, as you say, I
>     believe the cause is that asterisk only uses the first returned IP
>     for a host name. (Interestingly, the DNS server authoritative for CC
>     also varies the order of IPs it returns. Guess that's their way
>     load-balancing.)
>
>     And again, the above is from memory. I can look it up later today
>     and will follow up if I goofed/misremembered.
>
>
Many thanks, That worked, I set up 20 contexts for 
alpha[1-20].callcentric.com.

sean




More information about the asterisk-users mailing list