Re: [asterisk-users] Voicemail Configuration

2011-05-16 Thread John Marvin
Thanks, that's given me some ideas. I don't think I can totally roll my 
own, since I also make use of the MWI features of voicemail. Another 
thread pointed out the existence of minivm, which I hadn't realized was 
available. I just need to find the time to play around with some of the 
proposed options.


John

On 5/14/2011 10:46 PM, virendra bhati wrote:

this will help you..

; DIY VOICEMAIL 
*[ck987_vm_record]*


;start recording after the beep.  Press # when done.
exten =  1,1,Playback(/home/ck987/asterisk_sounds/vm-record-start)


;build this call's recorded message file nameuniqueID_phone number
;every call is assigned a unique id.


exten =  1,n,Set(record_file=${UNIQUEID}_${CALLERID(num)})
; records into my vm_msg folder.


;Ends if # is hit, silence for 2 secs, or recording lasts for 60 seconds
exten =  1,n,Record(/home/ck987/asterisk_sounds/vm_msg/${record_file}.wav,2,60)


; 2 to review message, 3 to re record, or hang up
exten =  1,n,Background(/home/ck987/asterisk_sounds/vm-record-end)


exten =  1,n,WaitExten(5)
exten =  1,n,Playback(/home/ck987/asterisk_sounds/bye)


exten =  1,n,Hangup()

exten =  2,1,Playback(/home/ck987/asterisk_sounds/vm_msg/${record_file})


; press 1 to re-record, or hangup if satisfied
exten =  2,n,Background(/home/ck987/asterisk_sounds/vm-record-again)


exten =  2,n,WaitExten(5)
;no response, hang up on person.


exten =  2,n,Playback(/home/ck987/asterisk_sounds/bye)
exten =  2,n,Hangup()



;go back to the record option
exten =  3,1,Goto(ck987_vm_record,1,1)



;--DIY VOICEMAIL ADMIN--



*[ck987_vm_admin]*
; pass is 9988, jump to n+101 if authentication fails, expect 4 digits


exten =  1,1,Authenticate(9988,j,4)
; get number of voicemail messages


; SHELL function returns the output from a system command
;ls -1  lists visible files in a list.wc -l  will count how many lines 
there are.  1 line per file!


exten =  1,n,Set(num_messages=${SHELL(ls -1 
/home/ck987/asterisk_sounds/vm_msg/ | wc -l)})
;you have...


exten =  1,n,Playback(/home/ck987/asterisk_sounds/you-have)
exten =  1,n,SayDigits(${num_messages})


;...messages!
exten =  1,n,Playback(/home/ck987/asterisk_sounds/messages)


;get file names.sed  command trims off any .wav exten.tr  command trims off 
whitespace and line feeds.


exten =  1,n,Set(file_names=${SHELL(ls -m /home/ck987/asterisk_sounds/vm_msg/ 
| sed's/.wav//g'  | tr -d'  \n')})


;start message counter
exten =  1,n,Set(msg_counter=1)


; 1 to repeat message, 3 to go to the next message, 7 to go to the previous 
message
exten =  1,n,Playback(/home/ck987/asterisk_sounds/msg-options)


exten =  1,n,Goto(ck987_vm_play_message,1,1) ; playback loop
;try again if password is wrong


exten =  1,102,Goto(ck987_vm_admin,1,1)




*[ck987_vm_play_message]*
exten =  1,1,Background(beep)


exten =  1,n,Set(current_message=${CUT(file_names,\,,${msg_counter})})
exten =  1,n,NoOp(${file_names} ${current_message} ${msg_counter})


exten =  1,n,Background(/home/ck987/asterisk_sounds/vm_msg/${current_message})
exten =  1,n,Goto(3,1)



; next message: add 1 and go back to the top of the loop

exten =  3,1,Set(msg_counter=$[${msg_counter} + 1])
exten =  3,n,Set(msg_counter=${IF($[${msg_counter}  
${num_messages}]?${num_messages}:${msg_counter})})


exten =  3,n,Goto(1,1)

; previous message: subtract 1 and go back to the top of the loop


exten =  7,1,Set(msg_counter=$[${msg_counter} - 1])
;make sure number never goes below 1


exten =  7,n,Set(msg_counter=${IF($[${msg_counter}  1]?1:${msg_counter})})
exten =  7,n,Playback(/home/ck987/asterisk_sounds/previous_message)


exten =  7,n,Goto(1,1)

;delete message


exten =  *,1,System(rm /home/ck987/asterisk_sounds/vm_msg/${current_message})
;number of files has changed.  reload number of files and file names


;ls -1  lists visible files in a list.wc -l  will count how many lines 
there are.  1 line per file!


exten =  *,n,Set(num_messages=${SHELL(ls -1 
/home/ck987/asterisk_sounds/vm_msg/ | wc -l)})
;get file names.sed  command trims off any .wav exten.tr  command trims off 
whitespace and line feeds.


exten =  *,n,Set(file_names=${SHELL(ls -m /home/ck987/asterisk_sounds/vm_msg/ 
| sed's/.wav//g'  | tr -d'  \n')})


exten =  *,n,Goto(1,1)

it's the actual voicemail example which is use by asterisk it self



On Tue, May 10, 2011 at 2:53 AM, John Marvin jm-aster...@themarvins.org
mailto:jm-aster...@themarvins.org wrote:

On 5/9/2011 3:08 PM, Roger Burton West wrote:

You could use Monitor to record the whole call, then use an AGI
to do
something with it on hangup if the other conditions haven't been
satisfied...?


I understand how to do the first part, and I at least understand
that I could do something fancy with the AGI capability. But what I
don't know is how I can take the recording and insert it into a
voicemail box such that it can be retrieved through the normal
VoiceMailMain mechanism

[asterisk-users] Voicemail Configuration

2011-05-09 Thread John Marvin

Hi,

I can't figure out a way of achieving what I want to do with the 
voicemail feature. I thought I'd ask here to see if there are any 
creative solutions that I have not considered.


What I want to do is have a message that says Press 1 for Dick, or 2 
for Jane. Then, depending on which number is pressed, have the caller 
sent to the appropriate voicemail box. I know how to do that without any 
problem.


I want to keep repeating that message after a timeout, i.e. not send the 
caller to a default voicemail box if nothing is pressed. I can handle 
that also.


