Re: [asterisk-users] One server, multiple companies

2007-12-10 Thread Eric C .

Eric C. wrote:
 Hello all, 

 Just starting to setup asterisk v 1.4.11 and need to run three distinct phone 
 systems for three different companies.
 So far, I have inbound lines going to the appropriate dial plan within the 
 extensions.conf file. I'm using  

 exten = _X.,1,NoOp(FROM NUMBER:  ${SIP_HEADER(TO):5:10})

 to determine which number is being dialed by the caller and then using a 
 gotoif to get to correct greeting (correct company).

 My question is... lets assume all three companies have extension numbers 
 being 2000, 2001  2002, how does one separate them?
 Or, lets say the extensions are:

 company A -- 2000, 2001,2002
 company B -- 3000, 3001, 3002
 company C -- 4000, 4001, 4002

 Since they're on one server with one asterisk process, how can I use context 
 correctly so that the user at 4002 cannot get through to the user at company 
 A whose extension is 2000 as currently, I can dial 2000 from phone 4002.

 That's my current problem, how should this be setup?  Is my architecture 
 correct? Should I be running different processes for each company? Can 
 context resolve what I need?

 Please advise.

 thanks,
 Otto
   

First off, *nuke* the default context in sip.conf, extensions.conf, and 
voicemail.conf ... it will just get you into trouble!

I do something like in my extensions.conf file:

[incoming]
exten = 208229,1,Goto(s,1,incoming-acme)
exten = 208229,1,Goto(s,1,incoming-fido)
exten = 208229,1,Goto(s,1,incoming-big-jims)
...

[incoming-acme]
exten = s,1,Answer()  
exten = s,n,Wait(0.75)
exten = s,n(greeting),Playback(brief-directory-acme)   
exten = s,n(exten),Background(vm-enter-num-to-call)   
exten = s,n,WaitExten(5)  
exten = s,n(goodbye),Playback(vm-goodbye) 
exten = s,n(end),Hangup() 

; these are the extensions that are exposed both to internal callers as
; well as to incoming calls... be careful what you put here.
include = extens-acme 
   
exten = i,1,Playback(pbx-invalid) 
exten = i,n,Goto(s,exten) 
   
exten = t,1,Goto(s,goodbye)  
   
[internal-acme] 

exten = s,1,Answer() 
exten = s,n(exten),Background(vm-enter-num-to-call)   
exten = s,n,WaitExten(5)  
exten = s,n(goodbye),Playback(vm-goodbye) 
exten = s,n(end),Hangup() 
   
include = outbound-toll   
include = outbound-local  
include = extens-acme

; for our SIP phones, we can program a non-numeric extension
exten = voicemail,1,VoicemailMain([EMAIL PROTECTED])
exten = voicemail,n,Hangup()

; and for DTMF coming through an ATA...
exten = 777,1,Goto(voicemail)

[extens-acme]
exten = 111,1,Macro(stdexten,111,${PHILIP})   
exten = 111,n,Goto(s,exten)
...

[outbound-local]   
exten = _NXX,1,Dial(${TRUNK}/${AREA}${EXTEN},,r)  
exten = _NXX,n,Congestion()   
exten = _NXX,n,Hangup()   
   
[outbound-toll]
exten = _NX,1,Dial(${TRUNK}/${EXTEN},,r)  
exten = _NX,n,Congestion()
exten = _NX,n,Hangup()
   
exten = _011.,1,Dial(${TRUNK}/${EXTEN:3},,r)  
exten = _011.,n,Congestion()  
exten = _011.,n,Hangup()  



Note: we had to modify the stdexten macro to be:

