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

2014-04-16 Thread Richard Reina


Enviado desde mi iPad

El abr 16, 2014, a las 6:45 p.m., Sean Darcy  escribió:

> 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 
>> defaultuser=1777xxx
>> fromuser=1777xxx
>> 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 
>> 
>> [alpha12](callcentric-template)
>> host=alpha12.callcentric.com 
>> 
>> [...]
>> 
>> 
>> 
>> On Tue, Apr 15, 2014 at 4:29 PM, Kai-Uwe Jensen > > 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 , but
>>each having their own name, typically "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 
>> 
>>[alpha12]
>>host=alpha12.callcentric.com 
>> 
>>[callcentric](alpha11,alpha12)
>>type=peer
>>context=from-callcentric
>>defaultuser=1777
>>secret=
>>fromuser=1777
>>fromdomain=callcentric.com 
>> 
>>insecure=port,invite
>>disallowed_methods=UPDATE
>>directmedia=no
>>videosupport=no
>>disallow=all
>>allow=ulaw
>> 
>>Add templates for all IPs that 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
> 
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>  http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2014-04-16 Thread Sean Darcy

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 
defaultuser=1777xxx
fromuser=1777xxx
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 

[alpha12](callcentric-template)
host=alpha12.callcentric.com 

[...]



On Tue, Apr 15, 2014 at 4:29 PM, Kai-Uwe Jensen mailto:kujen...@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 , but
each having their own name, typically "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 

[alpha12]
host=alpha12.callcentric.com 

[callcentric](alpha11,alpha12)
type=peer
context=from-callcentric
defaultuser=1777
secret=
fromuser=1777
fromdomain=callcentric.com 

insecure=port,invite
disallowed_methods=UPDATE
directmedia=no
videosupport=no
disallow=all
allow=ulaw

Add templates for all IPs that 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


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


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

2014-04-15 Thread Kai-Uwe Jensen
Oops, had it wrong. Here's how it works for me:

[callcentric-template](!)
type=friend
context=from-callcentric
fromdomain=callcentric.com
defaultuser=1777xxx
fromuser=1777xxx
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

[alpha12](callcentric-template)
host=alpha12.callcentric.com

[...]



On Tue, Apr 15, 2014 at 4:29 PM, Kai-Uwe Jensen  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, but each having their own name, typically "
> 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
>
> [alpha12]
> host=alpha12.callcentric.com
>
> [callcentric](alpha11,alpha12)
> type=peer
> context=from-callcentric
> defaultuser=1777
> secret=
> fromuser=1777
> fromdomain=callcentric.com
>
> insecure=port,invite
> disallowed_methods=UPDATE
> directmedia=no
> videosupport=no
> disallow=all
> allow=ulaw
>
> Add templates for all IPs that 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.
>
>
>
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2014-04-15 Thread Kai-Uwe Jensen
>
> 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, but each having their own name, typically "
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

[alpha12]
host=alpha12.callcentric.com

[callcentric](alpha11,alpha12)
type=peer
context=from-callcentric
defaultuser=1777
secret=
fromuser=1777
fromdomain=callcentric.com
insecure=port,invite
disallowed_methods=UPDATE
directmedia=no
videosupport=no
disallow=all
allow=ulaw

Add templates for all IPs that 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.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

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

2014-04-15 Thread Sean Darcy

On 04/15/2014 05:24 PM, Sean Darcy wrote:

On 04/14/2014 11:47 AM, Kelvin Chua wrote:

wild guess would be a conflict on host= setting.
there might be another entity on your sip.conf which have type=friend
and host=callcentric.com or host=204.11.192.161
Kelvin Chua


On Mon, Apr 14, 2014 at 8:01 AM, Sean Darcy  wrote:

On 11.9, trying to set up a callcentric peer:

sip debug:


<--- SIP read from UDP:204.11.192.161:5060 --->
INVITE sip:1777@10.10.11.180:5060 SIP/2.0
v: SIP/2.0/UDP
204.11.192.161:5060;branch=z9hG4bK-6104e46ef4249814d16a2ffb990d
f: @66.193.176.35>;tag=3606475083-968127
t: @ss.callcentric.com>
i: 18075985-3606475083-968...@msw2.telengy.net
CSeq: 1 INVITE
Max-Forwards: 8
m:


Supported: timer
c: application/sdp
l: 350

v=0
o=NexTone-MSW 2147483647 2147483647 IN IP4 204.11.192.161
s=sip call
c=IN IP4 204.11.192.161
t=0 0
m=audio 50960 RTP/AVP 18 0 8 101
a=fmtp:18 annexb=no
a=fmtp:101 0-15
a=rtpmap:101 telephone-event/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=ptime:20
a=sendrecv
a=silenceSupp:off - - - -
a=setup:actpass
<->
--- (11 headers 16 lines) ---
Sending to 204.11.192.161:5060 (NAT)
Sending to 204.11.192.161:5060 (NAT)
Using INVITE request as basis request -
18075985-3606475083-968...@msw2.telengy.net
No matching peer for '' from '204.11.192.161:5060'

<--- Reliably Transmitting (NAT) to 204.11.192.161:5060 --->
SIP/2.0 401 Unauthorized



asterisk is trying to find a peer based on the _calling number_!

Here's the callcentric peer based on its support pages:

[callcentric]
type=peer
context=from-callcentric
host=callcentric.com
defaultuser=1777
;defaultuser=1914
secret=
fromuser=1777
;fromuser=1914
fromdomain=callcentric.com
;fromdomain=ss.callcentric.com
insecure=port,invite
disallowed_methods=UPDATE
directmedia=no
videosupport=no
disallow=all
allow=ulaw

As you can see I also tried matching to the callcentric telephone number
instead of the id. No luck. The only number I can't match is the calling
number.

Any help appreciated.

sean


Thanks for the response, but no:

# grep -R host * | grep callcentric
exts/callcentric.sip.conf:host=callcentric.com
# grep -R host * | grep 204
#

Why in the world is asterisk trying to match on the FROM header??

sean




Or, more precisely, since this is a peer context, why isn't it matching 
with the ip address 204.11.192.161?


The fqdn callcentric.com has a number of ip addresses:

host callcentric.com
callcentric.com has address 204.11.192.169
callcentric.com has address 204.11.192.170
callcentric.com has address 204.11.192.171
callcentric.com has address 204.11.192.159
callcentric.com has address 204.11.192.160
callcentric.com has address 204.11.192.161
callcentric.com has address 204.11.192.163

Does asterisk only use the first one?

sip show peer callcentric


  * Name   : callcentric
  Description  :
  Secret   : 
  MD5Secret: 
  Remote Secret: 
  Context  : from-callcentric
.
  ToHost   : callcentric.com
  Addr->IP : 204.11.192.171:5080


So do I need 7 contexts, one for each ip address?

sean


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
  http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users