However, I want to record what is said during that time and send it to 
a third voicemail box once the caller hangs up without having pressed 1 
or 2. I want this ability in order to handle robot callers. I'm not 
interested in most robot calls, but sometimes they contain useful 
information (school closures, your order is ready ...  etc.). The 
problem is if I just timeout and send the caller to a 3rd mailbox I will 
usually have lost the beginning of the message, and I don't want a short 
timeout because I want someone to be able to listen to the prompt and 
make a proper choice (if they're not a robot).


Any ideas? Is this possible?

Thanks,

John


--
_
-- 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] Voicemail Configuration

2011-05-09 Thread John Marvin

On 5/9/2011 3:08 PM, Roger Burton West wrote:


You could use Monitor to record the whole call, then use an AGI to do
something with it on hangup if the other conditions haven't been
satisfied...?



I understand how to do the first part, and I at least understand that I 
could do something fancy with the AGI capability. But what I don't know 
is how I can take the recording and insert it into a voicemail box such 
that it can be retrieved through the normal VoiceMailMain mechanism.


Would the asterisk voicemail app dynamically notice something new being 
dropped into the voicemail mbox directory? Would it only be noticed once 
Asterisk is restarted? Most importantly, would it send out the notifies 
to the phone associated with that voicemail box? I can probably fake 
the last part if necessary, but making the voicemail retrievable through 
the normal voicemail mechanism is what I really need to achieve.


Thanks,

John


--
_
-- 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] IP ban list by country

2011-02-13 Thread John Marvin
 One possible advantage of the fact that IANA has depleted its pool of 
/8's (class A) is that if you are only filtering at that level the data 
is static now. It should never change again for IPV4.


John

On 2/13/2011 11:54 PM, Steve Edwards wrote:

On Mon, 14 Feb 2011, Bruce B wrote:

What sources do you use to limit SIP connecting customers to specific 
countries by IP (e.g. allowing USA and not China). It would help me a 
lot of you can note the sources you trust that are complete and up to 
date.


I compiled this list a few (6?) months ago by typing class A address 
blocks into Arin.net's 'whois' web page and noting which Regional 
Internet Registry it was allocated to.


http://www.voip-info.org/wiki/view/allocated-class-a-ip-address-blocks

After plonking this into a couple of production hosts, attacks of all 
ports dropped dramatically.


I note there have been changes since then (128.0.0.0 was assigned to 
RIPE back in November), so if anybody wants to 'refresh' and post 
changes, please do.





--
_
-- 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


[asterisk-users] Registering with a static peer?

2009-12-28 Thread John Marvin
I've been using a couple of Polycom 501 phones in my home Asterisk setup. I set 
up each phone in sip.conf to be static, i.e. host=phone ip address so that 
registration wasn't required. This has worked fine for me for a couple of years.

Now I just bought a Polycom 335. Since the 501's are now obsolete, I had to go 
through the steps required in order to have separate sip.cfg's, etc. Anyway, I 
got the Polycom 335 to almost work, except for the dialplan. When picking up 
the 
handset (or hitting the line 1 key) it put me in url-dialing mode, i.e. it 
prompted me with Enter URL and didn't follow the dialplan I had set for the 
phone. It took me quite some time to figure out what was going on. I finally 
found a paragraph in the phone's users guide that said:

 URL or IP dialing is not supported on registered phones. If your phone is
 intentionally unregistered, the default dialing mode is by URL.

At least that explained the cause of the problem. I could not find a way of 
changing the default dialing mode for an unregistered phone. So, I figured the 
only answer was to register the phone. Just setting the phone's register 
parameter to 1 (voIpProt.server.1.register=1) fixed the problem, i.e. the 
phone would now prompt me with Enter Number rather than Enter URL and 
allowed normal numeric dialing, according to the dialplan.

But of course, if I turned on verbose logging in Asterisk, it complained about 
the phone not needing to register. The only way I could get it to shut up and 
properly register was by specifying host=dynamic. I'd rather not do that, so 
I'm 
currently using the hack of telling the phone to register and it failing every 
30 seconds. This doesn't seem to break anything, but I can't say I'm really 
happy with the solution.

So, a couple of questions:

1) Does anyone know of a way to disable the default URL dialing mode for an 
unregistered Polycom 335?

2) Is there a way of configuring asterisk to allow static ip address 
registration in sip.conf? I can understand that this doesn't make much sense, 
but it appears the Polycom phone really wants to be registered. I prefer the 
static configuration since it is a little more secure and reliable in my 
opinion.

3) Assuming the answer is no to 1 and 2 above, is there something I am 
overlooking with my hack solution? Should I just go ahead and set the phone 
up 
for dynamic registration?

John

___
-- 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] Persistant Dialing

2008-03-26 Thread John Marvin
Is there any way to get Asterisk to keep redialing automatically if a number is 
busy? How about the case where it is very difficult to get through, due to a 
large number of people trying to simultaneously call the same number? In 
particular, I am asking these questions for an outgoing SIP connection.

Is there a way via SIP to have multiple simultaneous calls in progress, each 
attempting to call the number, and then stopping all of the extra's when one 
succeeds in getting through?

A related question would be (i.e. if I decide to write some custom code for 
this 
application): what happens when the destination number is on a crossbar or step 
office? I'm assuming that when the destination is VOIP or a more modern POTS 
switch that the busy condition is reliably detected and a proper SIP status is 
eventually returned. But if the destination is crossbar or step is it possible 
that the connection will actually be made in order for me to hear the remote 
office generating a busy signal?

John

___
-- 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


Re: [asterisk-users] Polycom power over ethernet (PoE) cables for 500/501, 600/601 and 650 sets

2007-05-11 Thread John Marvin

Stephen Bosch wrote:



3. I thought I might save some clutter by putting these cables between
the midspan and the patch panel, but then I discovered that the male end
of the cable is keyed, just as in the default AC cables provided with
the phones, meaning that they'll only work if plugged directly into the
phone itself. The reduction in clutter with this set-up is,
unfortunately, not what I had hoped, though anything is better than
nothing. I imagine it would work if I sanded away the plastic post on
the connector, but that says nothing about how it might behave if a
non-compliant device were plugged into it. Better safe than sorry.



Actually, I did exactly this with the default AC cables. I plugged my 
Polycom wall warts into my UPS near my household patch panel, filed off 
the tabs on the AC cables and used them as patch cables between my (non 
POE) switch and the patch panel. I use a standard patch cable for the 
phones.