[macro-stdexten];  
;  
; Standard extension macro:
;   ${ARG1} - Extension  (we could have used ${MACRO_EXTEN} here as well

[asterisk-users] One server, multiple companies

2007-12-09 Thread Eric C .

Hello all, 

Just starting to setup asterisk v 1.4.11 and need to run three distinct phone 
systems for three different companies.
So far, I have inbound lines going to the appropriate dial plan within the 
extensions.conf file. I'm using  

exten = _X.,1,NoOp(FROM NUMBER:  ${SIP_HEADER(TO):5:10})

to determine which number is being dialed by the caller and then using a gotoif 
to get to correct greeting (correct company).

My question is... lets assume all three companies have extension numbers being 
2000, 2001  2002, how does one separate them?
Or, lets say the extensions are:

company A -- 2000, 2001,2002
company B -- 3000, 3001, 3002
company C -- 4000, 4001, 4002

Since they're on one server with one asterisk process, how can I use context 
correctly so that the user at 4002 cannot get through to the user at company A 
whose extension is 2000 as currently, I can dial 2000 from phone 4002.

That's my current problem, how should this be setup?  Is my architecture 
correct? Should I be running different processes for each company? Can context 
resolve what I need?

Please advise.

thanks,
Otto
___
--Bandwidth and Colocation Provided by http://www.api-digital.com--

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


[Asterisk-Users] [perhpas OT] asterisk holding rtp ports open with natted spa-3000

2004-11-18 Thread Eric C. Snowdeal III
 
0.0.0.0:10073   
0.0.0.0:*udp
0  0 my.public.ip.address:10078  
0.0.0.0:*   udp0  0 
0.0.0.0:10079   0.0.0.0:*  

[3]
Transmitting (NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
my.wan.ip.address:5060;branch=z9hG4bK-3c9c7b77;received=my.wan.ip.address;rport=5060
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: Eric C. Snowdeal III sip:[EMAIL PROTECTED];tag=as4cef267a
Call-ID: [EMAIL PROTECTED]
CSeq: 5600 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Expires: 10
Contact: sip:[EMAIL PROTECTED]:5060;expires=10
Date: Fri, 19 Nov 2004 03:16:43 GMT
Content-Length: 0

to my.wan.ip.address:5060
Scheduling destruction of call '[EMAIL PROTECTED]' in 
15000 ms
mercury*CLI

Sip read:
REGISTER sip:my.asterisk.fqdm SIP/2.0
Via: SIP/2.0/UDP my.wan.ip.address:5060;branch=z9hG4bK-46a3be23
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: Eric C. Snowdeal III sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 5601 REGISTER
Max-Forwards: 70
Authorization: Digest 
username=2000,realm=asterisk,nonce=175e9928,uri=sip:[EMAIL PROTECTED],algorithm=MD5,response=81f28467735f8c8676486d56335a2d05
Contact: Eric C. Snowdeal III sip:[EMAIL PROTECTED]:5060;expires=10
User-Agent: Sipura/SPA3000-2.0.11(GWg)
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura

13 headers, 0 lines
Using latest request as basis request
Sending to my.wan.ip.address : 5060 (NAT)
Transmitting (NAT):
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 
my.wan.ip.address:5060;branch=z9hG4bK-46a3be23;received=my.wan.ip.address;rport=5060
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: Eric C. Snowdeal III sip:[EMAIL PROTECTED];tag=as4cef267a
Call-ID: [EMAIL PROTECTED]
CSeq: 5601 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Expires: 10
Contact: sip:[EMAIL PROTECTED];expires=10
Content-Length: 0

to my.wan.ip.address:5060
Transmitting (NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
my.wan.ip.address:5060;branch=z9hG4bK-46a3be23;received=my.wan.ip.address;rport=5060
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: Eric C. Snowdeal III sip:[EMAIL PROTECTED];tag=as4cef267a
Call-ID: [EMAIL PROTECTED]
CSeq: 5601 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Expires: 10
Contact: sip:[EMAIL PROTECTED]:5060;expires=10
Date: Fri, 19 Nov 2004 03:16:52 GMT
Content-Length: 0

to my.wan.ip.address:5060
Scheduling destruction of call '[EMAIL PROTECTED]' in 
15000 ms
mercury*CLI

Sip read:
NOTIFY sip:my.asterisk.fqdm SIP/2.0
Via: SIP/2.0/UDP my.wan.ip.address:5060;branch=z9hG4bK-a0bf7d74
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: sip:my.asterisk.fqdm
Call-ID: [EMAIL PROTECTED]
CSeq: 2999 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Sipura/SPA3000-2.0.11(GWg)
Content-Length: 0

10 headers, 0 lines
Transmitting (no NAT):
SIP/2.0 200 OK
Via: SIP/2.0/UDP my.wan.ip.address:5060;branch=z9hG4bK-a0bf7d74
From: Eric C. Snowdeal III 
sip:[EMAIL PROTECTED];tag=2fc5ef1bb4791707o0
To: sip:my.asterisk.fqdm;tag=as61650e74
Call-ID: [EMAIL PROTECTED]
CSeq: 2999 NOTIFY
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact:
Content-Length: 0

to my.wan.ip.address:5060
Destroying call '[EMAIL PROTECTED]'
[4] http://voxilla.com/forum-viewtopic-t-1290.html
[5]
Nov 18 19:15:49 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:16:14 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:16:39 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:17:19 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:18:13 NOTICE[18956]: chan_sip.c:6606 handle_response: Peer 
'2000' is now REACHABLE!
Nov 18 19:19:15 NOTICE[18956]: chan_sip.c:6612 handle_response: Peer 
'2000' is now TOO LAGGED!
Nov 18 19:19:49 NOTICE[18956]: chan_sip.c:6606 handle_response: Peer 
'2000' is now REACHABLE!
Nov 18 19:21:51 NOTICE[18956]: chan_sip.c:6612 handle_response: Peer 
'2000' is now TOO LAGGED!
Nov 18 19:22:16 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:22:52 NOTICE[18956]: chan_sip.c:7911 sip_poke_noanswer: Peer 
'2000' is now UNREACHABLE!
Nov 18 19:23:02 NOTICE[18956]: chan_sip.c:6606 handle_response: Peer 
'2000' is now REACHABLE!
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Maximum retries exceeded on call

2004-06-20 Thread Eric C. Snowdeal III
Eric C. Snowdeal III wrote: 

after registering the phones correctly and receiving a 200 o.k. 
message i can connect to other registered softphones and pstn 
endpoints [ via an voicepulse account ],  but after making the initial 
connection, i can't hear any sound and i get disconnected after 
getting the following error message:

chan_sip.c:497 retrans_pkt: Maximum retries exceeded on call 
[EMAIL PROTECTED] for seqno 41270 

prompted by a recent email to the group [1] about setting the bindaddr, 
i took a closer look at the sip messages being sent back and forth and 
noticed that the contact header was incorrectly set to 127.0.0.1 in the 
200 o.k. message [2].  once i set the bindaddr to the * machine's public 
ip address everything worked fine and and contact header i.p.  address 
was set correctly.

what's odd, at least to me, is that unlike the recent email about a 
similar issue [1], my * box is on a non-natted, public ip address so i 
would have thought that keeping the default bindaddr  (0.0.0.0) would 
have worked, but obviously it didn't.

not sure how to interpret the dirth of responses, perhaps this was 
frighteningly obvious to everyone else.

[1] http://lists.digium.com/pipermail/asterisk-users/2004-June/051375.html
[2]
RECEIVE TIME: 7548279
RECEIVE  my.public.asterisk.ip:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
my.wan.ip:5060;rport;branch=z9hG4bKFE76D502C2BF11D8A741000D93C22AF4;received=my.wan.ip;rport=1029
From: snowdeal sip:[EMAIL PROTECTED];tag=1666554831
To: snowdeal sip:[EMAIL PROTECTED];tag=as7f7ed33f
Call-ID: [EMAIL PROTECTED]
CSeq: 43970 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Expires: 1800
Contact: sip:[EMAIL PROTECTED];expires=1800
Date: Sun, 20 Jun 2004 13:44:34 GMT
Content-Length: 0
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Maximum retries exceeded on call

2004-06-18 Thread Eric C. Snowdeal III
Holger Schurig wrote:
i'm new to asterisk and am having trouble placing outbound calls.  i
   

Bug Grandstream so that they finally fix their buggy software.
The GS phone sends occassional SIP packets to port 0, not to port 5060, as 
tcpdump or (better) ethereal will show you.

There's a page on this at voip-info.org.
 

thanks for the heads-up about grandstream, but as i stated in the 
original message, i'm using xten lite softphones.   hopefully this is 
the approproriate forum for this question; i believe this is not an xten 
configuration issue because i can connect to a ser/rtproxy/nathelper 
server without problems and i can connect directly to a voicepulse 
account, which leads me to believe that this is an * configuration 
problem on my part.  less likely, i suppose, is the chance that * isn't 
as robust in handling nat than ser or whatever voicepulse is running.

given the configuration files that i posted in the original message, are 
there any changes that i should make?  certainly the asterisk faq makes 
the solution seems straighforward [1]:

Most likely you have a SIP client behind NAT that is trying to 
communicate with Asterisk without having the nat=yes setting in place 
in sip.conf. Another cause for this could be related to a user device 
that has an sip entry but has been physically removed (switched off or 
LAN-disconnected).

but as my original message showed, i do have nat=yes in my sip.conf and 
i don't believe the latter scenario is true.

any help is greatly appreciated.
[1] http://www.voip-info.org/wiki-Asterisk+FAQ
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] Maximum retries exceeded on call

2004-06-17 Thread Eric C. Snowdeal III
i'm new to asterisk and am having trouble placing outbound calls.  i 
know this topic has been discussed  ad nauseum in the past [1] , but i 
can't seem to find a workaround and i'm wondering if my newbie-ness is 
getting the best of me. 

after registering the phones correctly and receiving a 200 o.k. 
message i can connect to other registered softphones and pstn endpoints 
[ via an voicepulse account ],  but after making the initial connection, 
i can't hear any sound and i get disconnected after getting the 
following error message:

chan_sip.c:497 retrans_pkt: Maximum retries exceeded on call 
[EMAIL PROTECTED] for seqno 41270  

i've compiled the stock asterisk tarball on a redhat 7.3 box with a 
public ip address.  the clients are xten lite softphone's running on 
ibooks with os 10.3.4.  the clients are natted behind a  linksys wrt54g 
wireless router running the sveasoft [2] firmware.  i'm perplexed, 
because i can get things to work fine if i use ser/rtpproxy instead of 
asterisk.  i can also connect directly to my voicepulse connect account 
with the xten softphone and things work great.  so i think i have the 
xten client configured properly and i know that the sveasoft firmware 
isn't throwing a monkey wrench into the picture.  i suppose i could 
configure ser to front asterisk since it appears to deal with the nat, 
but i'm wondering if i'm missing something basic.

my channel config files look like the  following:
sip.conf
[general]
port = 5060 ; Port to bind to
bindaddr = 0.0.0.0  ; Address to bind SIP channel to
context = default   ; Default context for incoming calls
disallow=all; Disallow all codecs
allow=ulaw  ; Allow codecs in order of preference
[2000]
type=friend   ; This device takes and makes calls
username=2000 ; Username on device
secret=supersecret ; Password for device
host=dynamic  ; This host is not on the same IP addr every time
context=from-sip-internal
nat=yes
canreinvite=no; Typically set to NO if behind NAT
qualify=500
[2001]
type=friend   ; This device takes and makes calls
username=2001 ; Username on device
secret=supersecret2 ; Password for device
host=dynamic  ; This host is not on the same IP addr every time
context=from-sip-internal
nat=yes
canreinvite=no; Typically set to NO if behind NAT
qualify=500
iax.conf
[general]
port=5036
bandwidth=low
disallow=all; Disallow all codecs
allow=ulaw  ; Allow codecs in order of preference
jitterbuffer=no
[voicepulse]
context = voicepulse-in
secret=topsecrect
auth=md5
type=friend
host=gw5.voicepulse.com
[1] 
http://www.google.com/search?q=retrans_pkt:+Maximum+retries+exceeded+on+call++site:http://lists.digium.comhl=enlr=ie=UTF-8start=10sa=N

[2] http://www.sveasoft.com/modules/phpBB2/index.php
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users