I don't think this would be a good idea for an office environment. I'm 
not sure what would happen if I plugged something other than one of my 
Polycom phones (501's) into the non standard powered ethernet jack. I'm 
fairly safe in my home environment, since I am usually the only one 
messing with ethernet cables in the house, and I have told my family 
specifically not to ever unplug one of the phones in order to plug in 
something else (they can always plug into the back of the phone instead 
if they need a temporary connection).


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Zaptel version for asterisk 1.2.16

2007-03-16 Thread John Marvin

Kevin P. Fleming wrote:



There is no need for any 'map'; any Asterisk 1.2.x release should be
usable with any Zaptel 1.2.x release, but of course we'd suggest using
the latest releases of both. There are no API changes or feature
additions (generally) in release branches, so frequently you can update
_only_ Asterisk if you are happy with the version of Zaptel you have
installed and running.


This may be true most of the time, however, Asterisk 1.2.16 won't build 
without a recent version of zaptel headers (codec_zap.c has missing 
dependencies).


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Building a new voicemail system... Testers needed!

2007-03-07 Thread John Marvin

Olle E Johansson wrote:

Friends in the Asterisk community,

One thing I avoided working with for a long time is the Asterisk 
voicemail code. One module in
Asterisk I've constantly been naming as one of the worst parts is 
voicemail. One part of

Asterisk that I've been kind of avoiding during my trainings is voicemail.


...

I've wanted to do exactly this for quite some time, but I haven't had 
the bandwidth to be able to do any work on it. This idea makes perfect 
sense. I've always felt that the current voicemail implementation was 
too restricted and didn't allow enough customization.


Anyway, I don't have any time to help or test right now (perhaps I will 
in a couple of months), but I just wanted to at least thank you for 
doing what you have done already, and encourage you and others to 
continue this work.


Thanks!

John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Cordless SIP Phones

2007-01-29 Thread John Marvin

Edward Halman wrote:
Can anyone recommend a good cordless user-configurable SIP hardphone 
that is readily available in the states and doesn’t cost $300?  There 
seem to be a plethora of decent and affordable corded phones (like from 
Grandstream) but the search for a cordless unit seems elusive.  I 
purchased a vtech 8100 online only to discover after receiving it that 
it is locked to vonage service.


It depends on the features you are looking for. The Aastra probably has 
the best support of VOIP features on the handset. The additional 
handsets are a little pricey ($99), and only four are supported (which 
is probably more than enough in most cases).


If you don't care about VOIP features in the handset, the Uniden UIP1868 
might be a good option. This can be purchased in an unlocked version 
from various online voip equipment sellers (e.g. www.voipsupply.com). 
The advantage of the Uniden set is that it uses the same handsets as 
their 5.8 Ghz cordless POTS phones, which means that you have a variety 
of handsets you can use (including a waterproof/submersible handset), 
and they are cheaper. The UIP1868 also supports up to 10 handsets 
(probably way more than you want, but the feature might be useful in 
some situations). There's also a much better chance you can buy a new or 
replacement handset a couple of years down the road.


Otherwise, as others have suggested, you might consider just using an 
FXS adapter and using an analog cordless phone system. This is what I am 
currently doing (although I am seriously considering buying the 
UIP1868). The main problem I have with this solution is the delays 
introduced by caller id, especially if you want distinctive rings based 
on the caller. With an analog system asterisk has to send the caller id 
between the first and second ring. Then, at least with Uniden phones the 
handsets won't ring at all until the caller id has been received (if 
you've enabled the distinctive ringing feature). In my house the 
cordless phone typically doesn't start ringing until the SIP phones have 
already rung twice.


One final note. It is possible to unlock the vtech 8100. Do a google 
search for cyt35. CYT is a program that was written to unlock various TI 
AR7 based devices, and it is known to work with the vtech 8100. I have 
no experience with this myself, but you might want to look into it if 
you still have the vtech 8100, and you are not planning on using it with 
Vonage.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Is there any Asterisk controllable thermostat?

2006-12-08 Thread John Marvin

Doug Crompton wrote:

John,

 Two questions on your comments

 I have no seen an Insteon computer controller similiar to the old bottle
rocket. Is there such a device? I am thinking of getting an Insteon
starter kit bit I have so many X10 devices it will be awhie before, if
ever, that I get it all changed over. Many items, like spotlights, are not
available in Insteon.


Similar, in terms of a wireless transmitter -- no. But they have both a 
serial and a USB computer controller that works over the power ($50-$70 
for the controller). It works  for both X10 and Insteon protocols. Why 
isn't that acceptable?


And yes, some essential X10 replacements are not yet available. I have 
two of the X10 spotlights myself. But Insteon has a lot of interest from 
a lot of companies, so I expect to see a lot more variety in the next 
year or two.


Note: There is opensource software available for the controller, so you 
don't have to pay the extra $70-$200 or more for the various non 
opensource software packages available.




I would be interested in the Ethernet MWI. I am using many phones on an
SPA3000 fxs and I can't seem to find an MWI on an analog phone that works
with Asterisk and the SPA3000, although I have been told that there are
some that do??? The quick answer would be to put a SIP phone with MWI
where your wife wants to be able to see the light. I have a Budgtone 200
and MWI works fine on it. Of course then you have styling and color issues
that might not past the muster.


Well, the answering machine was a digital one that had multiple (3) VM 
boxes. It had a separate message waiting light for each box. That is the 
feature that my wife misses. I'm not sure what if any SIP phones provide 
multiple message waiting indicators. Besides, it is a moot point for me 
at this time, since I've already finished building the hardware, now it 
is just a simple matter of programming to get it to work.

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Is there any Asterisk controllable thermostat?

2006-12-07 Thread John Marvin

Doug Crompton wrote:

I remembered I had an x10 bottlerocket in my X10 junkbox so I connected it
to a spare serial port on my linux server (asterisk resides there) and
implemented with some mods the code mentioned earlier

http://lorance.freeshell.org/asterisk/#asterisk-can-control-the-world

and it works great. Now I have one more way to control X10 devices. I can
even call my VM on the way home and turn on my lights or whatever before I
get home.


I would suggest that people who don't already have an investment in home 
automation equipment should look at Insteon rather than X10. Insteon is 
a next generation version of X10 that provides backwards compatibility 
with X10. The devices are a little more expensive, but not as expensive 
as some of the other alternatives. Insteon provides 2 way communication 
and is a lot more reliable than X10.


If you already have an investment in X10 devices you can slowly convert 
to Insteon, since Insteon provides backwards compatibility, i.e. X10 
controllers can control Insteon devices and Insteon controllers can 
control X10 devices, however you won't get all the advantages of Insteon 
until you have Insteon controllers controlling Insteon devices.


For people with some soldering and basic circuit design skills, you may 
want to consider using ethernet as a home automation bus for some 
things. I love the Olimex PIC WEB and PIC Mini Web development boards 
(they cost $49.95 and $39.95 respectively). They have an ethernet port 
and an expansion connector for the available PIC I/O pins. Microchip 
provides a free C compiler for Pic processors, and they also have an 
open source networking stack that works on the Olimex boards. So with a 
ribbon cable connector and a small breadboard with a few IC's and/or 
driver transistors you can build a device that responds to commands via 
the network (or via a built in web server) from your Asterisk server 
that does about any task you can think of. Lots of fun ... I'm currently 
building a voicemail indicator (my wife didn't like me taking her 
answering machine away with the blinking lights when we switched to 
Asterisk voicemail) using a PIC Web board. Next project will be a web 
based sprinkler controller.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Dialing from Placed Calls on Polycom IP501doesn't always work

2006-11-16 Thread John Marvin

Noah Miller wrote:


I never ran 1.6.6 for any length of time.  1.6.7 and 2.0.1 don't seem
to suffer this issue.  2.0.1 has some buddy watch problems, so you may
not want to use it, but 1.6.7 should be OK.


I've been running 1.6.6 for quite a while, and I have been quite annoyed 
by this bug. However, the release notes for 1.6.7 did not mention fixing 
this problem, so I did not have any motivation for upgrading. But, since 
you said that you did not see the problem on 1.6.7 I decided to upgrade 
and see if the problem was fixed. It appears to have fixed it, although 
I can't be sure yet, because sometimes a call placed from the placed 
calls list did work on 1.6.6, so I don't have enough of a sample size 
yet to be sure the bug is gone. I sure hope it is.


Thanks for the info.

John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Fixing the Caller-ID Problem, by John Todd for O'ReillyNet

2006-10-26 Thread John Marvin

Jay R. Ashworth wrote:

On Thu, Oct 26, 2006 at 01:00:18PM -0400, Henry.L.Coleman wrote:



My position is that there are only two reasons for wanting to change an
outbound CID:
1. to deceive the called party
2. to validate the calling party

I don't know how much notice people take of CID but obviously if if it can
be used to mis-represent or for fraudulant purposes then it will become
useless.


People take *lots* of note of it, or they wouldn't be thinking about a
bill.

As far as I'm concerned, the issue just now is can I trust the CNID
handed to me by my LEC on my PSTN connection.  That is, and really,
can only remain, the province of the LEC's and IXC's that send calls
there.  Firewalling incoming CNID from PRI's and VoIP carriers is the
business of people who accept incoming end-user calls; it has to be
done there in a network architected the way the PSTN is.


There seems to be an underlying assumption here that each outgoing call 
is always tied to an incoming phone number. This isn't always true for 
the PSTN, and it is certainly not true for voip.


For my home Asterisk setup I have a single PSTN line, and then I use a 
variety of different voip providers. I use two different providers for 
my DID's (one toll free, and one normal). I use yet a different provider 
for terminating outgoing calls.


So, when making an outgoing call via voip, what number should I use to 
identify myself? I currently use the number of my PSTN line, since that 
is our public  inbound number.


If you have your way, what kind of controls would be put in place? Each 
voip provider would have to verify that I have the right to use a 
particular number, even if that number isn't provided by that provider? 
How would they know if I got rid of it? Would I even be allowed to do 
what I am doing now? How much is this going to cost the voip termination 
providers to properly administer this?


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Re: Choice of soundfile format

2006-10-25 Thread John Marvin

Martin Joseph wrote:


Transcoding is a bigger hit then mixing as i understand it.

If all the conference members are using ulaw for example, then having 
the playback material encoded in ulaw is the big winner.  If there are 
different codecs connecting, then there is a lot of 
decoding/mixing/recoding that will need to occur.


There is a misunderstanding here. The only time transcoding is not 
required is when data is just being passed through, either from a data 
file (recording, Music on Hold, Voicemail, etc.) or from one channel to 
another, AND the format is the same.


However, once mixing is required, i.e. for a conference, transcoding 
will always be required because you can't mix compressed data. All 
channels have to be decoded to sLinear, mixed, and then reencoded.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Polycom 2.01 sip issues

2006-10-12 Thread John Marvin

James Andrewartha wrote:

Jessee J Holmes wrote:

As far 1.6.7 firmware supporting multiple presences (48 i think), maybe
I was wrong on that; however, I remember reading the 2.0.1 firmware
release notes and they mentioned that feature was fixed within the 2.0
firmware. Maybe they fixed it before that and just never documented it
or maybe I misread it. If it works through in 1.6.7, great! Thanks Douglas.


The release notes for 2.0.1 say:

2.2 Version 2.0.0 (Beta Release Only)
Note: The 2.0.0 Release does not include the changes and corrections from
SIP releases 1.6.6 and 1.6.7


Note that the notes for Version 2.0.1 says it does include all the 
changes from 1.6.6 and 1.6.7. The notes for 2.0.0 shoulw probably say 
does not include ALL the changes, because it does include some. It 
specifically mentions the 48 buddies feature, which then leads some 
people to assume that the feature was new for 2.0.0, whereas you are 
correct in that it was actually introduced for the first time in 1.6.6.




And 1.6.6 is the first release to support 48 watch buddies on the 601. FWIW
I'm still using 1.6.6 here. The only problem I've noticed is that pressing
dial from one of the call lists (when accessed via the arrow keys) doesn't
always work.



Yes, I am running 1.6.6 on my 501, and I have noticed that bug also. Its 
not just when accessing it via the arrow keys. It doesn't work sometimes 
when you access via numeric keys or the select softkey and then 
explicitly pressing the dial softkey. I see no reference in any of the 
release notes to this bug being fixed. I wonder if Polycom knows about it?


John

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Extension Numbering

2006-09-30 Thread John Marvin

Norbert Zawodsky wrote:


quote
... (Well, almost. Extensions must be shorter than 80 characters long,
and you shouldn’t use single-character extensions for your own
use, as they’re reserved.) ...
/quote

O.k. - This answers my first question (if there is disadvantage if we
use only 1 digit extensions).
But what for are single-character extensions reserved ?


As others have mentioned the single character extensions are reserved 
for special extensions in the dialplan, i.e. 's' for start, 't' for 
timeout, 'i' for invalid, etc.


However, the single digit extensions are not reserved, so you can use 
them if you want. The only problem with using single digit extensions is 
the reduced flexibility in your dialplan, i.e. things like: 1) no room 
to expand your number of extensions without having a mix of 1 digit and 
2 (or more) digit extensions, 2) having to have a prefix number for 
dialing an external number, etc.


Of course, if you don't have a dialout digit (e.g. '9') then you have 
limited flexibility also. Since I don't have a dialout digit and I allow 
both 7 digit (NXX) and 11 digit (1NXXNXX) dialing, I don't have 
that many options for extensions either (they either have to start with 
10, 11 or 0). Right now I'm using three digit extensions starting with 
10 and 11 (i.e. 10X and 11X) but I am running out, and am thinking of 
moving to three digit extensions starting with 0 (i.e. 0XX, except 011 
would still work for international dialing). I don't have any use for 
just 0, since I don't even know what dialing an operator should mean in 
the context of a mixed PSTN and multi provider VOIP setup (not to 
mention I haven't called an operator of any type in over 20 years).


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Extension Numbering

2006-09-30 Thread John Marvin

Lacy Moore - Aspendora wrote:

I have a suggestion regarding dial plan.  When I first started I saw no 
reason to have to dial 9 first for outside calls.  Because I wanted to 
be able to dial out from the missed calls list, I chose to eliminate the 
dial 9 requirement.  I'm now regretting it, primarily because 711 is a 
valid number, but also a parking spot.  I can handle 911, and I can 
handle 411, but 711 is going to be a pain.
 
Just wanted to give you something to consider when you are starting 
out.  Something I didn't consider.




Why not just move your parking spot range to something else? It doesn't 
have to be the default 701-720.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] IAX or SIP termination provider that reaches6421xxxxxxx?

2006-09-22 Thread John Marvin
The problem is that most people aren't going to be able to answer this 
question without trying it. Most voip providers (including Teliax) 
advertise a rate to all New Zealand Mobile service providers, i.e. +64 
2, not specifically +64 21xxx.


Note, I just tried a +6421 mobile number via Teliax from the U.S. and it 
worked. So either 1) Teliax can't reliably connect to those numbers, 2) 
They can connect to some subset of those numbers, or 3) they fixed 
something since you last checked.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] sound file length

2006-09-21 Thread John Marvin

Race Vanderdecken wrote:

If it is a wav file you can take the size of the file in bytes and
subtract 44.



This is a hot button of mine. This is a heuristic that may work for many 
wav files, but is not true for others. A wav file header can be larger 
than 44 bytes, the wav data doesn't have to start right after the 
header, and many wav files contain meta data after the wav file data 
(and techically meta data could come before the audio data, but I've 
never seen that before). Some very poorly written wav file playing 
programs will play right through that meta data as if it was audio data.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Looped message playback

2006-09-21 Thread John Marvin

Earle Clubb wrote:

Hello,

I'm trying to play an audio file to a phone an arbitrary number of 
times.  The audio is a five-second segment of a sine wave.  I need this 
to be played repeatedly without gaps between playbacks.  I've tried 
doing this in the dial plan, e.g.:


exten = s,1,Playback(tonefile)
exten = s,2,Goto(1)

but there is too long of a gap between the playbacks.  Does anyone know 
of a way to achieve this?


Well, I don't have a solution for the general case (looped playback), 
but if you are only playing a sine wave, couldn't you use Playtones() 
instead? It has the ability to play a tone indefinitely until you tell 
it to stop.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] A Caller ID question (UK)

2006-09-20 Thread John Marvin

Gordon Henderson wrote:

Heres an oddity. Call comes in on a ordinary BT POTS landline, and in the
UK, (to my knowledge!) the caller ID can be one of 3 things: The number,
withheld and unavailable (which usually means an international call
from a non caller-id co-operating telco, or someone in the UK using some
el-cheapo telco to place outgoing calls)

This works OK. On my DECT phones I get the right thing on the display.


It's basically the same here in the U.S., except that it is normally 
Private instead of withheld.


Now stick an asterisk box inbetween the incoming line and the DECT
phone,and arrange for incoming calls to be forwarded to the DECT phone.
(TDM400P card)

Now, the display on the DECT phone still displays the right thing - ie.
the number, withheld, or unavailable. But Asterisk internally just gets an
empty ${CALLERID} variable with either withheld or unavailable calls.
(When a number is presented it gets the correct number)


What version of Asterisk are you running? I'm very surprised that the 
phone still is able to differentiate between withheld and unavailable.


In Asterisk, at least version for 1.2.10 which I am running, here is how 
 callerid is handled by chan_zap.c (the code that supports your TDM400P 
card and my Sangoma A200D card). When a call comes in on the incoming 
line, the low level code determines if the CLID is private (withheld), 
unavailable or there is a number present. If it is private or 
unavailable it sets a flag indicating that and then it removes the 
privacy/and or unavailable indicator from the number string. But then 
the calling code loses the information in the flag field so from that 
point the only thing you have is whether or not the number field is 
empty or not.


Then, when that caller ID information is passed to your phone, the code 
determines if the number string is empty, and if so it sets the 
unavailable indicator. There is no provision for setting the privacy 
indicator because that information is lost.


That's why I'm surprised that your phone still appropriately indicates 
withheld when it is hooked up to your asterisk box. Have you actually 
tested that particular scenario? If it does work then I am interested in 
the version you are running, because I want a solution to this also. I 
want to see if this is something that used to work and has changed, or 
if one of the later versions fixed this.




Anyone know how to distinguish between the 2 inside the dialplan? (if it's
at all possible)


It's not possible as far as I can tell without modifying the code. You 
could do a hack in the low level code that would replace the name with 
Unavailable or Withheld and replace the number with some illegal or 
known not to work numbers, and then use that in the dialplan.


I'm not sure what the right fix would be. I've thought about mapping the 
flag (before the information is lost) into the channels CallingPres, and 
then mapping that back when passing the information to the phone. But 
I'm not sure of what all the side effects of doing that would be. 
Perhaps then you would be able to look at the CallingPres in the 
dialplan to determine the difference between the two, i.e. prohib vs. 
unavailable.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Polycom related question

2006-09-13 Thread John Marvin

Kevin Smith wrote:

Here is what the configuration looks like for one of the phones, the 
other is 284:


[283](Empire-Defaults)
[EMAIL PROTECTED]

[283a](Empire-Defaults)   [EMAIL PROTECTED]

[283b](Empire-Defaults)
[EMAIL PROTECTED]



So actually you are trying to use one phone to monitor (receive notifies 
for) multiple boxes. It looks like the Polycom's have some support a 
different mwi for each registration, but I'm not sure how well it works. 
 You didn't specify what username you specify for each config above, so 
I don't know if the notifies are going to one registration or to 
different registrations. The messages button on the phone only seems to 
show the status of one registration, but the indicator light seems to 
combine the different results together (and you can't clear the light 
with the clear button since that only applies to one of the 
registrations). Of course that assumes that you are sending the notifies 
to different registrations on the phone -- all bets are off if you are 
sending them to the same registration (which is controlled by the 
username value) since Asterisk is treating them as separate phones the 
notifies will collide with eachother.


You would get more reliable behaviour if you did as Rich suggested and 
just specified something like this for just the [283] config:


[EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]

In that case Asterisk sums up the total messages in each of the boxes 
and the messages button on the phone will show you that total rather 
than the results for only one of the boxes.


The polycom documentation is not very clear on how multiple mwi's are 
supposed to work, so I'm not sure what the right answer is.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [Asterisk-Users] Asterisk Native Sound Distortion (ulaw)

2006-09-12 Thread John Marvin

shadowym wrote:


I found that the distortion was consistent.  In other words it happened in
the same way at the same time in a particular file.  I suspect it has
something to do with how Asterisk plays it back and not any sort of
hardware/IDE/interrupt issue.  Kris, the developer of Astlinux didn't seem
to have any ideas why it would not work as well on Asterisk either.


If the distortion is consistant as you say, then you are probably seeing 
the same problem I found a workaround for.


I was disappointed in the sound quality of the gsm files, so I was happy 
to find the Native Sounds files. However, I then ran into the clicks and 
pops when playing them. Reading some of the earlier comments in this 
discussion someone mentioned an issue with Asterisk not padding files to 
even 20ms increments when playing them. So, although that may be a bug 
in Asterisk, I thought I would see if that was the problem by writing a 
quick C program to pad all my ulaw files to multiples of 160 bytes. 
Voila, all clicks and pops were gone. So, I don't know if that is the 
only issue, and perhaps there are other problems people are having, but 
padding the files fixed the issue for me. Obviously this should be fixed 
in Asterisk.


If anyone else wants to try this experiment I've enclosed the simple C 
program I wrote below. If you compile it and call it padulaw here is how 
I fixed all the files:


find /var/lib/asterisk/sounds -type f -name '*.ulaw' | xargs padulaw

This program could be easily modified to pad .sln files to a multiple of 
320 bytes (the files would be padded with 0x rather than 0xff).


John

#include stdio.h
#include fcntl.h
#include sys/stat.h
#include sys/types.h

#define ULAW_SILENCE 0xff
#define MS20_BYTES  160

unsigned char silence[MS20_BYTES];

void pad_file(char *);

main(int argc, char **argv)
{
int i;
int nfiles;

if (argc  2) {
fprintf(stderr,Usage: %s file name ...\n,argv[0]);
exit(1);
}

nfiles = argc - 1;
for (i = 0; i  nfiles; i++) {
pad_file(argv[i+1]);
}

exit(0);
}

void
pad_file(char *fname)
{
int fd;
int i;
struct stat sbuf;
int filesize;
int remainder;
int nwrite;

fd = open(fname,O_WRONLY|O_APPEND);
if (fd  0) {
fprintf(stderr,Could not open %s for writing.\n,fname);
return;
}

if (fstat(fd,sbuf) != 0) {
fprintf(stderr,Could not stat file %s.\n,fname);
return;
}

filesize = (int) sbuf.st_size;
remainder = filesize % MS20_BYTES;
if (remainder == 0) {
close(fd);
return;
}

nwrite = MS20_BYTES - remainder;
for (i = 0; i  nwrite; i++)
silence[i] = (unsigned char)ULAW_SILENCE;

if (write(fd,(void *)silence,nwrite) != nwrite) {
fprintf(stderr,Write Failure on file %s\n,fname);
return;
}

close(fd);
return;
}
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Polycom related question

2006-09-10 Thread John Marvin

Rich Adamson wrote:



If you look at the sample configs, you'll find:
[EMAIL PROTECTED],[EMAIL PROTECTED]  ; Subscribe to status of multiple 
mailboxes


in the sip.conf.samples for v1.2 stable. That is the only way that I 
know of to turn on the mwi for two different phones (eg, extensions).


Is that what you're using and its not working?


I think that is the opposite of what Kevin is trying to do. The above 
config is for one phone monitoring multiple voicemail boxes. Kevin wants 
multiple (two) phones monitoring the same mailbox, i.e. he is probably 
specifying the same mailbox within the config for each of the phones 
that will be monitoring that mailbox.


I'm not sure why there would be any problems with that. Kevin, have you 
tried just having one phone at a time do the monitoring, to make sure 
there aren't any problems with the phone's config? When one misses a 
notification, is it always the same phone that misses it? It's 
interesting that the problem is intermittent, it would seem that if 
Asterisk doesn't support this that it would only notify one phone each 
time and that the results would be consistant.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Polycom related question

2006-09-10 Thread John Marvin

Rich Adamson wrote:



Phones don't monitor mailboxes. One needs to tell asterisk which 
phones are to be notified when a voicemail is left, and the sip 
statements above are the only ones that I'm aware of to accomplish that.


Yes I am aware of that. Perhaps I chose the wrong wording, but I 
clarified it in the next sentence by talking about specifying the same 
mailbox in two different configs.




On many phones, there is only one mwi function. If Kevin has one extn 
(eg, 111) on a phone set up with a mwi and then a second extn (eg, 222) 
on the same phone set up for mwi, one extn's mwi might turn the 
indicator on while the second extn will turn it right back off again. 
Since I don't recall Kevin saying what type of phone he's using, I can 
only guess that might be the problem.




Yes, I can easily see that some phones won't behave well being notified 
for two different mailboxes. I'm not sure how a Polycom phone would 
handle that (which is the type of phone he is asking about).


However, that does not appear to be the problem. Again, he is talking 
about two different phones being notified for changes to one mailbox, 
not one phone being notified for two different mailboxes. Your example 
was something like this:


[101]
[EMAIL PROTECTED],[EMAIL PROTECTED]

which would mean that extension 101 should be notified for changes to 
voicemail boxes 1234 and 1233. That still would result in Asterisk only 
having to notify one phone when a change was made to a particular mailbox.


He is doing (or should be doing) something like this:

[101]
[EMAIL PROTECTED]

...

[102]
[EMAIL PROTECTED]

i.e. extensions 101 and 102 should be notified about changes to 
voicemail box 1234. His message appeared to be fairly clear that 
extensions 101 and 102 were two separate phones, rather than two 
different lines on the same phone.


This should not be a problem with the phone unless there is a 
configuration issue (which is still certainly a possibility), since as 
far as the phone is concerned it doesn't know about the other and there 
should be no difference in the protocol. But it is possibly a bug in 
Asterisk, i.e. it may not properly handle having to notify more than one 
phone when a change is made to a particular mailbox.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] What don't I get about SIP?

2006-09-09 Thread John Marvin

Mike wrote:

Here it is:


 dialplan dialplan.impossibleMatchHandling=1
dialplan.removeEndOfDial=1
  digitmap dialplan.digitmap=[7]xx|[9]xxT|[9][1]xxT
dialplan.digitmap.timeOut=3/ 


When I dial 845, I get fast busy.  When I dial 9-555-555-, it dials
without the need to press send.  All good result.


Actually, as soon as you hit 8 you will get the fast busy.

Is that your full dialplan? What about an emergency (911) or other N11 
calls? What about direct dial international calls (011...)?




When I dial 9-555-5 and wait, nothing happens


So, it looks like what you want is a global dialing timeout in the 
phone, which the Polycom phones don't appear to have once you break 
dialtone. But you may be able to kluge the digit timeout to give you 
that feature if you don't need it for what it is meant for. Right now 
you are using it to timeout when a digit other than 1 is pressed after 
the 9. That isn't really necessary (unless 91 followed by 9 digits is 
actually a valid number for whatever you are doing with it). Also, you 
are using the brackets unecessarily, since you only have one digit 
within them. An equivalent dialplan that doesn't use the digit timeout 
feature would be:


digitmap dialplan.digitmap=7xx|9[2-9]x|91xx

The digit timeout feature is typically used for direct dial 
international calls and calling the operator. If you don't need either 
of those then you could do something like this:


digitmap dialplan.digitmap='7xx|9[2-9]x|91xx|[79]x.T
dialplan.digitmap.timeOut=15/

which would timeout and send whatever sequence you had pressed after 15 
seconds if you hadn't already matched one of the other patterns.


Note that asterisk may possibly respond with error code 484 if the 
sequence pressed isn't complete, which would make the phone continue to 
ask for more digits. So, the other part of the solution is to add:


exten = _X.,1,Congestion()

to extensions.conf in the context you are using for your polycom phone(s).

That will match anything that doesn't match one of your valid extensions 
as long as it is two digits or more. So you still will get the behaviour 
you don't like if someone just presses 7 or 9 and nothing else. But it 
will give you most of what you want, assuming I understand what you are 
looking for in the first place (you could try x.T in the digitmap and _. 
in extensions.conf, but _. is likely to cause other problems).


Note: When the Polycom gets the congestion response from Asterisk it 
plays the congestion tone for only about 3-4 seconds, and then hangs up, 
which is different behaviour from when you press an 8 for instance. If 
you want the behaviours to be similar you could do something like this:


exten = _X.,1,Answer()
exten = _X.,2,Playtones(congestion)
exten = _X.,3,Wait(30)
exten = _X.,4,Hangup()

John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] What don't I get about SIP?

2006-09-09 Thread John Marvin

Mike wrote:


Did I misread the Asterisk wiki pages, because I believed that when a
pattern was present, the pattern takes precedence over any real
extensions? (i.e. if I have both 1234 and _1XXX as extensions in a context)?


It's the opposite. Asterisk always uses the most specific match for an 
extension, i.e. anything that matches _1XXX will take precedence over 
_, but if it matches _12XX that will take precedence over _1XXX, etc.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] What don't I get about SIP?

2006-09-09 Thread John Marvin

Mike wrote:

It certainly makes sense, and I tried it...it works, you are right.

So what do you make of this page :
http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf
+sorting 



Interesting. I got my information from Asterisk: The Future of 
Telephony (in the dialplan chapter). Perhaps the wiki page refers to 
1.0 behaviour, and 1.2 behaviour is what is defined in Asterisk: TFOT?


My experimentation so far has shown the Asterisk: TFOT information to be 
correct. I haven't played around with #include, which the wiki says can 
change the dialplan extension sorting. I may have to experiment with 
that to see if it has any effect.


I hope that what I said is correct regardless, because it makes the most 
sense and is less likely to cause weird issues when changing the order 
of #includes, etc.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] IP phone with 2 ethernet jacks

2006-08-29 Thread John Marvin

Matt Birmingham wrote:
 Can you supply any information/links as to how you got this working?

Sure. I followed the instructions here:

http://www.voip-info.org/wiki/view/Asterisk+presence

However, there was one important fact missing. By default the presence 
feature is turned off in the Polycom's (at least that was the case with 
my Polycom 501's). It needs to be turned on before any of the other 
settings take effect. To turn it on you can edit sip.cfg. Look near the 
end for the feature section. Feature 1 is presence, changed 
feature.1.enabled from 0 to 1. This is also covered in section 
4.6.1.23 of the Polycom admin manual.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] IP phone with 2 ethernet jacks

2006-08-27 Thread John Marvin

Mario wrote:
We have used both IP501, IP601 (Polycom), Snom 320 and Snom 360. All of 
them are good phones with very good quality of voice and full of features.


However, SNOM phones have a feature (missing from Polycom) that most of 
our customers really require: with SNOM phones you have leds for 
presence support that allow you to see which other extensions are busy 
(through the Asterisk Hint command). If this is important for you, you 
should really stay with Snom.


This feature isn't missing from Polycom phones, although it may not work 
the same as what you want. But the phones do support the presense 
feature, and I have it working on my IP501's with Asterisk.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] How to set externip in sip.conf automatically?

2006-08-23 Thread John Marvin

Larry Alkoff wrote:
As stated in the original post, when I entter the IP with an editor 
directly into sip.conf calls work just fine but I am looking for a way 
to have that done _automatically_.


The Asterisk - Future of Telephony book says it is possible for Asterisk 
to access a Linux environment variable containing the IP information in 
the form of ${ENV{variable}}.


It doesn't seem to work.  I am asking how to make it work.



Actually, I don't think you read his response carefully enough. He was 
giving you a method of doing it automatically.


But first, lets dismiss the environment variable solution. I haven't 
played with using environment variables in Asterisk, so I can't help you 
there. But I do know about environment variables in general, and you 
cannot use them to solve your problem. Environment variables are not 
global, i.e. if you change one it does not effect the value in all 
currently running programs. The environment (all of the environment 
variables and their values) is inherited from the parent process (it is 
passed in by the kernel on the new processes stack when the process 
first starts). After that, only the process itself can change its own 
values in order to pass on a changed value to a child (but again, only 
when that child process is started, i.e. a parent cannot affect the 
environment of an already running child process). In summary, you can't 
change the values of Asterisk's environment variables after Asterisk has 
already started. The values that Asterisk sees are the values that it 
inherited from its parent process, i.e. most likely the rc scripts that 
started Asterisk when you first booted the machine.


Now, back to the solution proposed by Brad. He was in effect proposing 
that you dynamically change sip.conf. However, parsing a rewriting 
sip.conf automatically is kind of ugly, but luckily Asterisk supports 
#include. So, he suggested that you can periodically generate a file 
with a single line in it, i.e. externip=xx.xx.xx.xx and then use 
#include in your sip.conf to include it (i.e. sip.conf doesn't have to 
ever change). The final part of the solution is to make Asterisk reread 
sip.conf (and the included dynamically created file at the same time). 
You can do that with:


asterisk -rx sip reload

which you can put into the same cron job that you currently are using to 
refresh /etc/myip.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


[asterisk-users] No retry after DNS failure

2006-08-22 Thread John Marvin
Today I had a brief power outage which caused the Asterisk server and 
DSL modem to reboot. The Asterisk server came up before the internet 
connection was working, so it failed when try to look up some of the 
hosts for my outbound voip providers in sip.conf.


Asterisk never recovered from that, i.e. it never retried so those 
providers were unavailable. The only provider that was still available 
was one that I had entered the IP address for, rather than the host name.


Have any of you run into this issue, and if so, how have you solved it? 
It seems that since Asterisk periodically tries to reregister it should 
also retry the DNS lookup at the same time, rather than never trying 
again if the lookup fails. This would indicate that Asterisk would also 
fail if the voip provider changed the IP address of its server because 
Asterisk would never see the new IP address.


Here are some workarounds I thought of, but none of them are 
particularly good:


1) Get a UPS so my machines won't reboot when the power fails. This 
actually might not solve anything, because I'm connected to a remote 
DSLAM in my neighborhood that I believe does not have backup power, so 
it won't work when the power is out. But perhaps Asterisk is more robust 
after it has booted (I'll have to test this).


2) Change all host names in sip.conf to IP addresses. This is kind of 
ugly and also will break when a voip provider changes their IP address. 
There is a reason for DNS!


3) Have a cron job send asterisk periodic sip reload commands.

4) Delay the start of asterisk until the internet connection has come 
up. This could cause me to be without any phones if there is any delay 
or failure in bringing up the network (I also have zap channels and PSTN 
lines).


5) A hybrid of ideas 3 and 4 above: Have a startup script that waits for 
the internet connection to come up, and then sends a sip reload 
command to Asterisk.


Any other ideas?

John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] No retry after DNS failure

2006-08-22 Thread John Marvin

James Harper wrote:


Are you sure that it was Asterisk? Did you try an nslookup after the
network came up while Asterisk wasn't working? How long did you leave it
before taking matters into your own hands?


Fairly sure. I didn't realize there was a problem until about 6 hours 
after the power outage. Local calls go out via the PSTN, so I didn't 
notice the problem until I tried to make a long distance call. It took a 
few minutes to diagnose the problem. It was when I did a sip show 
peers and noticed it was missing my outbound voip providers that I 
realized there was a problem. A sip reload immediately brought them back.




DNS will do negative caching as well as positive. If sip.sometel.com
failed to resolve (because it doesn't exist or because your network
wasn't up), your caching dns server or resolver or both may remember
this as a 'negative cache' entry, so that it remembers that it doesn't
exist.



I'm fairly sure there is a different error response between name 
doesn't exist as opposed to a failure to connect to an authoratative 
name server in the chain. For example if the name servers responsible 
for .com said that sometel.com didn't exist, or the nameservers for 
sometel.com said that sip.sometel.com didn't exist then that should be 
negatively cached. But if the name servers for .com said that the IP 
address for the name servers for sometel.com are xx.xx.xx.xx and then 
your dns server can't connect to xx.xx.xx.xx then a different error 
response is returned, and I don't believe that is or should be 
negatively cached.



If your asterisk server is responsible for the network connection, then
the ifup/pon script should take care of flushing the dns cache for you
for exactly this reason.

If you have another server or router that is responsible for the
connection then the server running asterisk will have no idea that its
negative cache is no longer valid.


Well, you may have hit upon a reason why others may not see this 
problem. The asterisk server is not responsible for the connection, an 
external DSL modem/router is responsible. However, I run a local DNS 
server, so it is available to Asterisk. Perhaps Asterisk is more robust 
when it can't contact the DNS server, as opposed to it being able to 
contact the DNS server and the DNS server responds with an error. 
Perhaps Asterisk doesn't differentiate how it behaves depending on the 
type of error.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] No retry after DNS failure

2006-08-22 Thread John Marvin

Rich Adamson wrote:

If memory serves correctly, most of the above has been raised as issues 
in the past and the suggested work around has been to run a dns caching 
server on the asterisk box.


That's exactly what I am doing, unless you mean that the dns caching 
server caches results over a reboot.


FWIW, I always use IP addresses instead of dns names. But, I don't have 
to deal with dynamic ip changes of any device either.


I don't have to deal with any dynamic IP changes either, other than the 
possibility of one of my voip providers changing the IP address of their 
servers, which is probably a very rare occurence.


John
___
--Bandwidth and Colocation provided by Easynews.com --

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