Re: [asterisk-users] How Secure Is Asterisk

2008-10-20 Thread Sam Tam
There are no 100% solution but we can only do our best.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of broadband
Voice
Sent: Tuesday, October 21, 2008 4:37 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] How Secure Is Asterisk

lol 


On Mon, Oct 20, 2008 at 3:34 PM, Sam Tam <[EMAIL PROTECTED]> wrote:


VPN IP phone?
Then firewall up the asterisk to disable any outside access and
place the
vpn server with the asterisk in a locked cabinet .

Sure that will stop someone trying to physically listen to their
call.
Or they can always use the good old landline or mobile phone and let
the
government listen to them too/
Sam


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve
Anness
Sent: Tuesday, October 21, 2008 3:02 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] How Secure Is Asterisk

I am sure this has been discussed prior, however, I am sitting here
and
being asked this very question by my superiors.  They are loving
what I have
done with our two Asterisk servers here; however, they keep asking
me if it
is secure or not.  Of course, as with anything, I suspect that on a
secure
network they can be reasonably safe.  However, realistically if I am
using
the asterisk server to make internal calls and discussion very
private
matters, how possible is it for someone to listen to calls?  How
good is the
encryption if any over an IAX trunk?

Steve Anness



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





___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Chris Ziomkowski
Hi Peter,

Basically, I had to rewrite the R2 state machine to use pulsed outbound 
signalling instead of compelled, and hack in support of the DTMF tone 
groups instead of R2 frequencies. It was messy, but possible. The 
inbound side was much cleaner, and you may be correct when you say you 
could just use China R2 for that. Is this application going to be 
limited to inbound, or do you need outbound dialing?

The originating switch may also make a difference. Just be prepared for 
that. TOT is switching some of their stuff over to Huawei, which in my 
experience causes issues (however, no idea about their R2 support in 
general). We were connecting to a Siemens EWSD out of Prakanong, and it 
proved pretty reliable. Not much variation at all. This application was 
used for a time to do call ins for the 07 show, so we were doing very 
heavy signalling for about 1 hour every week. TA had configured a 2:1 
ratio for us on MF senders on the incoming side. Average call duration 
was only 30 seconds, and 120 lines were packed for 1 hour straight.

I assume you've already asked the Turtlephone Organization of Thailand 
about ISDN? Have you asked more than once? Often times they'll just say 
"no we don't support it" because they're lazy or don't know, not because 
it isn't possible. If you haven't actually had a sit down with an 
engineer in their offices, I wouldn't necessarily believe them if the 
salesrep tells you they can't do it. A bottle of Johnny Walker as a gift 
can often make these discussions go easier.

Chris

Peter Lindquist wrote:
> We are using TOT (Telephone Organization of Thailand). They are very 
> messy on their side so we are sorting out some unrelated problems with 
> them right now - very slow response.
>
> I believe you are correct when you say that outbound dialing is DTMF, I 
> have heard this before too.
>
> Out of curiosity what did you have to change in the C libraries?
>
> Peter
>
> Chris Ziomkowski wrote:
>   
>> I got Asterisk to work with R2 in Thailand about 3 years ago. This was 
>> back before OpenR2, and I had to modify the C libraries directly. Of 
>> course, outbound dialing is DTMF, not R2, however inbound is pretty 
>> standard. This was on TA  (now True) circuits.
>>
>> I guess I can't tell you much about how to set it up today as my 
>> experience is so out of date, but I can offer you encouragement that it 
>> will work for you if you put in the effort. There is nothing fundamental 
>> which will cause it to fail. Which carrier are you planning on 
>> connecting to?
>>
>> Chris
>>
>> Moises Silva wrote:
>>   
>> 
>>> Hello Peter,
>>>
>>> You can ask this better in the asterisk-r2 mailing list.
>>>
>>> I don't know of anyone that has used OpenR2 in Thailand, but I am
>>> interested in adding support for that variant. Contact me at this same
>>> e-mail address or via Google talk (my e-mail address works for MSN as
>>> well ) to discuss further details.
>>>
>>> Moisés Silva
>>>
>>> On Mon, Oct 20, 2008 at 12:58 PM, Peter Lindquist
>>> <[EMAIL PROTECTED]> wrote:
>>>   
>>> 
>>>   
 Dear All,

 I'm looking for someone who has implemented OpenR2 in Thailand
 successfully. Any settings, advice, caveats etc. are welcome.

 Best regards,

 Peter Lindqvist
 www.voxion.net

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

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


___
-- 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] ISDN PRI Caller ID problem

2008-10-20 Thread A.R. Nasir Qureshi

Dear Matthew,

Thank you for your reply.

Please tell me if there is any way I can see the actual q931 message received 
from the card without any translation / filtration / alteration by the software 
or the driver ?

How much the switch type or other configuration variables affect the SETUP 
message being received ? What I am concerned is that may be the wrong switch 
type or other parameter may be causing the problem.

This is my first attempt at configuring an ISDN, and I want to be sure before I 
go after the telco.

--
Regards,


Nasir.

A.R. Nasir Qureshi wrote:


> Dear All,
> 
> I am trying to setup an ISDN line from local telco on a digium card. The 
> problem I am facing is that I am not getting any caller id from the 
> telco. They say that they have enabled caller id.
  


Dear Matthew,

Thank you for your reply.

Please tell me if there is any way I can see the actual q931 message received 
from the card without any translation / filtration / alteration by the software 
or the driver ?

How much the switch type or other configuration variables affect the SETUP 
message ?

This is my first attempt at configuring an ISDN, and I want to be sure before I 
go after the telco.


Tell them they are wrong.  There is no calling party number IE in that 
SETUP message below.  :-) 


Matthew Fredrickson
Digium, Inc.


> 
> Please help me out.
> 
> My zapata.conf

> 

> [trunkgroups]
> 
> [channels]

> context=pstnincoming
> pridialplan=local
> prilocaldialplan=local
> 
> usecallerid=yes

> cidsignalling=v23
> cidstart=ring
> hidecallerid=no
> callwaiting=no
> usecallingpres=yes
> sendcalleridafter=1
> echocancel=no
> echocancelwhenbridged=no
> rxgain=0.0
> txgain=0.0
> callgroup=1
> pickupgroup=1
> 
> immediate=no

> callerid=asreceived
> busydetect=no
> busycount=6
> callprogress=no
> faxdetect=incoming
> 
> 
> switchtype = national

> signalling = pri_cpe
> group = 1
> channel => 1-15,17-31
> channel => 32-46,48-62
> 

> 
> The information I get from using "pri intense debug span 1" is:

> 

> < [ 02 01 16 9c 08 02 15 01 05 04 03 80 90 a3 18 03 a1 83 81 70 08 c1 34 
> 33 39 32 38 34 32 a1 ]
> 
> < Informational frame:

> < SAPI: 00  C/R: 1 EA: 0
> <  TEI: 000EA: 1
> < N(S): 011   0: 0
> < N(R): 078   P: 0
> < 26 bytes of data
> Handling message for SAPI/TEI=0/0
> -- ACKing all packets from 77 to (but not including) 78
> -- Since there was nothing left, stopping T200 counter
> -- Stopping T203 counter since we got an ACK
> -- Nothing left, starting T203 counter
> < Protocol Discriminator: Q.931 (8)  len=26
> < Call Ref: len= 2 (reference 5377/0x1501) (Originator)
> < Message type: SETUP (5)
> < [04 03 80 90 a3]
> < Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
> capability: Speech (0)
> <  Ext: 1  Trans mode/rate: 64kbps, 
> circuit-mode (16)

>  < [18 03 a1 83 81]
> < Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  
> Preferred  Dchan: 0

>  <   Ext: 1  Coding: 0  Number Specified  Channel Type: 3
> <   Ext: 1  Channel: 1 ]
> < [70 08 c1 34 33 39 32 38 34 32]
> < Called Number (len=10) [ Ext: 1  TON: Subscriber Number (4)  NPI: 
> ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '4392842' ]

> < [a1]
> < Sending Complete (len= 1)
> -- Making new call for cr 5377
> -- Processing Q.931 Call Setup
> -- Processing IE 4 (cs0, Bearer Capability)
> -- Processing IE 24 (cs0, Channel Identification)
> -- Processing IE 112 (cs0, Called Party Number)
> -- Processing IE 161 (cs0, Sending Complete)
> q931.c:3509 q931_receive: call 5377 on channel 1 enters state 6 (Call 
> Present)

> Sending Receiver Ready (12)
> 
> 
> 
  

--
Regards,


Nasir.

___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Peter Lindquist
We are using TOT (Telephone Organization of Thailand). They are very 
messy on their side so we are sorting out some unrelated problems with 
them right now - very slow response.

I believe you are correct when you say that outbound dialing is DTMF, I 
have heard this before too.

Out of curiosity what did you have to change in the C libraries?

Peter

Chris Ziomkowski wrote:
> I got Asterisk to work with R2 in Thailand about 3 years ago. This was 
> back before OpenR2, and I had to modify the C libraries directly. Of 
> course, outbound dialing is DTMF, not R2, however inbound is pretty 
> standard. This was on TA  (now True) circuits.
>
> I guess I can't tell you much about how to set it up today as my 
> experience is so out of date, but I can offer you encouragement that it 
> will work for you if you put in the effort. There is nothing fundamental 
> which will cause it to fail. Which carrier are you planning on 
> connecting to?
>
> Chris
>
> Moises Silva wrote:
>   
>> Hello Peter,
>>
>> You can ask this better in the asterisk-r2 mailing list.
>>
>> I don't know of anyone that has used OpenR2 in Thailand, but I am
>> interested in adding support for that variant. Contact me at this same
>> e-mail address or via Google talk (my e-mail address works for MSN as
>> well ) to discuss further details.
>>
>> Moisés Silva
>>
>> On Mon, Oct 20, 2008 at 12:58 PM, Peter Lindquist
>> <[EMAIL PROTECTED]> wrote:
>>   
>> 
>>> Dear All,
>>>
>>> I'm looking for someone who has implemented OpenR2 in Thailand
>>> successfully. Any settings, advice, caveats etc. are welcome.
>>>
>>> Best regards,
>>>
>>> Peter Lindqvist
>>> www.voxion.net
>>>
>>> ___
>>> -- 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
>>>
>>> 
>>>   
>>
>>   
>> 
>
>
> ___
> -- 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
>
>   

___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Peter Lindquist
Hello Moises,

I will set up the asterisk-r2 mailing list.

As I have understood it Thailand is using the same version as China of R2.

Currently we are discussing with TOT (Telephone Organization of 
Thailand), because I believe they are messing up on their side so we are 
sorting that out.

//Peter

Moises Silva wrote:
> Hello Peter,
>
> You can ask this better in the asterisk-r2 mailing list.
>
> I don't know of anyone that has used OpenR2 in Thailand, but I am
> interested in adding support for that variant. Contact me at this same
> e-mail address or via Google talk (my e-mail address works for MSN as
> well ) to discuss further details.
>
> Moisés Silva
>
> On Mon, Oct 20, 2008 at 12:58 PM, Peter Lindquist
> <[EMAIL PROTECTED]> wrote:
>   
>> Dear All,
>>
>> I'm looking for someone who has implemented OpenR2 in Thailand
>> successfully. Any settings, advice, caveats etc. are welcome.
>>
>> Best regards,
>>
>> Peter Lindqvist
>> www.voxion.net
>>
>> ___
>> -- 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
>>
>> 
>
>
>
>   

___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Chris Ziomkowski
I got Asterisk to work with R2 in Thailand about 3 years ago. This was 
back before OpenR2, and I had to modify the C libraries directly. Of 
course, outbound dialing is DTMF, not R2, however inbound is pretty 
standard. This was on TA  (now True) circuits.

I guess I can't tell you much about how to set it up today as my 
experience is so out of date, but I can offer you encouragement that it 
will work for you if you put in the effort. There is nothing fundamental 
which will cause it to fail. Which carrier are you planning on 
connecting to?

Chris

Moises Silva wrote:
> Hello Peter,
>
> You can ask this better in the asterisk-r2 mailing list.
>
> I don't know of anyone that has used OpenR2 in Thailand, but I am
> interested in adding support for that variant. Contact me at this same
> e-mail address or via Google talk (my e-mail address works for MSN as
> well ) to discuss further details.
>
> Moisés Silva
>
> On Mon, Oct 20, 2008 at 12:58 PM, Peter Lindquist
> <[EMAIL PROTECTED]> wrote:
>   
>> Dear All,
>>
>> I'm looking for someone who has implemented OpenR2 in Thailand
>> successfully. Any settings, advice, caveats etc. are welcome.
>>
>> Best regards,
>>
>> Peter Lindqvist
>> www.voxion.net
>>
>> ___
>> -- 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
>>
>> 
>
>
>
>   


___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Moises Silva
Hello Peter,

You can ask this better in the asterisk-r2 mailing list.

I don't know of anyone that has used OpenR2 in Thailand, but I am
interested in adding support for that variant. Contact me at this same
e-mail address or via Google talk (my e-mail address works for MSN as
well ) to discuss further details.

Moisés Silva

On Mon, Oct 20, 2008 at 12:58 PM, Peter Lindquist
<[EMAIL PROTECTED]> wrote:
> Dear All,
>
> I'm looking for someone who has implemented OpenR2 in Thailand
> successfully. Any settings, advice, caveats etc. are welcome.
>
> Best regards,
>
> Peter Lindqvist
> www.voxion.net
>
> ___
> -- 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
>



-- 
"I do not agree with what you have to say, but I'll defend to the
death your right to say it." Voltaire

___
-- 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] Zaptel FXO offhook when connected to PSTN

2008-10-20 Thread CSB
>> I installed Trixbox and a TDM400P with 2 FXO and 2 FXS ports and am
having
>> an annoying issue with the FXO ports. As soon as I plug either one into
the
>> phone line it's as though the line is disconnected i.e. get disconnected
>> tone when trying to dial out, line is busy when dialling in.
>
>Err... it should be exactly the other way around. You should have an
>alarm when you disconnect.
>
That seems to be the case now (see below). Perhaps I mixed it up yesterday.

>What version of zaptel is it?
>
>  cat /sys/modules/zaptel/version
1.4.9.2-

Curiously, I installed zaptel-1.4.12.1 but it still reports 1.4.9.2-.

>To see the status of alarms: 
>
>  cat /proc/zaptel/1 
>
>If there is 'RED' on a channel, it is in alarm.
Span 1: WCTDM/0 "Wildcard TDM400P REV I Board 1" (MASTER)

   1 WCTDM/0/0 FXOKS (In use)
   2 WCTDM/0/1 FXOKS (In use)
   3 WCTDM/0/2 FXSKS (In use)
   4 WCTDM/0/3 FXSKS (In use)

(Same whether plugged in or not)

Plug in
[Oct 21 15:05:09] DEBUG[18892] chan_dahdi.c: Monitor doohicky got event No
more alarm on channel 4
[Oct 21 15:05:09] NOTICE[18892] chan_dahdi.c: Alarm cleared on channel 4

dahdi show channel 4
Channel: 4LI>
File Descriptor: 15
Span: 1
Extension:
Dialing: no
Context: from-pstn
Caller ID:
Calling TON: 0
Caller ID name:
Destroy: 0
InAlarm: 0
Signalling Type: FXS Kewlstart
Radio: 0
Owner: 
Real: 
Callwait: 
Threeway: 
Confno: -1
Propagated Conference: -1
Real in conference: 0
DSP: no
Relax DTMF: no
Dialing/CallwaitCAS: 0/0
Default law: ulaw
Fax Handled: no
Pulse phone: no
Echo Cancellation: 128 taps unless TDM bridged, currently OFF
Actual Confinfo: Num/0, Mode/0x
Actual Confmute: No
Hookstate (FXS only): Offhook

Dial
[Oct 21 15:05:23] DEBUG[18916] chan_dahdi.c: Using channel 4
[Oct 21 15:05:23] DEBUG[18916] rtp.c: Channel 'Zap/4-1' has no RTP, not
doing anything
[Oct 21 15:05:23] DEBUG[18916] chan_dahdi.c: Dialing '4412335'
[Oct 21 15:05:23] DEBUG[18916] chan_dahdi.c: Deferring dialing...
[Oct 21 15:05:23] DEBUG[18916] devicestate.c: Notification of state change
to be queued on device/channel Zap/4
[Oct 21 15:05:23] VERBOSE[18916] logger.c: [Oct 21 15:05:23] -- Called
g0/4412335
[Oct 21 15:05:23] DEBUG[18916] chan_dahdi.c: Dropping frame since I'm still
dialing on Zap/4-1...
[Oct 21 15:05:23] DEBUG[18687] devicestate.c: No provider found, checking
channel drivers for Zap - 4
[Oct 21 15:05:23] DEBUG[18687] devicestate.c: Changing state for Zap/4 -
state 2 (In use)
[Oct 21 15:05:23] DEBUG[18707] app_queue.c: Device 'Zap/4' changed to state
'2' (In use) but we don't care because they're not a member of any queue.
[Oct 21 15:05:23] DEBUG[18916] chan_dahdi.c: Dropping frame since I'm still
dialing on Zap/4-1...
Numerous of these
[Oct 21 15:05:24] DEBUG[18916] chan_dahdi.c: Exception on 15, channel 4
[Oct 21 15:05:24] DEBUG[18916] chan_dahdi.c: Got event Hook Transition
Complete(12) on channel 4 (index 0)
[Oct 21 15:05:24] DEBUG[18916] chan_dahdi.c: Sent deferred digit string:
T4412335w
[Oct 21 15:05:24] DEBUG[18916] chan_dahdi.c: Dropping frame since I'm still
dialing on Zap/4-1...
More of these
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Exception on 15, channel 4
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Got event Dial Complete(9) on
channel 4 (index 0)
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Enabled echo cancellation on
channel 4
[Oct 21 15:05:26] DEBUG[18916] devicestate.c: Notification of state change
to be queued on device/channel Zap/4
[Oct 21 15:05:26] VERBOSE[18916] logger.c: [Oct 21 15:05:26] -- Zap/4-1
answered Zap/1-1
[Oct 21 15:05:26] DEBUG[18916] rtp.c: Channel 'Zap/1-1' has no RTP, not
doing anything
[Oct 21 15:05:26] DEBUG[18916] devicestate.c: Notification of state change
to be queued on device/channel Zap/1
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Took Zap/1-1 off hook
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Requested indication 20 on
channel Zap/1-1
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Requested indication 20 on
channel Zap/4-1
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: master: 1, slave: 4, nothingok:
0
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Stopping tones on 1/0 talking
to 4/0
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Stopping tones on 4/0 talking
to 1/0
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: disabled echo cancellation on
channel 1
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: disabled echo cancellation on
channel 4
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Making 4 slave to master 1 at 0
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Added 15 to conference 9/1
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Added 11 to conference 9/4
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Updated conferencing on 1, with
0 conference users
[Oct 21 15:05:26] DEBUG[18916] chan_dahdi.c: Updated conferencing on 4, with
0 conference users
[Oct 21 15:05:26] VERBOSE[18916] logger.c: [Oct 21 15:05:26] -- Native
bridging Zap/1-1 and Zap/4-1
[Oct 21 15:05:26] DEBUG[18687] devicestate.c: No p

Re: [asterisk-users] SER + Asterisk

2008-10-20 Thread Andres
Alex Balashov wrote:

>No, the issue isn't my value or preference.  The issue is that SER is no 
>longer maintained or developed and has not been for several years.
>
>  
>
The above statement is totally false.  SER is indeed an ongoing project 
which is actively maintained.  If you subscribed to the SERDEV mailing 
list you would know that.  The latest update is just from last week:

ser-2.0.1+cvs20081014_src.tar.gz   14-Oct-2008 06:26 2.5M

Andres.

___
-- 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] come back ring

2008-10-20 Thread jordan pan
Hi everyone,


  I have encountered  a hard  problem that when i connect my anology phone
to channelbank ,I found that i dial a number and create the call,then ,I
hangup the call,but ,very quickly,I listen the ringing im my phone,I pick it
up ,and found it noting, anybody can tell me this reasons,and how to solve
it,Thanks!
-- 
Best regards!
jordan pan
Location:Shenzhen China
Company:www.justcall.cn
___
-- 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] prepaid approach

2008-10-20 Thread Rafael Cedeño
Hi,
some comments to your prepaid approach...

If you have the oportunity to avoid share the same balance between more than
two users, please do it.
It is better to assign one record to each user, and store in it, his/her
balance.
Don't complicate a simple solution.

Another comments:

1.- The determination of the max time to call it will involve the
DNIS(destination number) based of the rate matrix, the time when the call is
intended to be place (´cause you can establish different rate in function of
the hour, then you can offer special discount depending of the hour) and of
course the balance of the customer.

It is important to remember that in prepaid solutions exist two moments when
you need to calculate, first: max time to call, in this case is importan to
round the result, it is necessary to avoid negative balance in the Second:
moment, when you calculate the how much money you should discount to the
customer balance, it is function of the duration of the finished call.

2.- Why do you need to share the balance between multiple users? Why don't
assign different balance for each user?
If you have a way to identify every user (using a PIN) you could implement a
most simple and efficient prepaid solution.
If you don't want to use a PIN, try to identify the ANI(originator number)
to get access to the table of users when the balance is stored.

3. Today, exists some prepaid platform that implements the concept of Master
Account, where the balance is assigned to this account, and aditionally you
can create another sub-account relationed to one Master account, and you can
assign different balance for each sub-account without exceed the balance of
the Master, it means that the master balance is shared between the
sub-account. Every master account it would be assigned to one user, and the
existing sub-account it would be assigned to another user.
But it is necessary to identify every user at the moment when they try to
place a call.

4.- It is important to keep in mind that when you get access to the record
associated with a user, and you can get access to his/her balance, you need
to block the access to this record while you are accessing it. It is to
avoid the simultaneous access to the record that you are using to calculate
max time to call, and avoid to place a new call that generate at last,
negative balance (lost of money).

good luck &
best regards,

Rafance.

2008/10/20 Nhadie <[EMAIL PROTECTED]>

> hi,
>
> for my multi-tenant pbx, i would like to approach prepaid like this:
>
> when a customer dials number, i have an AGI that will determine what
> country was dialed and retrieve the rate from the rate table,
>
> once the rate is retrieved, i will get the remaining balance of that
> customer nd compute how much time remaining based on the rte and the
> remaining balance. then i set that as an absolute timeout. after the
> call i update the balance depending on how much was used during the call.
>
> my prob is, there are multiple user behind one customer, so when 1 user
> calls  i get the rate,get remaining balance, compute time remaining then
> while user 1 is engaged another user calls, since user 1 is not yet
> finish with the call the remaining balance is still the same for user 2
> even though user 1 has already used up some of the balance. is there
> anyway around this?
>
> regards,
> ron
>
> ___
> -- 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
>
___
-- 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] SER + Asterisk

2008-10-20 Thread Alex Balashov
No, the issue isn't my value or preference.  The issue is that SER is no 
longer maintained or developed and has not been for several years.

Tobias Wolf wrote:

> Alex Balashov schrieb:
>> SER is defunct.  Kamailio / OpenSIPS (formerly OpenSER) is the thing to do.
>>   
> Well, i am not getting the correct meaning of 'defunct', but from the 
> last part of your suggestion i guess you value Kamailio/OpenSIPS more 
> than SER.
> 
> Are there some hard reasion for this.
> 
> I am in the process of deciding which SIP server i want to use with 
> Asterisk and just made a go at SER. Compilation was a little rough but 
> it was manageable. I threw away every module which funtionality i didn't 
> wanted at after it just worked.
> 
> I was able to register SIP phones at the server and configure an 
> outgoing rule so that every call that could not be handled by the SIP 
> server would go to Asterisk.
> 
> But i confess, that i didn't looked at the other two projects ... Maybe 
> they are so much better.
> 
> Can you please write one or two aspects that makes me understand better 
> why this two projects are the better choice ?
> 
> Thank you very much ...
> 
> Tobias
>> On Fri, October 17, 2008 9:36 pm, Joseph wrote:
>>
>>   
>>> I am running Asterisk and would like to add SER to register my (sip) DID
>>> and connect it to asterisk;
>>> but I'm not sure if this is the correct forum.
>>>
>>> I have as DID, sip account with one VoIP provider; currently I"m using
>>> just stand alone SIP phone and register with the VoIP provider via:
>>> stun.fwdnet.net
>>>
>>> Is it possible to use SER to register with the provider and forward the
>>> call Asterisk.
>>> Can anybody provide a link to practical example.
>>>
>>> I'm comfortable with Asterisk but I just install SER and can not find
>>> appropriate example to follow on "www.iptel.org" web-page.
>>> There are a lot explanations but not enough practical examples to follow.
>>>
>>> --
>>> #Joseph
>>>
>>> ___
>>> -- 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
>>>
>>> 
>>
>>   
> 
> 
> ___
> -- 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


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- 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] SER + Asterisk

2008-10-20 Thread Tobias Wolf
Alex Balashov schrieb:
> SER is defunct.  Kamailio / OpenSIPS (formerly OpenSER) is the thing to do.
>   
Well, i am not getting the correct meaning of 'defunct', but from the 
last part of your suggestion i guess you value Kamailio/OpenSIPS more 
than SER.

Are there some hard reasion for this.

I am in the process of deciding which SIP server i want to use with 
Asterisk and just made a go at SER. Compilation was a little rough but 
it was manageable. I threw away every module which funtionality i didn't 
wanted at after it just worked.

I was able to register SIP phones at the server and configure an 
outgoing rule so that every call that could not be handled by the SIP 
server would go to Asterisk.

But i confess, that i didn't looked at the other two projects ... Maybe 
they are so much better.

Can you please write one or two aspects that makes me understand better 
why this two projects are the better choice ?

Thank you very much ...

Tobias
> On Fri, October 17, 2008 9:36 pm, Joseph wrote:
>
>   
>> I am running Asterisk and would like to add SER to register my (sip) DID
>> and connect it to asterisk;
>> but I'm not sure if this is the correct forum.
>>
>> I have as DID, sip account with one VoIP provider; currently I"m using
>> just stand alone SIP phone and register with the VoIP provider via:
>> stun.fwdnet.net
>>
>> Is it possible to use SER to register with the provider and forward the
>> call Asterisk.
>> Can anybody provide a link to practical example.
>>
>> I'm comfortable with Asterisk but I just install SER and can not find
>> appropriate example to follow on "www.iptel.org" web-page.
>> There are a lot explanations but not enough practical examples to follow.
>>
>> --
>> #Joseph
>>
>> ___
>> -- 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
>>
>> 
>
>
>   


___
-- 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] prepaid approach

2008-10-20 Thread Nhadie
hi,

for my multi-tenant pbx, i would like to approach prepaid like this:

when a customer dials number, i have an AGI that will determine what 
country was dialed and retrieve the rate from the rate table,

once the rate is retrieved, i will get the remaining balance of that 
customer nd compute how much time remaining based on the rte and the 
remaining balance. then i set that as an absolute timeout. after the 
call i update the balance depending on how much was used during the call.

my prob is, there are multiple user behind one customer, so when 1 user 
calls  i get the rate,get remaining balance, compute time remaining then 
while user 1 is engaged another user calls, since user 1 is not yet 
finish with the call the remaining balance is still the same for user 2 
even though user 1 has already used up some of the balance. is there 
anyway around this?

regards,
ron

___
-- 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] a little regex help needed

2008-10-20 Thread sean darcy
On Mon, Oct 20, 2008 at 7:38 PM, sean darcy <[EMAIL PROTECTED]> wrote:
> Atis Lezdins wrote:
>> On Mon, Oct 20, 2008 at 9:20 PM, Jared Smith <[EMAIL PROTECTED]> wrote:
>>> On Mon, 2008-10-20 at 14:10 -0400, sean darcy wrote:
 exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} =
 0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})
>>> [snip]
>>>
 What I'd expect is a callerid(num) of 2124571123 to generate an if test
 of  [02124571123 == 021245711*] or TRUE.
>>
>> This is not the correct way to use regular expressions. Regular
>> expression is matched to data withing REGEX function, and it just
>> returns match/don't match.
>>
>> Here's description
>>
>> REGEX("" )
>>
>> [Synopsis]
>> Regular Expression
>>
>> [Description]
>> Returns 1 if data matches regular expression, or 0 otherwise.
>> Please note that the space following the double quotes separating the
>> regex from the data
>> is optional and if present, is skipped. If a space is desired at the
>> beginning of the data,
>> then put two spaces there; the second will not be skipped.
>>
>> So, it would be something like:
>>
>> ${REGEX("21245711.*" ${CALLERID(num)})}
>>
 But I've messed up the regex statement somehow.
>>> In regular expressions, the * means zero or more of the preceding
>>> character, so the way you have that written means "021245711 and zero or
>>> more 1s".  What you want instead is "021245711.*", which means
>>> "021245711 followed by at least on other character".
>>>
>> correction - 021245711.* would match also "021245711" as * allows zero
>> or more and dot means any character.
>>
>>> Hopefully that sets you on the right path.  Don't forget that Asterisk
>>> has two regex operators that can be used in expressions as well...
>>> they're the ':' and '~' operators.
>>
>> I wonder what are those used for? Never heard of that.
>>
>> Are you really sure you need regular expressions there? Asterisk has
>> it's own number pattern matching, as it's much easier to read, and
>> would allow easy adding/removing some specific masks. Here's one
>> sample:
>>
>> [main]
>> ..
>> exten => s,n,GoSub(callerid-update,${CALLERID(num)},1)
>> ..
>>
>>
>> [callerid-update]
>> exten => 021245711XX,1,Set(CALLERID(name)=Office: ${CALLERID(num)});
>> exten => 021245711XX,2,Return();
>> exten => _X.,1,Return();
>> exten => i,1,Return(); // just for safety :)
>>
>
> Exactly where I was trying to go. I was thinking a little differently
> though:
>
> [any-incoming-context]
> exten => s,1,Answer()
> exten => s,2,Gosub(set-callerid-name,1,1)
> exten => s,3,Dial(..
>
>
> [set-callerid-name]
> exten=>1,1,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = ...
> exten=>1,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = ...
> .
> .
> exten => 1,n,Return()
>
>
> which seemed easier ( and easier to read) since I didn't have to insert
> Return()'s every other line.
>


But, as I think about it ( instead of just hitting Send),can yours
does work without the returns?

exten => s,2,Gosub(set-callerid-name,${CALLERID(num),1)

[set-callerid-name]
exten=>21245711XX ,1,Set(CALLERID(name)="Office"
exten=>,1,Set(CALLERID(name)=...
 .
.
exten => ,2,Return()

___
-- 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] a little regex help needed

2008-10-20 Thread Steve Murphy
On Mon, 2008-10-20 at 16:17 -0700, Edwin Lam wrote:
> sean darcy wrote:
> 
> > OK. So I changed the * to .. , like so:
> > 
> > exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
> > 0${REGEX("21245711..")} ] ? "Office":${CALLERID(name)} )})
> > 
> > which I would expect to mean 021245711 followed by two other characters.
> > 
> > It still matches a blank callerid(num).
> 
> try:
> 
> exten =>s,n,Set(CALLERID(name)=${IF($[ ${REGEX("021245711.." 
> 0${CALLERID(num)})} = 1] ? "Office":${CALLERID(name)})})
> 
> 

and just to round out the discussion, you could also:

(using the =~ and ? :: notation in $[] expressions...)

exten => s,n,Set(CALLERID(name)=$[ 0${CALLERID(num)} =~ 021245711.. ?
"Office" :: ${CALLERID(name)}])

I haven't tried to debug it, but it hopefully will do the job. See
doc/tex/channelvariables or just doc/channelvariables (iirc), depending
on the version of Asterisk...

using the =~ and ? :: notation in $[] expressions...

murf

-- 
Steve Murphy
Software Developer
Digium


smime.p7s
Description: S/MIME cryptographic signature
___
-- 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] TDM410P with EC doesn't detect DTMF after being on for ~1 hour

2008-10-20 Thread Kurt Knudsen
Now that I have a new card and my echo problems are 'mostly' solved, I
have another major issue to deal with. After about an hour or so the
card will stop detecting DTMF tones on incoming calls. dahdi_monitor
shows the following:

[EMAIL PROTECTED] wctdm24xxp]# dahdi_monitor 1 -v

Visual Audio Levels.

 Use chan_dahdi.conf file to adjust the gains if needed.

( # = Audio Level  * = Max Audio Hit )
<(RX <(TX
 ###*

The channel is spiked and I need to stop asterisk and restart dahdi.
Here's what the full log shows when it sees an incoming call:
[Oct 20 18:49:38] VERBOSE[10629] logger.c: -- Starting simple
switch on 'DAHDI/1-1'
[Oct 20 18:49:39] NOTICE[10629] chan_dahdi.c: Got event 17 (Polarity
Reversal)...
[Oct 20 18:49:42] NOTICE[10629] chan_dahdi.c: Got event 18 (Ring Begin)...
[Oct 20 18:49:44] NOTICE[10629] chan_dahdi.c: Got event 2 (Ring/Answered)...
[Oct 20 18:49:44] VERBOSE[10629] logger.c: -- Executing
[EMAIL PROTECTED]:1] ExecIf("DAHDI/1-1", "1|SetCallerPres|unavailable")
in new stack
[Oct 20 18:49:44] VERBOSE[10629] logger.c: -- Executing
[EMAIL PROTECTED]:2] ExecIf("DAHDI/1-1", "1|Set|CALLERID(all)=unknown
<000>") in new stack

The 3 events are always there when DTMF is ignored/not detected.
Here's what the log shows with a correct call:
[Oct 20 18:37:16] DEBUG[10563] dsp.c: dsp busy pattern set to 500,500
[Oct 20 18:37:16] VERBOSE[10611] logger.c: -- Starting simple
switch on 'DAHDI/1-1'
[Oct 20 18:37:17] VERBOSE[10611] logger.c: -- Executing
[EMAIL PROTECTED]:1] ExecIf("DAHDI/1-1", "0|SetCallerPres|unavailable")
in new stack
[Oct 20 18:37:17] VERBOSE[10611] logger.c: -- Executing
[EMAIL PROTECTED]:2] ExecIf("DAHDI/1-1", "0|Set|CALLERID(all)=unknown
<000>") in new stack
[Oct 20 18:37:17] VERBOSE[10611] logger.c: -- Executing
[EMAIL PROTECTED]:3] Goto("DAHDI/1-1", "voicemenu-custom-3|s|1") in new
stack
[Oct 20 18:37:17] VERBOSE[10611] logger.c: -- Goto (voicemenu-custom-3,s,1)
[Oct 20 18:37:17] VERBOSE[10611] logger.c: -- Executing
[EMAIL PROTECTED]:2] Wait("DAHDI/1-1", "2") in new stack
[Oct 20 18:37:17] DEBUG[10611] chan_dahdi.c: Ignore switch to REVERSED
Polarity on channel 1, state 4
[Oct 20 18:37:17] DEBUG[10611] chan_dahdi.c: Ignoring Polarity switch
to IDLE on channel 1, state 4
[Oct 20 18:37:17] DEBUG[10611] chan_dahdi.c: Polarity Reversal event
occured - DEBUG 2: channel 1, state 4, pol= 0, aonp= 0, honp= 0,
pdelay= 600, tv= 47$
[Oct 20 18:37:19] VERBOSE[10611] logger.c: -- Executing
[EMAIL PROTECTED]:3] Set("DAHDI/1-1", "TIMEOUT(digit)=2") in new
stack
[Oct 20 18:37:19] VERBOSE[10611] logger.c: -- Digit timeout set to 2

The events are ignored and the call goes through as it should. Also,
when the call FAILS, the caller ID does not work. Here's the last bit
of dmesg:

NO BATTERY on 1/1!
BATTERY on 1/1 (+)!
26939263 Polarity reversed (1 -> -1)
NO BATTERY on 1/1!
26940073 Polarity reversed (-1 -> 1)
BATTERY on 1/1 (+)!
RING on 1/1!
26984808 Polarity reversed (1 -> -1)
NO RING on 1/1!
26986380 Polarity reversed (-1 -> 1)
NO BATTERY on 1/1!
BATTERY on 1/1 (+)!

I have no idea what that means (module is running with debug=1). Any ideas?

___
-- 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] a little regex help needed

2008-10-20 Thread sean darcy
Atis Lezdins wrote:
> On Mon, Oct 20, 2008 at 9:20 PM, Jared Smith <[EMAIL PROTECTED]> wrote:
>> On Mon, 2008-10-20 at 14:10 -0400, sean darcy wrote:
>>> exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} =
>>> 0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})
>> [snip]
>>
>>> What I'd expect is a callerid(num) of 2124571123 to generate an if test
>>> of  [02124571123 == 021245711*] or TRUE.
> 
> This is not the correct way to use regular expressions. Regular
> expression is matched to data withing REGEX function, and it just
> returns match/don't match.
> 
> Here's description
> 
> REGEX("" )
> 
> [Synopsis]
> Regular Expression
> 
> [Description]
> Returns 1 if data matches regular expression, or 0 otherwise.
> Please note that the space following the double quotes separating the
> regex from the data
> is optional and if present, is skipped. If a space is desired at the
> beginning of the data,
> then put two spaces there; the second will not be skipped.
> 
> So, it would be something like:
> 
> ${REGEX("21245711.*" ${CALLERID(num)})}
> 
>>> But I've messed up the regex statement somehow.
>> In regular expressions, the * means zero or more of the preceding
>> character, so the way you have that written means "021245711 and zero or
>> more 1s".  What you want instead is "021245711.*", which means
>> "021245711 followed by at least on other character".
>>
> correction - 021245711.* would match also "021245711" as * allows zero
> or more and dot means any character.
> 
>> Hopefully that sets you on the right path.  Don't forget that Asterisk
>> has two regex operators that can be used in expressions as well...
>> they're the ':' and '~' operators.
> 
> I wonder what are those used for? Never heard of that.
> 
> Are you really sure you need regular expressions there? Asterisk has
> it's own number pattern matching, as it's much easier to read, and
> would allow easy adding/removing some specific masks. Here's one
> sample:
> 
> [main]
> ..
> exten => s,n,GoSub(callerid-update,${CALLERID(num)},1)
> ..
> 
> 
> [callerid-update]
> exten => 021245711XX,1,Set(CALLERID(name)=Office: ${CALLERID(num)});
> exten => 021245711XX,2,Return();
> exten => _X.,1,Return();
> exten => i,1,Return(); // just for safety :)
> 

Exactly where I was trying to go. I was thinking a little differently 
though:

[any-incoming-context]
exten => s,1,Answer()
exten => s,2,Gosub(set-callerid-name,1,1)
exten => s,3,Dial(..


[set-callerid-name]
exten=>1,1,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = ...
exten=>1,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = ...
.
.
exten => 1,n,Return()


which seemed easier ( and easier to read) since I didn't have to insert 
Return()'s every other line.

sean


___
-- 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] a little regex help needed

2008-10-20 Thread Edwin Lam
sean darcy wrote:

> OK. So I changed the * to .. , like so:
> 
> exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
> 0${REGEX("21245711..")} ] ? "Office":${CALLERID(name)} )})
> 
> which I would expect to mean 021245711 followed by two other characters.
> 
> It still matches a blank callerid(num).

try:

exten =>s,n,Set(CALLERID(name)=${IF($[ ${REGEX("021245711.." 
0${CALLERID(num)})} = 1] ? "Office":${CALLERID(name)})})


-- 
Edwin Lam <[EMAIL PROTECTED]>
Systems Engineer, Office General, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0xD6506D20


___
-- 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] a little regex help needed

2008-10-20 Thread sean darcy
Jared Smith wrote:
> On Mon, 2008-10-20 at 14:10 -0400, sean darcy wrote:
>> exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
>> 0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})
> 
> [snip]
> 
>> What I'd expect is a callerid(num) of 2124571123 to generate an if test 
>> of  [02124571123 == 021245711*] or TRUE.
>>
>> But I've messed up the regex statement somehow.
> 
> In regular expressions, the * means zero or more of the preceding
> character, so the way you have that written means "021245711 and zero or
> more 1s".  What you want instead is "021245711.*", which means
> "021245711 followed by at least on other character".
> 
> Hopefully that sets you on the right path.  Don't forget that Asterisk
> has two regex operators that can be used in expressions as well...
> they're the ':' and '~' operators.
> 
> 

OK. So I changed the * to .. , like so:

exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
0${REGEX("21245711..")} ] ? "Office":${CALLERID(name)} )})

which I would expect to mean 021245711 followed by two other characters.

It still matches a blank callerid(num).

sean


___
-- 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] QoS VoIP

2008-10-20 Thread sean darcy
Anael DIAZ wrote:
> Hi!
> I have some problem in my asterisk 1.4.2, I've installed it on centOS 5.2
> and this didn't accept voip QoS and can't route the packets having voip 
> QoS.
> So  I should change voip packets to be routing with centOS.
> I want to use iproute2 but i don't what to do after installing iproute2.
> Anyone could help me please?
> 
> 
> 
> 
> ___
> -- 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

This stuff is pure voodoo. I've found very little good specific instruction.

I put this into rc.local to set up QoS. I'm not sure I understood it 
then, and I'm sure I don't understand it now, but it may be useful to you.

I also put the various tos stuff in sip.conf, etc.

cat tos.local
## eth1 is the external interface
## remove the queues
EXTIF=eth1
tc qdisc del dev $EXTIF root

## This is to set up QoS for voip - specifically iax.
## from http://www.howtoforge.com/voip_qos_traffic_shaping_iproute2_asterisk
##  ethx is the *external* port

tc qdisc add dev $EXTIF root handle 1: prio priomap 2 2 2 2 2 2 2 2 1 1 
1 1 1 1 1 0
tc filter add dev $EXTIF protocol ip parent 1: prio 1 u32 match ip dport 
4569 0x flowid 1:1
tc filter add dev $EXTIF protocol ip parent 1: prio 1 u32 match ip sport 
4569 0x flowid 1:1
tc filter add dev $EXTIF protocol ip parent 1: prio 1 u32 match ip tos 
0x10   0xff  flowid 1:2

Please post anything you do find.

Good luck.

sean


___
-- 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] ISDN PRI Caller ID problem

2008-10-20 Thread Matthew Fredrickson
A.R. Nasir Qureshi wrote:
> Dear All,
> 
> I am trying to setup an ISDN line from local telco on a digium card. The 
> problem I am facing is that I am not getting any caller id from the 
> telco. They say that they have enabled caller id.

Tell them they are wrong.  There is no calling party number IE in that 
SETUP message below. :-)

Matthew Fredrickson
Digium, Inc.

> 
> Please help me out.
> 
> My zapata.conf
> 
> [trunkgroups]
> 
> [channels]
> context=pstnincoming
> pridialplan=local
> prilocaldialplan=local
> 
> usecallerid=yes
> cidsignalling=v23
> cidstart=ring
> hidecallerid=no
> callwaiting=no
> usecallingpres=yes
> sendcalleridafter=1
> echocancel=no
> echocancelwhenbridged=no
> rxgain=0.0
> txgain=0.0
> callgroup=1
> pickupgroup=1
> 
> immediate=no
> callerid=asreceived
> busydetect=no
> busycount=6
> callprogress=no
> faxdetect=incoming
> 
> 
> switchtype = national
> signalling = pri_cpe
> group = 1
> channel => 1-15,17-31
> channel => 32-46,48-62
> 
> 
> The information I get from using "pri intense debug span 1" is:
> 
> < [ 02 01 16 9c 08 02 15 01 05 04 03 80 90 a3 18 03 a1 83 81 70 08 c1 34 
> 33 39 32 38 34 32 a1 ]
> 
> < Informational frame:
> < SAPI: 00  C/R: 1 EA: 0
> <  TEI: 000EA: 1
> < N(S): 011   0: 0
> < N(R): 078   P: 0
> < 26 bytes of data
> Handling message for SAPI/TEI=0/0
> -- ACKing all packets from 77 to (but not including) 78
> -- Since there was nothing left, stopping T200 counter
> -- Stopping T203 counter since we got an ACK
> -- Nothing left, starting T203 counter
> < Protocol Discriminator: Q.931 (8)  len=26
> < Call Ref: len= 2 (reference 5377/0x1501) (Originator)
> < Message type: SETUP (5)
> < [04 03 80 90 a3]
> < Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
> capability: Speech (0)
> <  Ext: 1  Trans mode/rate: 64kbps, 
> circuit-mode (16)
>  < [18 03 a1 83 81]
> < Channel ID (len= 5) [ Ext: 1  IntID: Implicit  PRI  Spare: 0  
> Preferred  Dchan: 0
>  <   Ext: 1  Coding: 0  Number Specified  Channel Type: 3
> <   Ext: 1  Channel: 1 ]
> < [70 08 c1 34 33 39 32 38 34 32]
> < Called Number (len=10) [ Ext: 1  TON: Subscriber Number (4)  NPI: 
> ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '4392842' ]
> < [a1]
> < Sending Complete (len= 1)
> -- Making new call for cr 5377
> -- Processing Q.931 Call Setup
> -- Processing IE 4 (cs0, Bearer Capability)
> -- Processing IE 24 (cs0, Channel Identification)
> -- Processing IE 112 (cs0, Called Party Number)
> -- Processing IE 161 (cs0, Sending Complete)
> q931.c:3509 q931_receive: call 5377 on channel 1 enters state 6 (Call 
> Present)
> Sending Receiver Ready (12)
> 
> 
> 


___
-- 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] a little regex help needed

2008-10-20 Thread Atis Lezdins
On Mon, Oct 20, 2008 at 9:20 PM, Jared Smith <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-10-20 at 14:10 -0400, sean darcy wrote:
>> exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} =
>> 0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})
>
> [snip]
>
>> What I'd expect is a callerid(num) of 2124571123 to generate an if test
>> of  [02124571123 == 021245711*] or TRUE.

This is not the correct way to use regular expressions. Regular
expression is matched to data withing REGEX function, and it just
returns match/don't match.

Here's description

REGEX("" )

[Synopsis]
Regular Expression

[Description]
Returns 1 if data matches regular expression, or 0 otherwise.
Please note that the space following the double quotes separating the
regex from the data
is optional and if present, is skipped. If a space is desired at the
beginning of the data,
then put two spaces there; the second will not be skipped.

So, it would be something like:

${REGEX("21245711.*" ${CALLERID(num)})}

>>
>> But I've messed up the regex statement somehow.
>
> In regular expressions, the * means zero or more of the preceding
> character, so the way you have that written means "021245711 and zero or
> more 1s".  What you want instead is "021245711.*", which means
> "021245711 followed by at least on other character".
>
correction - 021245711.* would match also "021245711" as * allows zero
or more and dot means any character.

> Hopefully that sets you on the right path.  Don't forget that Asterisk
> has two regex operators that can be used in expressions as well...
> they're the ':' and '~' operators.

I wonder what are those used for? Never heard of that.

Are you really sure you need regular expressions there? Asterisk has
it's own number pattern matching, as it's much easier to read, and
would allow easy adding/removing some specific masks. Here's one
sample:

[main]
..
exten => s,n,GoSub(callerid-update,${CALLERID(num)},1)
..


[callerid-update]
exten => 021245711XX,1,Set(CALLERID(name)=Office: ${CALLERID(num)});
exten => 021245711XX,2,Return();
exten => _X.,1,Return();
exten => i,1,Return(); // just for safety :)

Of course there's also direct callerid matching, so you can match
dialed extension and callerid in same rule, but this looks simpler to
me in this case :)

For more info see
http://www.voip-info.org/wiki/view/Asterisk+config+extensions.conf and
search for "ex-girlfriend" :)

Regards,
Atis

-- 
Atis Lezdins,
VoIP Project Manager / Developer,
[EMAIL PROTECTED]
Skype: atis.lezdins
Cell Phone: +371 28806004
Cell Phone: +1 800 7300689
Work phone: +1 800 7502835

___
-- 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] SERVICE CODES

2008-10-20 Thread Robert Boardman
Hi
I'm trying to get the status of an extension that has DND set using the
service code, or trying to disable the service codes altogether so that
I can do them in the dialplan if needed

any advice wout be appriciated

Thanks
Robb


___
-- 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] How Secure Is Asterisk

2008-10-20 Thread broadband Voice
lol

On Mon, Oct 20, 2008 at 3:34 PM, Sam Tam <[EMAIL PROTECTED]> wrote:

> VPN IP phone?
> Then firewall up the asterisk to disable any outside access and place the
> vpn server with the asterisk in a locked cabinet .
>
> Sure that will stop someone trying to physically listen to their call.
> Or they can always use the good old landline or mobile phone and let the
> government listen to them too/
> Sam
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Steve Anness
> Sent: Tuesday, October 21, 2008 3:02 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: [asterisk-users] How Secure Is Asterisk
>
> I am sure this has been discussed prior, however, I am sitting here and
> being asked this very question by my superiors.  They are loving what I
> have
> done with our two Asterisk servers here; however, they keep asking me if it
> is secure or not.  Of course, as with anything, I suspect that on a secure
> network they can be reasonably safe.  However, realistically if I am using
> the asterisk server to make internal calls and discussion very private
> matters, how possible is it for someone to listen to calls?  How good is
> the
> encryption if any over an IAX trunk?
>
> Steve Anness
>
>
>  ___
> -- 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
>
___
-- 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] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Kurt Knudsen
Well, when it fails over to the Dahdi trunk, it doesn't dial properly,
so I think I broke the macro. I will add the Set(GROUP()) stuff inside
of that macro-trunkdial-0.3 context and see if that helps. But it's
weird that I can't dial out. Here's a bit of the full log:

DEBUG[8221] app_macro.c: Executed application: Dial
VERBOSE[8221] logger.c: -- Executing
[EMAIL PROTECTED]:2] GotoIf("SIP/207-0a1b3590", "20
> 0 1-CONGESTION|1:1-out|1") in new stack
VERBOSE[8221] logger.c: -- Goto
(macro-trunkdial-failover-0.3,1-CONGESTION,1)
DEBUG[8221] app_macro.c: Executed application: Gotoif
VERBOSE[8221] logger.c: -- Executing
[EMAIL PROTECTED]:1] Dial("SIP/207-0a1b3590",
"Dahdi/g1/18005551212") in new stack
DEBUG[8221] dsp.c: dsp busy pattern set to 500,500
DEBUG[8221] chan_dahdi.c: Dialing '18005551212'
DEBUG[8221] chan_dahdi.c: Deferring dialing...
VERBOSE[8221] logger.c: -- Called g1/18005551212
DEBUG[8221] chan_dahdi.c: Sent deferred digit string: T18005551212w
DEBUG[8221] chan_dahdi.c: Done dialing, but waiting for progress
detection before doing more...
VERBOSE[8221] logger.c: -- Hungup 'DAHDI/1-1'

Not sure how it broke, but it won't use the Dahdi channel :( It just
goes to a busy signal after you dial. I tested on an analog phone and
it can dial out normally, so it's the system.

Thanks.

On Mon, Oct 20, 2008 at 2:29 PM, Jeremy Mann <[EMAIL PROTECTED]> wrote:
> I have a macro to dial out, similar to yours in that it fails over to 
> Zap/Dahdi trunks in the event our bandwidth stuff is overloaded.
>
> I run this in a macro, and only set and check groups within that macro.  I'm 
> confused why yours would attach to "phones" in any way, unless you mean phone 
> to phone calls, in that case don't set the group?
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
> Sent: Monday, October 20, 2008 1:17 PM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
> one-way audio
>
> The GotoIf works, because it does failover sometimes, just not all the
> time, I followed instructions from here:
>
> http://www.voip-info.org/wiki-Asterisk+cmd+GotoIf
>
> And it seems to work in other areas that I use it in a similar way. I
> only have the Set(GROUP()) when we are making outgoing calls on the
> SIP trunk or when there's an incoming call on the SIP trunk. Anything
> on Dahdi doesn't get included. I don't know how to tell my phones and
> channels apart, I'm not trying to add the phones to the group, just
> the channels. Can you paste some of your extensions.conf since you
> also use Bandwidth.com?
>
> Thanks.
>
> On Mon, Oct 20, 2008 at 8:30 PM,  <[EMAIL PROTECTED]> wrote:
>> -- Kurt Knudsen wrote :
>> Hello,
>>
>>
>>
>> We have 2 SIP trunks from Bandwidth.com and if both are in use and someone
>> tries to dial out, they cause another call to get one-way audio (the caller
>> hears us, we cannot hear them). This happens 100% of the time and
>> Bandwidth.com doesn't offer any support. I don't see any setting that tells
>> Asterisk that there are 2 channels available from Bandwidth.com's IP. I'm
>> currently using, or attempting to use, groups to solve this problem, but
>> sometimes it works, sometimes it doesn't. It breaks when a call goes out on
>> a Queue, because it seems to add each phone to the group, which breaks my
>> GotoIf() statement. Here's some relevant information:
>>
>>
>>
>> Users.conf (added by Asterisk-GUI)
>>
>> [trunk_2]
>>
>> provider = Bandwidth (SIP)  ; GUI metadata
>>
>> context = DID_trunk_2
>>
>> hasexten = no
>>
>> hasiax = no
>>
>> hassip = yes
>>
>> host = 216.82.224.202
>>
>> registeriax = no
>>
>> registersip = no
>>
>> usecallerid = yes
>>
>> nat = no ;Testing
>>
>> trunkname = Bandwidth.com (Sip)  ; GUI metadata
>>
>> username =
>>
>> secret =
>>
>> disallow = all
>>
>> allow = ulaw,alaw,g726
>>
>>
>>
>> sip.conf
>>
>> [general]
>>
>> context = frombandwidth
>>
>> ;other variables, etc.
>>
>>
>>
>> ;Added according to Bandwidth.com's wiki entry. Changed to inband because we
>> were having DTMF issues.
>>
>> [bandwidth.com_inbound]
>>
>> host=216.82.224.202
>>
>> port=5060
>>
>> type=peer
>>
>> disallow=all
>>
>> allow=ulaw
>>
>> dtmfmode=inband
>>
>> canreinvite=no
>>
>> reinvite=no
>>
>> context=frombandwidth
>>
>> nat=no
>>
>>
>>
>> [bandwidth.com_outbound]
>>
>> host=216.82.224.202
>>
>> port=5060
>>
>> type=peer
>>
>> disallow=all
>>
>> allow=ulaw
>>
>> dtmfmode=rfc2833
>>
>> nat=no
>>
>> fromuser=11234567890
>>
>>
>>
>> extensions.conf
>>
>> [globals]
>>
>> ;...irrelevant stuff
>>
>> trunk_1 = Dahdi/g1
>>
>> trunk_2 = SIP/trunk_2
>>
>> OUT_2 = SIP/bandwidth.com_outbound
>>
>>
>>
>> ;Took out the Set(GROUP()) because I moved it elsewhere to try and fix it
>> added all the phones when Asterisk calls agents on a Queue.
>>
>> [frombandwidth]
>>
>> ;exten = _+1.,1,Set(GROUP()=SIPGROUP)
>>
>> exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(

Re: [asterisk-users] How Secure Is Asterisk

2008-10-20 Thread Alex Balashov

You can tell your superiors with great confidence that 99% of the issues
that fall under this conceptual umbrella have to do with the security of
your network, not of Asterisk the application, as is true of most other
security issues of concern to them.

With regard to call tapping, that is most certainly true.

On Mon, October 20, 2008 3:01 pm, Steve Anness wrote:
> I am sure this has been discussed prior, however, I am sitting here and
> being asked this very question by my superiors.  They are loving what I
> have
> done with our two Asterisk servers here; however, they keep asking me if
> it
> is secure or not.  Of course, as with anything, I suspect that on a secure
> network they can be reasonably safe.  However, realistically if I am using
> the asterisk server to make internal calls and discussion very private
> matters, how possible is it for someone to listen to calls?  How good is
> the
> encryption if any over an IAX trunk?
>
> Steve Anness
> ___
> -- 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


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599


___
-- 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] How Secure Is Asterisk

2008-10-20 Thread Sam Tam
VPN IP phone?
Then firewall up the asterisk to disable any outside access and place the
vpn server with the asterisk in a locked cabinet .

Sure that will stop someone trying to physically listen to their call.
Or they can always use the good old landline or mobile phone and let the
government listen to them too/
Sam 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Steve Anness
Sent: Tuesday, October 21, 2008 3:02 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] How Secure Is Asterisk

I am sure this has been discussed prior, however, I am sitting here and
being asked this very question by my superiors.  They are loving what I have
done with our two Asterisk servers here; however, they keep asking me if it
is secure or not.  Of course, as with anything, I suspect that on a secure
network they can be reasonably safe.  However, realistically if I am using
the asterisk server to make internal calls and discussion very private
matters, how possible is it for someone to listen to calls?  How good is the
encryption if any over an IAX trunk? 

Steve Anness 


___
-- 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] How Secure Is Asterisk

2008-10-20 Thread Steve Anness
I am sure this has been discussed prior, however, I am sitting here and
being asked this very question by my superiors.  They are loving what I have
done with our two Asterisk servers here; however, they keep asking me if it
is secure or not.  Of course, as with anything, I suspect that on a secure
network they can be reasonably safe.  However, realistically if I am using
the asterisk server to make internal calls and discussion very private
matters, how possible is it for someone to listen to calls?  How good is the
encryption if any over an IAX trunk?

Steve Anness
___
-- 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] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Jeremy Mann
I have a macro to dial out, similar to yours in that it fails over to Zap/Dahdi 
trunks in the event our bandwidth stuff is overloaded.

I run this in a macro, and only set and check groups within that macro.  I'm 
confused why yours would attach to "phones" in any way, unless you mean phone 
to phone calls, in that case don't set the group?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
Sent: Monday, October 20, 2008 1:17 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
one-way audio

The GotoIf works, because it does failover sometimes, just not all the
time, I followed instructions from here:

http://www.voip-info.org/wiki-Asterisk+cmd+GotoIf

And it seems to work in other areas that I use it in a similar way. I
only have the Set(GROUP()) when we are making outgoing calls on the
SIP trunk or when there's an incoming call on the SIP trunk. Anything
on Dahdi doesn't get included. I don't know how to tell my phones and
channels apart, I'm not trying to add the phones to the group, just
the channels. Can you paste some of your extensions.conf since you
also use Bandwidth.com?

Thanks.

On Mon, Oct 20, 2008 at 8:30 PM,  <[EMAIL PROTECTED]> wrote:
> -- Kurt Knudsen wrote :
> Hello,
>
>
>
> We have 2 SIP trunks from Bandwidth.com and if both are in use and someone
> tries to dial out, they cause another call to get one-way audio (the caller
> hears us, we cannot hear them). This happens 100% of the time and
> Bandwidth.com doesn't offer any support. I don't see any setting that tells
> Asterisk that there are 2 channels available from Bandwidth.com's IP. I'm
> currently using, or attempting to use, groups to solve this problem, but
> sometimes it works, sometimes it doesn't. It breaks when a call goes out on
> a Queue, because it seems to add each phone to the group, which breaks my
> GotoIf() statement. Here's some relevant information:
>
>
>
> Users.conf (added by Asterisk-GUI)
>
> [trunk_2]
>
> provider = Bandwidth (SIP)  ; GUI metadata
>
> context = DID_trunk_2
>
> hasexten = no
>
> hasiax = no
>
> hassip = yes
>
> host = 216.82.224.202
>
> registeriax = no
>
> registersip = no
>
> usecallerid = yes
>
> nat = no ;Testing
>
> trunkname = Bandwidth.com (Sip)  ; GUI metadata
>
> username =
>
> secret =
>
> disallow = all
>
> allow = ulaw,alaw,g726
>
>
>
> sip.conf
>
> [general]
>
> context = frombandwidth
>
> ;other variables, etc.
>
>
>
> ;Added according to Bandwidth.com's wiki entry. Changed to inband because we
> were having DTMF issues.
>
> [bandwidth.com_inbound]
>
> host=216.82.224.202
>
> port=5060
>
> type=peer
>
> disallow=all
>
> allow=ulaw
>
> dtmfmode=inband
>
> canreinvite=no
>
> reinvite=no
>
> context=frombandwidth
>
> nat=no
>
>
>
> [bandwidth.com_outbound]
>
> host=216.82.224.202
>
> port=5060
>
> type=peer
>
> disallow=all
>
> allow=ulaw
>
> dtmfmode=rfc2833
>
> nat=no
>
> fromuser=11234567890
>
>
>
> extensions.conf
>
> [globals]
>
> ;...irrelevant stuff
>
> trunk_1 = Dahdi/g1
>
> trunk_2 = SIP/trunk_2
>
> OUT_2 = SIP/bandwidth.com_outbound
>
>
>
> ;Took out the Set(GROUP()) because I moved it elsewhere to try and fix it
> added all the phones when Asterisk calls agents on a Queue.
>
> [frombandwidth]
>
> ;exten = _+1.,1,Set(GROUP()=SIPGROUP)
>
> exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(SIPGROUP)})
>
> exten = _+1.,n,Set(DID=${EXTEN:2})
>
> exten = _+1.,n,Set(CALLERID(num)=${CALLERID(num):2})
>
> exten = _+1.,n,Goto(DID_trunk_2,${DID},1)
>
>
>
> ;What we use to dialout. Try SIP trunks first, then Dahdi trunk as backup.
>
> ;This is where it breaks. I tried to make it so there can't be more than 2
> calls on SIP channels at once.
>
> ;Since it counts the phone as a channel, and adds it to the group, I had to
> use 4.
>
> [internalphones]
>
> exten = _1NXXNXX,1,Set(GROUP()=SIPGROUP)
>
> exten = _1NXXNXX,n,GotoIf($[${GROUP_COUNT(SIPGROUP)} >= 4]?100)  ;If the
> group has 2 or more calls, do not dial.
>
> exten = _1NXXNXX,n,NoOp(1NCount = ${GROUP_COUNT(SIPGROUP)})
>
> exten =
> _1NXXNXX,n,Macro(trunkdial-failover-0.3,${trunk_2}/+${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_1,trunk_2)
>
> exten = _1NXXNXX,100,Playback(all-circuits-busy-now)
>
> exten = _1NXXNXX,101,congestion()
>
> exten = _1NXXNXX,102,busy()
>
>
>
> ;This is where incoming calls go to if I'm awake.
>
> [DID_trunk_2_timeinterval_Awake]
>
> exten = _NXXNXX,1,Set(GROUP()=SIPGROUP)
>
> exten = _NXXNXX,n,NoOp(Open Count=${GROUP_COUNT(SIPGROUP)})
>
> exten = _NXXNXX,n,Set(CALLERID(num)=1${CALLERID(num)})
>
> exten = _NXXNXX,n,Goto(voicemenu-custom-1|s|1)
>
>
>
> Thanks.
>
> --
> This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
> http://www.opensubscriber.com/message/asterisk-users@lists.digium.com/10416933.html
>

___
-- Bandwidth and Colocation Provided by http://www.api-digi

Re: [asterisk-users] a little regex help needed

2008-10-20 Thread Jared Smith
On Mon, 2008-10-20 at 14:10 -0400, sean darcy wrote:
> exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
> 0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})

[snip]

> What I'd expect is a callerid(num) of 2124571123 to generate an if test 
> of  [02124571123 == 021245711*] or TRUE.
> 
> But I've messed up the regex statement somehow.

In regular expressions, the * means zero or more of the preceding
character, so the way you have that written means "021245711 and zero or
more 1s".  What you want instead is "021245711.*", which means
"021245711 followed by at least on other character".

Hopefully that sets you on the right path.  Don't forget that Asterisk
has two regex operators that can be used in expressions as well...
they're the ':' and '~' operators.


-- 
Jared Smith
Training Manager
Digium, Inc.


___
-- 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] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Kurt Knudsen
The GotoIf works, because it does failover sometimes, just not all the
time, I followed instructions from here:

http://www.voip-info.org/wiki-Asterisk+cmd+GotoIf

And it seems to work in other areas that I use it in a similar way. I
only have the Set(GROUP()) when we are making outgoing calls on the
SIP trunk or when there's an incoming call on the SIP trunk. Anything
on Dahdi doesn't get included. I don't know how to tell my phones and
channels apart, I'm not trying to add the phones to the group, just
the channels. Can you paste some of your extensions.conf since you
also use Bandwidth.com?

Thanks.

On Mon, Oct 20, 2008 at 8:30 PM,  <[EMAIL PROTECTED]> wrote:
> -- Kurt Knudsen wrote :
> Hello,
>
>
>
> We have 2 SIP trunks from Bandwidth.com and if both are in use and someone
> tries to dial out, they cause another call to get one-way audio (the caller
> hears us, we cannot hear them). This happens 100% of the time and
> Bandwidth.com doesn't offer any support. I don't see any setting that tells
> Asterisk that there are 2 channels available from Bandwidth.com's IP. I'm
> currently using, or attempting to use, groups to solve this problem, but
> sometimes it works, sometimes it doesn't. It breaks when a call goes out on
> a Queue, because it seems to add each phone to the group, which breaks my
> GotoIf() statement. Here's some relevant information:
>
>
>
> Users.conf (added by Asterisk-GUI)
>
> [trunk_2]
>
> provider = Bandwidth (SIP)  ; GUI metadata
>
> context = DID_trunk_2
>
> hasexten = no
>
> hasiax = no
>
> hassip = yes
>
> host = 216.82.224.202
>
> registeriax = no
>
> registersip = no
>
> usecallerid = yes
>
> nat = no ;Testing
>
> trunkname = Bandwidth.com (Sip)  ; GUI metadata
>
> username =
>
> secret =
>
> disallow = all
>
> allow = ulaw,alaw,g726
>
>
>
> sip.conf
>
> [general]
>
> context = frombandwidth
>
> ;other variables, etc.
>
>
>
> ;Added according to Bandwidth.com's wiki entry. Changed to inband because we
> were having DTMF issues.
>
> [bandwidth.com_inbound]
>
> host=216.82.224.202
>
> port=5060
>
> type=peer
>
> disallow=all
>
> allow=ulaw
>
> dtmfmode=inband
>
> canreinvite=no
>
> reinvite=no
>
> context=frombandwidth
>
> nat=no
>
>
>
> [bandwidth.com_outbound]
>
> host=216.82.224.202
>
> port=5060
>
> type=peer
>
> disallow=all
>
> allow=ulaw
>
> dtmfmode=rfc2833
>
> nat=no
>
> fromuser=11234567890
>
>
>
> extensions.conf
>
> [globals]
>
> ;…irrelevant stuff
>
> trunk_1 = Dahdi/g1
>
> trunk_2 = SIP/trunk_2
>
> OUT_2 = SIP/bandwidth.com_outbound
>
>
>
> ;Took out the Set(GROUP()) because I moved it elsewhere to try and fix it
> added all the phones when Asterisk calls agents on a Queue.
>
> [frombandwidth]
>
> ;exten = _+1.,1,Set(GROUP()=SIPGROUP)
>
> exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(SIPGROUP)})
>
> exten = _+1.,n,Set(DID=${EXTEN:2})
>
> exten = _+1.,n,Set(CALLERID(num)=${CALLERID(num):2})
>
> exten = _+1.,n,Goto(DID_trunk_2,${DID},1)
>
>
>
> ;What we use to dialout. Try SIP trunks first, then Dahdi trunk as backup.
>
> ;This is where it breaks. I tried to make it so there can't be more than 2
> calls on SIP channels at once.
>
> ;Since it counts the phone as a channel, and adds it to the group, I had to
> use 4.
>
> [internalphones]
>
> exten = _1NXXNXX,1,Set(GROUP()=SIPGROUP)
>
> exten = _1NXXNXX,n,GotoIf($[${GROUP_COUNT(SIPGROUP)} >= 4]?100)  ;If the
> group has 2 or more calls, do not dial.
>
> exten = _1NXXNXX,n,NoOp(1NCount = ${GROUP_COUNT(SIPGROUP)})
>
> exten =
> _1NXXNXX,n,Macro(trunkdial-failover-0.3,${trunk_2}/+${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_1,trunk_2)
>
> exten = _1NXXNXX,100,Playback(all-circuits-busy-now)
>
> exten = _1NXXNXX,101,congestion()
>
> exten = _1NXXNXX,102,busy()
>
>
>
> ;This is where incoming calls go to if I'm awake.
>
> [DID_trunk_2_timeinterval_Awake]
>
> exten = _NXXNXX,1,Set(GROUP()=SIPGROUP)
>
> exten = _NXXNXX,n,NoOp(Open Count=${GROUP_COUNT(SIPGROUP)})
>
> exten = _NXXNXX,n,Set(CALLERID(num)=1${CALLERID(num)})
>
> exten = _NXXNXX,n,Goto(voicemenu-custom-1|s|1)
>
>
>
> Thanks.
>
> --
> This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
> http://www.opensubscriber.com/message/asterisk-users@lists.digium.com/10416933.html
>

___
-- 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] a little regex help needed

2008-10-20 Thread sean darcy
I'm trying to set the callerid(name) to Office for all calls from the 
main office.

exten =>s,n,Set(CALLERID(name)=${IF($[0${CALLERID(num)} = 
0${REGEX("21245711*")} ] ? "Office":${CALLERID(name)} )})

The main office callerid's are all 212 457 11xx. But this statement 
seems to match everything, including callerid(num)=""

What I'd expect is a callerid(num) of 2124571123 to generate an if test 
of  [02124571123 == 021245711*] or TRUE.

But I've messed up the regex statement somehow.

Thanks for any help.

sean


___
-- 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] OPENR2 in Thailand

2008-10-20 Thread Peter Lindquist
Dear All,

I'm looking for someone who has implemented OpenR2 in Thailand 
successfully. Any settings, advice, caveats etc. are welcome.

Best regards,

Peter Lindqvist
www.voxion.net

___
-- 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] OT: Polycom IP330 user problem

2008-10-20 Thread Mark Hamilton
Something very similar had happened to our Polycom's. Somehow a qualify=yes
for all those peers seemed to solve it.

Try it if it's not enabled already.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill
Michaelson
Sent: October 18, 2008 3:16 PM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] OT: Polycom IP330 user problem

I recently sent this email to a user in response to a problem report of
phone calls going to voicemail without the phone ringing.  I'm wondering if
I've covered all bases, or whether there is some logical explanation I
haven't considered, and generally what others' opinions/experiences are that
relate.  This is an Asterisk system, of course.
---

I looked at the server logs for the phone call missed by .  They
indicate that the call came in at 15:32:25, and was routed to her telephone
at 15:32:32.  This timed out after about 25 seconds as it should if
unanswered, and was sent to voicemail at 15:32:58.

I called BB and asked her to check the phone display.  She told me that
the phone logged an unanswered call at 15:32:32, precisely in accordance
with the server log.

This leaves two possible conjectures:

* The telephone, for whatever reason, did not ring in response to
  the incoming call signal which it obviously received.
* The telephone ringer was not audible or noticeable to  for
  some other reason.

For the first possibility, I can think of three circumstances that would
cause this:

* If the handset is slightly ajar, i.e., off-hook, the phone will
  make no sound, but log the call.  Upon receipt of the message
  waiting notification, it will start blinking.  Eventually, the
  phone reverts to on-hook status by itself even if the handset is
  still ajar.
* If the alert code for silent ring is set, the line annunciator
  will flash silently to indicate the call coming in.
* If the phone is malfunctioning anything can happen.

There is no indication that silent ring alert was set, nor is there any
current configuration setting that should cause this.  That leaves three
bullet points for us to consider.  I can follow up with one:

I will research this as thoroughly as I can to see if there are any reports
of malfunctions by Polycom IP330 phones that conform to this behavior, or if
there are any other possible explanations for the events that I've
overlooked.

If you would like to follow up in any other way, let me know what I can do
to help.




___
-- 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] Transferring Outbound Calls

2008-10-20 Thread Joseph L. Casale
Incoming calls ring SIP users who have |Ttr in their dial plan, but outgoing 
calls are done through a macro as follows:


[macro-diallink2voip]
exten => s,1,Dial(SIP/[EMAIL PROTECTED],120)
exten => s,2,Goto(s-${DIALSTATUS},1)
exten => s-ANSWER,1,Hangup
exten => s-CONGESTION,1,Dial(SIP/[EMAIL PROTECTED],120)
exten => s-CONGESTION,2,Goto(ss-${DIALSTATUS},1)
exten => s-CANCEL,1,Hangup
exten => s-BUSY,1,Busy(30)
exten => s-CHANUNAVAIL,1,Dial(SIP/[EMAIL PROTECTED],120)
exten => s-CHANUNAVAIL,2,Goto(ss-${DIALSTATUS},1)
exten => ss-ANSWER,1,Hangup
exten => ss-CONGESTION,1,Congestion(30)
exten => ss-CANCEL,1,Hangup
exten => ss-BUSY,1,Busy(30)
exten => ss-CHANUNAVAIL,1,Congestion(30)


When a user presses # both callers hear the keytone instead of getting a 
transfer prompt on
outbound calls. Would I be correct in assuming that I could add ",Ttr" after 
the 120 on all
the Dial lines? I am remote and need to direct a user to make this change who 
isn't very
technical so getting it right the first time would be great :)

Thanks!
jlc

___
-- 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] Is there a way to specify the fromdomain from the dialplan?

2008-10-20 Thread Philipp Kempgen
Eric Chamberlain schrieb:
> Is there a way to override the fromdomain specified in the sip.conf  
> and instead set the value from the dialplan?
> 
> If we use:
> 
> Set(CALLERID(num)[EMAIL PROTECTED]
> 
> The SIP From header turns into:
> 
>   [EMAIL PROTECTED]@10.10.10.10

Maybe you could abuse SIPAddHeader() to do that.
On the second thought: not really.

> We want [EMAIL PROTECTED], and we can't have an entry in sip.conf for  
> every provider.

Why not?

What about templates?

[my-domain](!)
fromdomain=example.com

[provider1](my-domain)
...

[provider2](my-domain)
...

   Philipp Kempgen

-- 
http://www.das-asterisk-buch.de  -  http://www.the-asterisk-book.com
Amooma GmbH - Bachstr. 126 - 56566 Neuwied  ->  http://www.amooma.de
Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998
-- 

___
-- 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] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Jeremy Mann
My experience with GotoIf, what follows the ? has to be part of the extension 
itself.

In your example:

Exten = _1NXXNXX(100) would be the intended target.

Maybe that's just 1.4 specific, I'll admit I haven't read this entire thread.

Also, use specific groups:

Set(GROUP(SIP)=SIPGROUP)

Set(GROUP(SIP_PHONE)=SIPGROUP)

Those are two distinct ways to track them, instead of a general GROUP() 
statement.  Since a channel can only be a member of one GROUP(), but multiple 
GROUP(XXX) it makes it easier to track items when they belong to multiple 
things(and logically reads better for future support of the dialplan).

I can say that we're successfully limiting calls on two-way sip trunks from 
bandwidth, both incoming and outgoing.

Probably if 4+ lit up at once I'd have a problem, but we're not that high 
volume.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
Sent: Monday, October 20, 2008 11:27 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
one-way audio

I tried using GROUP(), here's a snippet from the first post.

;Took out the Set(GROUP()) because I moved it elsewhere to try and fix
it added all the phones when Asterisk calls agents on a Queue.
[frombandwidth]
;exten = _+1.,1,Set(GROUP()=SIPGROUP)
exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(SIPGROUP)})
exten = _+1.,n,Set(DID=${EXTEN:2})
exten = _+1.,n,Set(CALLERID(num)=${CALLERID(num):2})
exten = _+1.,n,Goto(DID_trunk_2,${DID},1)

;What we use to dialout. Try SIP trunks first, then Dahdi trunk as backup.
;This is where it breaks. I tried to make it so there can't be more
than 2 calls on SIP channels at once.
;Since it counts the phone as a channel, and adds it to the group, I
had to use 4.
[internalphones]
exten = _1NXXNXX,1,Set(GROUP()=SIPGROUP)
exten = _1NXXNXX,n,GotoIf($[${GROUP_COUNT(SIPGROUP)} >= 4]?100)
;If the group has 2 or more calls, do not dial.
exten = _1NXXNXX,n,NoOp(1NCount = ${GROUP_COUNT(SIPGROUP)})
exten = 
_1NXXNXX,n,Macro(trunkdial-failover-0.3,${trunk_2}/+${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_1,trunk_2)
exten = _1NXXNXX,100,Playback(all-circuits-busy-now)
exten = _1NXXNXX,101,congestion()
exten = _1NXXNXX,102,busy()

;This is where incoming calls go to if I'm awake.
[DID_trunk_2_timeinterval_Awake]
exten = _NXXNXX,1,Set(GROUP()=SIPGROUP)
exten = _NXXNXX,n,NoOp(Open Count=${GROUP_COUNT(SIPGROUP)})
exten = _NXXNXX,n,Set(CALLERID(num)=1${CALLERID(num)})
exten = _NXXNXX,n,Goto(voicemenu-custom-1|s|1)

I'll try playing around with incoming/outgoing and see if that makes a
difference. I don't know why it counts the phone as a channel, though.

On Mon, Oct 20, 2008 at 12:14 PM, Jeremy Mann <[EMAIL PROTECTED]> wrote:
>
> Tried using GROUP()?
>
>
>
> When a call comes in or goes out:
>
>
>
> Exten => XXX,1,Set(GROUP(bdwi_out_1)=outgoing/incoming);
>
> Exten => XXX,n,GotoIf($[${GROUP_COUNT(outgoing/[EMAIL PROTECTED])}] > 1?fail)
>
> Exten => XXX,n,Dial(...)
>
> Exten => XXX(fail),1,Congestion();
>
> Exten => XXX(fail),n,Hangup();
>
>
>
> Obviously choose outgoing or incoming, if you want to track both you can just 
> use $MATH() to add them together.
>
>
>
> Or some other math logic to check the result.
>
>
>
> On incoming Set(DIALSTATUS=CHANUNAVAIL) and it'll ring busy to bandwidth(or 
> out of service, you can tweak this).
>
>
>
>
>
>
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
> Sent: Monday, October 20, 2008 10:46 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
> one-way audio
>
>
>
> Any updates? It still seems to happen, though not as often as it used to. 
> We're using Polycom 320 phones, if that makes a difference, though we did do 
> it with X-Lite as well.
>
> On Sat, Oct 11, 2008 at 3:03 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
>
> Thanks, Steve,
>
> That's what I am unsure of. I don't know how to limit 1 call per trunk. If 
> that's an easy thing to setup, I'd love to see it.
>
> On Fri, Oct 10, 2008 at 10:20 PM, Steve Totaro <[EMAIL PROTECTED]> wrote:
>
> Oh, I thought you had logic to count the calls on the trunk.  You should 
> limit each trunk to one call.  This is the primary reason besides the email 
> that basically said that customer support structure has been changed and 
> anything beyond the Demarc would not be supported, I the Demarc is simply 
> their boxen, so unless it is on their side, you will not get any helpful 
> support from Bandwidth, plus they CCed over 500 people by address instead of 
> setting up a group.  
> http://www.bandwidth.com/content/support/?page=standardSupport
>
> I am with Junction and while a trunk is not "unlimited" as far as price for 
> usage, the amount of trunks is unlimited (or at least as unlimited as it can 
> be since nothing is really unlimited).  They

Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Kurt Knudsen
I tried using GROUP(), here's a snippet from the first post.

;Took out the Set(GROUP()) because I moved it elsewhere to try and fix
it added all the phones when Asterisk calls agents on a Queue.
[frombandwidth]
;exten = _+1.,1,Set(GROUP()=SIPGROUP)
exten = _+1.,1,NoOp(FromCount=${GROUP_COUNT(SIPGROUP)})
exten = _+1.,n,Set(DID=${EXTEN:2})
exten = _+1.,n,Set(CALLERID(num)=${CALLERID(num):2})
exten = _+1.,n,Goto(DID_trunk_2,${DID},1)

;What we use to dialout. Try SIP trunks first, then Dahdi trunk as backup.
;This is where it breaks. I tried to make it so there can't be more
than 2 calls on SIP channels at once.
;Since it counts the phone as a channel, and adds it to the group, I
had to use 4.
[internalphones]
exten = _1NXXNXX,1,Set(GROUP()=SIPGROUP)
exten = _1NXXNXX,n,GotoIf($[${GROUP_COUNT(SIPGROUP)} >= 4]?100)
;If the group has 2 or more calls, do not dial.
exten = _1NXXNXX,n,NoOp(1NCount = ${GROUP_COUNT(SIPGROUP)})
exten = 
_1NXXNXX,n,Macro(trunkdial-failover-0.3,${trunk_2}/+${EXTEN:0},${trunk_1}/${EXTEN:0},trunk_1,trunk_2)
exten = _1NXXNXX,100,Playback(all-circuits-busy-now)
exten = _1NXXNXX,101,congestion()
exten = _1NXXNXX,102,busy()

;This is where incoming calls go to if I'm awake.
[DID_trunk_2_timeinterval_Awake]
exten = _NXXNXX,1,Set(GROUP()=SIPGROUP)
exten = _NXXNXX,n,NoOp(Open Count=${GROUP_COUNT(SIPGROUP)})
exten = _NXXNXX,n,Set(CALLERID(num)=1${CALLERID(num)})
exten = _NXXNXX,n,Goto(voicemenu-custom-1|s|1)

I'll try playing around with incoming/outgoing and see if that makes a
difference. I don't know why it counts the phone as a channel, though.

On Mon, Oct 20, 2008 at 12:14 PM, Jeremy Mann <[EMAIL PROTECTED]> wrote:
>
> Tried using GROUP()?
>
>
>
> When a call comes in or goes out:
>
>
>
> Exten => XXX,1,Set(GROUP(bdwi_out_1)=outgoing/incoming);
>
> Exten => XXX,n,GotoIf($[${GROUP_COUNT(outgoing/[EMAIL PROTECTED])}] > 1?fail)
>
> Exten => XXX,n,Dial(…)
>
> Exten => XXX(fail),1,Congestion();
>
> Exten => XXX(fail),n,Hangup();
>
>
>
> Obviously choose outgoing or incoming, if you want to track both you can just 
> use $MATH() to add them together.
>
>
>
> Or some other math logic to check the result.
>
>
>
> On incoming Set(DIALSTATUS=CHANUNAVAIL) and it'll ring busy to bandwidth(or 
> out of service, you can tweak this).
>
>
>
>
>
>
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
> Sent: Monday, October 20, 2008 10:46 AM
> To: Asterisk Users Mailing List - Non-Commercial Discussion
> Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
> one-way audio
>
>
>
> Any updates? It still seems to happen, though not as often as it used to. 
> We're using Polycom 320 phones, if that makes a difference, though we did do 
> it with X-Lite as well.
>
> On Sat, Oct 11, 2008 at 3:03 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
>
> Thanks, Steve,
>
> That's what I am unsure of. I don't know how to limit 1 call per trunk. If 
> that's an easy thing to setup, I'd love to see it.
>
> On Fri, Oct 10, 2008 at 10:20 PM, Steve Totaro <[EMAIL PROTECTED]> wrote:
>
> Oh, I thought you had logic to count the calls on the trunk.  You should 
> limit each trunk to one call.  This is the primary reason besides the email 
> that basically said that customer support structure has been changed and 
> anything beyond the Demarc would not be supported, I the Demarc is simply 
> their boxen, so unless it is on their side, you will not get any helpful 
> support from Bandwidth, plus they CCed over 500 people by address instead of 
> setting up a group.  
> http://www.bandwidth.com/content/support/?page=standardSupport
>
> I am with Junction and while a trunk is not "unlimited" as far as price for 
> usage, the amount of trunks is unlimited (or at least as unlimited as it can 
> be since nothing is really unlimited).  They asked that I try not to go over 
> one call per second for any real duration, and that I not hammer one LATA do 
> to limited interconnects.
>
> The other thing was Junctions was very easy to sign up with, great support, 
> and configuration was a breeze.
>
> As for Bandwidth, I think they are solid but due to recent changes and the 
> fact that you must pay per channel, as well as the setup process, I decided 
> they were not for me.
>
> I will take a second look at your sip.conf and extensions.conf later to see 
> if something jumps out at me.  I suspect since you are setting up two 
> separate trunks with Bandwidth, you need to limit each trunk to one call, 
> rather than two.
>
> Thanks,
> Steve Totaro
>
>
> On Fri, Oct 10, 2008 at 9:47 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
>
> externip messes up DTMF detection, and by messes up I mean it doesn't detect 
> it at all. Setting nat=yes or nat=no didn't make a difference either.
>
> When the trunks are in use, the calls are fine, no dropped audio. It only 
> happens when a 3rd call is made and there's no trunk available.
>
> Thanks :)
>
>
>
> On Fri, Oct

[asterisk-users] I have probleme with asterisk

2008-10-20 Thread diop cheikhtacko
 some body can help me with astrisk server . i have problemes withthe message is notice [5483] : chan_iax2.c: 5325 register_verify : no registration
 for peer 'x' from (xx.xx.xx.xx.)can you explan me wath's the master  thank's  __Do You Yahoo!?En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités http://mail.yahoo.fr Yahoo! Mail ___
-- 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] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Jeremy Mann
Tried using GROUP()?

When a call comes in or goes out:

Exten => XXX,1,Set(GROUP(bdwi_out_1)=outgoing/incoming);
Exten => XXX,n,GotoIf($[${GROUP_COUNT(outgoing/[EMAIL PROTECTED])}] > 1?fail)
Exten => XXX,n,Dial(...)
Exten => XXX(fail),1,Congestion();
Exten => XXX(fail),n,Hangup();

Obviously choose outgoing or incoming, if you want to track both you can just 
use $MATH() to add them together.

Or some other math logic to check the result.

On incoming Set(DIALSTATUS=CHANUNAVAIL) and it'll ring busy to bandwidth(or out 
of service, you can tweak this).



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kurt Knudsen
Sent: Monday, October 20, 2008 10:46 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent 
one-way audio

Any updates? It still seems to happen, though not as often as it used to. We're 
using Polycom 320 phones, if that makes a difference, though we did do it with 
X-Lite as well.
On Sat, Oct 11, 2008 at 3:03 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
Thanks, Steve,

That's what I am unsure of. I don't know how to limit 1 call per trunk. If 
that's an easy thing to setup, I'd love to see it.
On Fri, Oct 10, 2008 at 10:20 PM, Steve Totaro <[EMAIL PROTECTED]> wrote:
Oh, I thought you had logic to count the calls on the trunk.  You should limit 
each trunk to one call.  This is the primary reason besides the email that 
basically said that customer support structure has been changed and anything 
beyond the Demarc would not be supported, I the Demarc is simply their boxen, 
so unless it is on their side, you will not get any helpful support from 
Bandwidth, plus they CCed over 500 people by address instead of setting up a 
group.  http://www.bandwidth.com/content/support/?page=standardSupport

I am with Junction and while a trunk is not "unlimited" as far as price for 
usage, the amount of trunks is unlimited (or at least as unlimited as it can be 
since nothing is really unlimited).  They asked that I try not to go over one 
call per second for any real duration, and that I not hammer one LATA do to 
limited interconnects.

The other thing was Junctions was very easy to sign up with, great support, and 
configuration was a breeze.

As for Bandwidth, I think they are solid but due to recent changes and the fact 
that you must pay per channel, as well as the setup process, I decided they 
were not for me.

I will take a second look at your sip.conf and extensions.conf later to see if 
something jumps out at me.  I suspect since you are setting up two separate 
trunks with Bandwidth, you need to limit each trunk to one call, rather than 
two.

Thanks,
Steve Totaro



On Fri, Oct 10, 2008 at 9:47 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
externip messes up DTMF detection, and by messes up I mean it doesn't detect it 
at all. Setting nat=yes or nat=no didn't make a difference either.

When the trunks are in use, the calls are fine, no dropped audio. It only 
happens when a 3rd call is made and there's no trunk available.

Thanks :)

On Fri, Oct 10, 2008 at 7:09 PM, Steve Totaro <[EMAIL PROTECTED]> wrote:
You need to configure your box for nat settings, externip and other settings in 
sip.conf and set nat=yes instead of nat=no.

One way audio is almost always a NAT issue and those are two glaring things 
that would cause problems.

Thanks,
Steve Totaro

On Fri, Oct 10, 2008 at 6:32 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:
Hi Steve,

It's behind a NAT/Firewall but SIP translation is enabled and removing it from 
behind the firewall did nothing, it still dropped calls. The calls connect and 
everything works, but it dies when all trunks are in use and someone else tries 
to call out. It seems like even though both channels are in use, it tries to 
connect to the 2nd trunk and thus kills the audio. Nothing strange came up in 
Wireshark or the firewall logs.

Thanks.
On Fri, Oct 10, 2008 at 5:40 PM, Steve Totaro <[EMAIL PROTECTED]> wrote:

On Fri, Oct 10, 2008 at 5:17 PM, Kurt Knudsen <[EMAIL PROTECTED]> wrote:

Hello,



We have 2 SIP trunks from Bandwidth.com and if both are in use and someone 
tries to dial out, they cause another call to get one-way audio (the caller 
hears us, we cannot hear them). This happens 100% of the time and Bandwidth.com 
doesn't offer any support. I don't see any setting that tells Asterisk that 
there are 2 channels available from Bandwidth.com's IP. I'm currently using, or 
attempting to use, groups to solve this problem, but sometimes it works, 
sometimes it doesn't. It breaks when a call goes out on a Queue, because it 
seems to add each phone to the group, which breaks my GotoIf() statement. 
Here's some relevant information:



Users.conf (added by Asterisk-GUI)

[trunk_2]

pro

Re: [asterisk-users] Configuring Bandwidth.com SIP trunks to prevent one-way audio

2008-10-20 Thread Kurt Knudsen
Any updates? It still seems to happen, though not as often as it used to.
We're using Polycom 320 phones, if that makes a difference, though we did do
it with X-Lite as well.

On Sat, Oct 11, 2008 at 3:03 PM, Kurt Knudsen <[EMAIL PROTECTED]>wrote:

> Thanks, Steve,
>
> That's what I am unsure of. I don't know how to limit 1 call per trunk. If
> that's an easy thing to setup, I'd love to see it.
>
> On Fri, Oct 10, 2008 at 10:20 PM, Steve Totaro <
> [EMAIL PROTECTED]> wrote:
>
>> Oh, I thought you had logic to count the calls on the trunk.  You should
>> limit each trunk to one call.  This is the primary reason besides the email
>> that basically said that customer support structure has been changed and
>> anything beyond the Demarc would not be supported, I the Demarc is simply
>> their boxen, so unless it is on their side, you will not get any helpful
>> support from Bandwidth, plus they CCed over 500 people by address instead of
>> setting up a group.
>> http://www.bandwidth.com/content/support/?page=standardSupport
>>
>> I am with Junction and while a trunk is not "unlimited" as far as price
>> for usage, the amount of trunks is unlimited (or at least as unlimited as it
>> can be since nothing is really unlimited).  They asked that I try not to go
>> over one call per second for any real duration, and that I not hammer one
>> LATA do to limited interconnects.
>>
>> The other thing was Junctions was very easy to sign up with, great
>> support, and configuration was a breeze.
>>
>> As for Bandwidth, I think they are solid but due to recent changes and the
>> fact that you must pay per channel, as well as the setup process, I decided
>> they were not for me.
>>
>> I will take a second look at your sip.conf and extensions.conf later to
>> see if something jumps out at me.  I suspect since you are setting up two
>> separate trunks with Bandwidth, you need to limit each trunk to one call,
>> rather than two.
>>
>> Thanks,
>> Steve Totaro
>>
>>
>>
>>
>> On Fri, Oct 10, 2008 at 9:47 PM, Kurt Knudsen <[EMAIL PROTECTED]>wrote:
>>
>>> externip messes up DTMF detection, and by messes up I mean it doesn't
>>> detect it at all. Setting nat=yes or nat=no didn't make a difference either.
>>>
>>> When the trunks are in use, the calls are fine, no dropped audio. It only
>>> happens when a 3rd call is made and there's no trunk available.
>>>
>>> Thanks :)
>>>
>>>
>>> On Fri, Oct 10, 2008 at 7:09 PM, Steve Totaro <
>>> [EMAIL PROTECTED]> wrote:
>>>
 You need to configure your box for nat settings, externip and other
 settings in sip.conf and set nat=yes instead of nat=no.

 One way audio is almost always a NAT issue and those are two glaring
 things that would cause problems.

 Thanks,
 Steve Totaro


 On Fri, Oct 10, 2008 at 6:32 PM, Kurt Knudsen <[EMAIL PROTECTED]>wrote:

> Hi Steve,
>
> It's behind a NAT/Firewall but SIP translation is enabled and removing
> it from behind the firewall did nothing, it still dropped calls. The calls
> connect and everything works, but it dies when all trunks are in use and
> someone else tries to call out. It seems like even though both channels 
> are
> in use, it tries to connect to the 2nd trunk and thus kills the audio.
> Nothing strange came up in Wireshark or the firewall logs.
>
> Thanks.
>
> On Fri, Oct 10, 2008 at 5:40 PM, Steve Totaro <
> [EMAIL PROTECTED]> wrote:
>
>>
>>
>> On Fri, Oct 10, 2008 at 5:17 PM, Kurt Knudsen <[EMAIL PROTECTED]
>> > wrote:
>>
>>>  Hello,
>>>
>>>
>>>
>>> We have 2 SIP trunks from Bandwidth.com and if both are in use and
>>> someone tries to dial out, they cause another call to get one-way audio 
>>> (the
>>> caller hears us, we cannot hear them). This happens 100% of the time and
>>> Bandwidth.com doesn't offer any support. I don't see any setting that 
>>> tells
>>> Asterisk that there are 2 channels available from Bandwidth.com's IP. 
>>> I'm
>>> currently using, or attempting to use, groups to solve this problem, but
>>> sometimes it works, sometimes it doesn't. It breaks when a call goes 
>>> out on
>>> a Queue, because it seems to add each phone to the group, which breaks 
>>> my
>>> GotoIf() statement. Here's some relevant information:
>>>
>>>
>>>
>>> Users.conf (added by Asterisk-GUI)
>>>
>>> [trunk_2]
>>>
>>> provider = Bandwidth (SIP)  ; GUI metadata
>>>
>>> context = DID_trunk_2
>>>
>>> hasexten = no
>>>
>>> hasiax = no
>>>
>>> hassip = yes
>>>
>>> host = 216.82.224.202
>>>
>>> registeriax = no
>>>
>>> registersip = no
>>>
>>> usecallerid = yes
>>>
>>> nat = no ;Testing
>>>
>>> trunkname = Bandwidth.com (Sip)  ; GUI metadata
>>>
>>> username =
>>>
>>> secret =
>>>
>>> disallow = all
>>>
>>> allow = ulaw,

Re: [asterisk-users] adding a second extension

2008-10-20 Thread Stephen Reese
On Mon, Oct 20, 2008 at 10:37 AM, Juan Rodríguez <[EMAIL PROTECTED]> wrote:
> I do not think NAT is the problem, NAT normally gives you problems like one
> way audio or no registration.
> Try calling the SIP/102 on other extension:
> ;TEST
> exten => 1002,1,Dial(SIP,102|20)
> exten => 1002,n,Hangup()
>  instead of:
>
> exten => 102,1,Dial...
> But this is a very strange error... Check if there is no other definition of
> default having 102 on it because Asterisk is going to merge the extensions.

I get the following when trying to dial 1002 from 101. I've attached
my extensions.conf file in-case there is something else that is
conflicting as you mentioned.

-- Executing [EMAIL PROTECTED]:1] Dial("SIP/101-082aca90",
"SIP/102/20") in new stack
  == Using SIP RTP CoS mark 5
-- Called 102/20
[Oct 20 11:03:33] WARNING[20285]: chan_sip.c:2787 retrans_pkt: Maximum
retries exceeded on transmission
[EMAIL PROTECTED] for seqno 102
(Critical Request) -- See doc/sip-retransmit.txt.
[Oct 20 11:03:33] WARNING[20285]: chan_sip.c:2814 retrans_pkt: Hanging
up call [EMAIL PROTECTED] - no reply to
our critical packet (see doc/sip-retransmit.txt).
  == Everyone is busy/congested at this time (1:0/0/1)
-- Executing [EMAIL PROTECTED]:2] Hangup("SIP/101-082aca90", "") in new 
stack
  == Spawn extension (default, 1002, 2) exited non-zero on 'SIP/101-082aca90'


extensions.conf
Description: Binary data
___
-- 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] adding a second extension

2008-10-20 Thread Juan Rodríguez
I do not think NAT is the problem, NAT normally gives you problems like one
way audio or no registration.
Try calling the SIP/102 on other extension:

;TEST
exten => 1002,1,Dial(SIP,102|20)
exten => 1002,n,Hangup()

 instead of:

exten => 102,1,Dial...

But this is a very strange error... Check if there is no other definition of
default having 102 on it because Asterisk is going to merge the extensions.


On Mon, Oct 20, 2008 at 10:09 AM, Stephen Reese <[EMAIL PROTECTED]> wrote:

> On Mon, Oct 20, 2008 at 12:25 AM, Eric ManxPower Wieling
> <[EMAIL PROTECTED]> wrote:
> > ast_request: No channel type registered for ''SIP'
> >
> > Notice the extra ' in the message.
> >
> > That is either an error in the error message or you have a an extra ' in
> > your Dial line.  Something like Dial('SIP/
> >
> > I'm surprised nobody else noticed this.
>
> I looked through my extensions.conf and sip.conf which are posted in
> this thread I believe and didn't turn up anything significant? Would
> NAT pose a problem for more then one phone behind a NAT router?
>
> ___
> -- 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
>



-- 
Juan E. Rodríguez
Cel. 829-886-5565
Work: 809-724-9227
___
-- 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] adding a second extension

2008-10-20 Thread Stephen Reese
On Mon, Oct 20, 2008 at 12:23 AM, Juan Rodríguez <[EMAIL PROTECTED]> wrote:
> The second call its OK, so the problem it is just with the Dial(SIP/102), so
> try:
> originate SIP/102 application Dial SIP/102
> and
> originate SIP/101 application Dial SIP/102
> and
> originate SIP/102 application Dial SIP/101

ns1*CLI> originate SIP/102 application Dial SIP/102
ns1*CLI>
 == Using SIP RTP CoS mark 5
  -- Launching Dial(SIP/102) on SIP/102-0824a330
 == Using SIP RTP CoS mark 5
  -- Called 102
  -- SIP/102-082256c0 is ringing
  -- SIP/102-0824a330 requested special control 16, passing it to
SIP/102-082256c0
  -- Started music on hold, class 'default', on SIP/102-082256c0
  -- SIP/102-082256c0 answered SIP/102-0824a330
  -- Packet2Packet bridging SIP/102-0824a330 and SIP/102-082256c0
  -- Stopped music on hold on SIP/102-082256c0

ns1*CLI> originate SIP/101 application Dial SIP/102
 == Using SIP RTP CoS mark 5
  -- Launching Dial(SIP/102) on SIP/101-08249e28
 == Using SIP RTP CoS mark 5
  -- Called 102
  -- SIP/102-082256c0 is ringing
  -- SIP/102-082256c0 answered SIP/101-08249e28
  -- Packet2Packet bridging SIP/101-08249e28 and SIP/102-082256c0


ns1*CLI> originate SIP/102 application Dial SIP/101
 == Using SIP RTP CoS mark 5
  -- Launching Dial(SIP/101) on SIP/102-08254038
 == Using SIP RTP CoS mark 5
  -- Called 101
  -- SIP/101-08252a40 is ringing
  -- SIP/101-08252a40 answered SIP/102-08254038
  -- Packet2Packet bridging SIP/102-08254038 and SIP/101-08252a40

So I the two extensions are able to call each other with the later two
sets of commands so there is hope :-). Would my NAT have anything to
do with it since I'm specifying the proxy host that is outside of my firewall?

___
-- 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] adding a second extension

2008-10-20 Thread Stephen Reese
On Mon, Oct 20, 2008 at 12:25 AM, Eric ManxPower Wieling
<[EMAIL PROTECTED]> wrote:
> ast_request: No channel type registered for ''SIP'
>
> Notice the extra ' in the message.
>
> That is either an error in the error message or you have a an extra ' in
> your Dial line.  Something like Dial('SIP/
>
> I'm surprised nobody else noticed this.

I looked through my extensions.conf and sip.conf which are posted in
this thread I believe and didn't turn up anything significant? Would
NAT pose a problem for more then one phone behind a NAT router?

___
-- 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] Problem in extensions.conf Configuration ${CALLINGPRES}

2008-10-20 Thread Hiren Mistry
Dear Everybody,

I have to store variable from ${CALLINGPRES} and get birth date  of  our 
client and get back to him his birth prediction as numerology 
(numerology digit value is between 1-9). I have also mentioned below 
example here suppose client's birth date is 27-01-2000 then 
2+7+0+1+2+0+0+0 = 12 and then 1+2 = 3. 3 is result so client can get his 
prediction as this 3 digit.

Please guide me how can I write in extensions.conf

exten => 1,1,SetGlobalVar(A=${CALLINGPRES})
exten => 1,n,NoOp(${A})

How can I store variable from ${CALLINGPRES}. I have also tried 
SetVar(A=${CALLINGPRES}) instead of SetGlobleVar() but I have not get 
any integer variable.

-- 
With Regards,
Hiren Mistry


___
-- 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] anoyingly answers already in use pstn line

2008-10-20 Thread Drew Gibson
Tzafrir Cohen wrote:
> On Fri, Oct 17, 2008 at 05:04:32PM -0400, Gleim, Jason wrote:
>>>
>>> I am using Asterisk and an X101P card as a glorified answering
>>>   
>> machine.
>> 
>>> We have a residential PSTN line with about six phones connected to it.
>>> Like an answering machine, I want Asterisk answer the line *only* when
>>> an incoming call is not answered after four rings.
>>>
>>> This mostly works. My extensions.conf is at the end of this message.
>>>
>>> The problem is that Asterisk will sometimes answer the line when
>>> someone
>>> is already talking on one of the six phones connected to it. Sometimes
>>> Asterisk will answer the line and start playing the greeting in the
>>> middle of a conversation! This is especially a problem when I am
>>> talking
>>>
>>>   
>> Others may wish to chime in and confirm or deny this but the card is
>> probably getting confused by you loading the line with the other phones.
>> I know most of the analog cards I've worked with (which does not include
>> the X101P) really get cranky if there is anything else hanging off that
>> line. The only solution I've seen to the problem is to change things
>> around so that the card is the only thing on the line.
>> 
>
> The "cranky" card here is not the issue. It would be the same with any
> other card.
>
>   
>> In know you said you haven't switched to IP or FXS but is there a reason
>> why? 
>> 
>
> That would require rewiring.
>
>   

I swapped my X101P for a Linsys SPA3102 some time back.

Calls come in to the SPA on its FXO port and get forwarded to Asterisk 
which then rings the "legacy" phones on the SPA's FXS port, as the other 
members of the household (read "wife") are used to. All of Asterisk's 
features are available.

If any issues arise, you just pull the power to the SPA and calls just 
pass through directly to the legacy phones.
In addition, the SPA is supposed to pass calls through to the FXS if it 
loses its registration with Asterisk (eg Asterisk crashes) but I never 
got this working.

One day, I would like to teach Asterisk to behave like an old-fashioned 
answering machine to allow a "second chance" to catch calls after the 
fourth ring but I haven't had the time yet.

-- 
Drew Gibson

Systems Administrator
OANDA Corporation
www.oanda.com


___
-- 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] QoS VoIP

2008-10-20 Thread Alex Balashov
A clearer explanation of your problem, including examples and output, is 
needed.

Anael DIAZ wrote:
> Hi!
> I have some problem in my asterisk 1.4.2, I've installed it on centOS 5.2
> and this didn't accept voip QoS and can't route the packets having voip 
> QoS.
> So  I should change voip packets to be routing with centOS.
> I want to use iproute2 but i don't what to do after installing iproute2.
> Anyone could help me please?
> 
> 
> 
> 
> ___
> -- 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


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599

___
-- 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] ISDN PRI Caller ID problem

2008-10-20 Thread A.R. Nasir Qureshi
Dear All,

I am trying to setup an ISDN line from local telco on a digium card. The 
problem I am facing is that I am not getting any caller id from the 
telco. They say that they have enabled caller id.

Please help me out.

My zapata.conf

[trunkgroups]

[channels]
context=pstnincoming
pridialplan=local
prilocaldialplan=local

usecallerid=yes
cidsignalling=v23
cidstart=ring
hidecallerid=no
callwaiting=no
usecallingpres=yes
sendcalleridafter=1
echocancel=no
echocancelwhenbridged=no
rxgain=0.0
txgain=0.0
callgroup=1
pickupgroup=1

immediate=no
callerid=asreceived
busydetect=no
busycount=6
callprogress=no
faxdetect=incoming


switchtype = national
signalling = pri_cpe
group = 1
channel => 1-15,17-31
channel => 32-46,48-62


The information I get from using "pri intense debug span 1" is:

< [ 02 01 16 9c 08 02 15 01 05 04 03 80 90 a3 18 03 a1 83 81 70 08 c1 34 
33 39 32 38 34 32 a1 ]

< Informational frame:
< SAPI: 00  C/R: 1 EA: 0
<  TEI: 000EA: 1
< N(S): 011   0: 0
< N(R): 078   P: 0
< 26 bytes of data
Handling message for SAPI/TEI=0/0
-- ACKing all packets from 77 to (but not including) 78
-- Since there was nothing left, stopping T200 counter
-- Stopping T203 counter since we got an ACK
-- Nothing left, starting T203 counter
< Protocol Discriminator: Q.931 (8)  len=26
< Call Ref: len= 2 (reference 5377/0x1501) (Originator)
< Message type: SETUP (5)
< [04 03 80 90 a3]
< Bearer Capability (len= 5) [ Ext: 1  Q.931 Std: 0  Info transfer 
capability: Speech (0)
<  Ext: 1  Trans mode/rate: 64kbps, 
circuit-mode (16)


Re: [asterisk-users] Asterisk Problem

2008-10-20 Thread Tzafrir Cohen
On Mon, Oct 20, 2008 at 05:36:55AM -0700, Antoine Megalla wrote:
> Hi,
> 
> I had this problem once before.
> It was related to running asterisk as a non root user.
> 
> I think if you run asterisk as root your problems will
> go away.
> OR
> you can change the permissions on the /var/run
> directory to 777 and the 
> problem might be solved too.

chmod 777 means you should have solved it with chown otherwise . In this
case: chown asterisk: on /var/run/asterisk .

BTW: are you on a distribution that deletes the contents of /var/run at
startup?

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- 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] Asterisk Problem

2008-10-20 Thread Antoine Megalla
Hi,

I had this problem once before.
It was related to running asterisk as a non root user.

I think if you run asterisk as root your problems will
go away.
OR
you can change the permissions on the /var/run
directory to 777 and the 
problem might be solved too.

Regards,

Antoine Megalla.

> Message: 15
> Date: Sun, 19 Oct 2008 22:19:09 +0200
> From: Ahmed Torintino <[EMAIL PROTECTED]>
> Subject: Re: [asterisk-users] Asterisk Problem
> To: Asterisk Users Mailing List - Non-Commercial
Discussion
> 
> Message-ID:
<[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"
>
> i have done that as follow
>
> [EMAIL PROTECTED] asterisk]# service asterisk start
> Starting asterisk:  
  [  OK  ]
> [EMAIL PROTECTED] asterisk]# asterisk
> [EMAIL PROTECTED] asterisk]# asterisk
> [EMAIL PROTECTED] asterisk]# asterisk -vr
> Unable to connect to remote asterisk (does
/var/run/asterisk.ctl exist?)
> but i think the problem is because of those couple
files
>
> /var/run/asterisk.ctland   
/var/run/asterisk.pid
>
>
> Thanks
>
>
>
> Date: Sun, 19 Oct 2008 16:05:34 -0400From:
[EMAIL PROTECTED]: 
> [EMAIL PROTECTED]: Re:
[asterisk-users] Asterisk 
> Problem
> When installing Asterisk, did you issue the command
"make config" after 
> "make samples" ??
>
> If so, try issuing "service asterisk start" on
RedHat or 
> "/etc/init.d/asterisk start" on Debian.
>
> Regards,
> Juan
> On Sun, Oct 19, 2008 at 3:50 PM, Ahmed torinto
<[EMAIL PROTECTED]> 
> wrote:
>
>
> After installing a new box and asterisk. i have got
these errors
>
>
> [EMAIL PROTECTED] ~]# asterisk
>
> Unable to open pid file
'/var/run/asterisk/asterisk.pid': No such file or 
> directory
>
> [EMAIL PROTECTED] ~]# asterisk -vr
>
> Unable to connect to remote asterisk (does
/var/run/asterisk/asterisk.ctl 
> exist?)
>
> I didn't find a folder called asterisk in the
directory /var/run
>
> [EMAIL PROTECTED] ~]# cd /var/run/
> [EMAIL PROTECTED] run]# ls
> acpid.socket  dbus   iptraf
messagebus.pid  ntpd.pid 
> sendmail.pid   sudo utmp
> atd.pid   dhclient-eth0.pid  klogd.pid  mysqld  
   ppp 
> sm-client.pid  syslogd.pid  winbindd
> console   haldaemon.pid  mdadm 
netreport   rpc.statd.pid 
> spamassassin   tog-pegasus  xfs.pid
> crond.pid httpd.pid  mdmpd  nscd
   saslauthd 
> sshd.pid   usb  xinetd.pid
> [EMAIL PROTECTED] run]#
> [EMAIL PROTECTED] run]# asterisk -cv
> Unable to open pid file
'/var/run/asterisk/asterisk.pid': No such file or 
> directory
> Unable to bind socket to
/var/run/asterisk/asterisk.ctl: No such file or 
> directory
>  == Parsing '/etc/asterisk/asterisk.conf': Found
>  == Parsing '/etc/asterisk/extconfig.conf': Found
> Asterisk 1.2.28, Copyright (C) 1999 - 2007 Digium,
Inc. and others.
> Created by Mark Spencer <[EMAIL PROTECTED]>
> Asterisk comes with ABSOLUTELY NO WARRANTY; type
'show warranty' for 
> details.
> This is free software, with components licensed
under the GNU General 
> Public
> License version 2 and other licenses; you are
welcome to redistribute it 
> under
> certain conditions. Type 'show license' for details.
>
=
>  == Parsing '/etc/asterisk/logger.conf': Found
> Asterisk Event Logger Started
/var/log/asterisk/event_log
>  == Parsing '/etc/asterisk/dnsmgr.conf': Found
> Asterisk Dynamic Loader loading preload modules:
>  == Parsing '/etc/asterisk/modules.conf': Found
>  == Manager registered action Ping
>  == Manager registered action Events
>  == Manager registered action Logoff
>  == Manager registered action Hangup
>  == Manager registered action Status
>  == Manager registered action Setvar
>  == Manager registered action Getvar
>  == Manager registered action Redirect
>  == Manager registered action Originate
>  == Manager registered action Command
>  == Manager registered action ExtensionState
>  == Manager registered action AbsoluteTimeout
>  == Manager registered action MailboxStatus
>  == Manager registered action MailboxCount
>  == Manager registered action ListCommands
>  == Parsing '/etc/asterisk/manager.conf': Found
>  == Parsing '/etc/asterisk/manager_custom.conf':
Found
> [EMAIL PROTECTED] run]#
>
> How can i solve it please? 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

___
-- 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] Asterisk 1.6.1 + openais

2008-10-20 Thread Russell Bryant

On Oct 19, 2008, at 5:35 PM, Edgar Guadamuz wrote:

> I enabled the subscribe_event in the ais.conf and restarted aisexec.  
> After that I restarted asterisk and the only warning I got in  
> console was
> Oct 11  6:38:04.340485 [CLM  ] nodeget: trying to find node 
> If I disable the subscribe_event, asterisk starts as normal.
>

What version of openais are you using?  The versions listed in the  
"stable" section of openais.org do not include a bug fix to the event  
service that prevent a crash.  Try one of the newer versions listed on  
the site.

--
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.





___
-- 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] B410P and asterisk 1.6

2008-10-20 Thread Enrico Maistro
Hi all,

I'm trying to get a digium B410P to work with asterisk 1.6.0.1 (but i
have the same problems with asterisk 1.6.0)

Official digium documentation cover up to asterisk 1.4.x and suggest to
use zaphfc... but as i understood zap is completely gone in 1.6

I tried with misdn (1.1.8, 1.1.7.2 and 1.1.5) and card is recognized
correctly by the kernel but chan_misdn does not work as expected.

Both incoming and outgoing calls end up with a:

"There is no free channel on port (1)"

For outgoing calls i have:

exten => _X.,1,misdn_check_l2l1(g:1,2)
exten => _X.,n,Dial(MISDN/g:1/${EXTEN})

Odd thing asterisk 1.6-beta9 on the same system work fine.

Any suggestion? Link to documentation/howto/tutorial?
Digium forum was of no help and googling didn't return any useful result
too.

Thanks
Enrico


___
-- 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] Zaptel FXO offhook when connected to PSTN

2008-10-20 Thread Tzafrir Cohen
On Mon, Oct 20, 2008 at 04:28:30PM +1300, CSB wrote:
> I installed Trixbox and a TDM400P with 2 FXO and 2 FXS ports and am having
> an annoying issue with the FXO ports. As soon as I plug either one into the
> phone line it's as though the line is disconnected i.e. get disconnected
> tone when trying to dial out, line is busy when dialling in.

Err... it should be exactly the other way around. You should have an
alarm when you disconnect.

What version of zaptel is it?

  cat /sys/modules/zaptel/version

> 
> The CLI shows the following:
> trixbox1*CLI> zap show channel 4
> Channel: 4
> File Descriptor: 18
> Span: 11*
> Extension: 
> Dialing: no
> Context: from-pstn
> Caller ID: 
> Calling TON: 0
> Caller ID name:
> Destroy: 0
> InAlarm: 1
> Signalling Type: FXS Kewlstart
> Radio: 0*
> Owner: 
> Real: 
> Callwait: 
> Threeway: 
> Confno: -1
> Propagated Conference: -1
> Real in conference: 0
> DSP: no1*
> Relax DTMF: no
> Dialing/CallwaitCAS: 0/0
> Default law: ulaw
> Fax Handled: no
> Pulse phone: no
> Echo Cancellation: 128 taps unless TDM bridged, currently OFF Actual
> Confinfo: Num/0, Mode/0x Actual Confmute: No Hookstate (FXS only):
> Onhook
> 
> When plugged in:
> trixbox1*CLI> zap show channel 4
> Channel: 4
> File Descriptor: 18
> Span: 11*
> Extension: 
> Dialing: noI
> Context: from-pstn
> Caller ID: I
> Calling TON: 0
> Caller ID name:
> Destroy: 0
> InAlarm: 0

It wasn't in alarm. Up until 1.4.22 there was no initial check for an
alarm on the channels at startup, hence the alarm status at startup
might be incorrect.

> Signalling Type: FXS Kewlstart
> Radio: 0*
> Owner: 
> Real: 
> Callwait: 
> Threeway: 
> Confno: -1
> Propagated Conference: -1
> Real in conference: 0
> DSP: no1*
> Relax DTMF: no
> Dialing/CallwaitCAS: 0/0
> Default law: ulaw
> Fax Handled: no
> Pulse phone: no
> Echo Cancellation: 128 taps unless TDM bridged, currently OFF Actual
> Confinfo: Num/0, Mode/0x Actual Confmute: No Hookstate (FXS only):
> Offhook
> 

Is this Zaptel 1.4.11?

> When cable plugged in:
> [Oct 20 09:02:56] DEBUG[2359] chan_zap.c: Monitor doohicky got event No more
> alarm on channel 4 [Oct 20 09:02:56] NOTICE[2359] chan_zap.c: Alarm cleared
> on channel 4

"alarm cleared" - no longer in alarm. This should not disconnect a call.
But it should have not been in a call in the first place (though see the
above comment about initial alarm status).

> 
> When cable unplugged:
> [Oct 20 09:04:55] DEBUG[2359] chan_zap.c: Monitor doohicky got event Alarm
> on channel 4 [Oct 20 09:04:55] WARNING[2359] chan_zap.c: Detected alarm on
> channel 4: No Alarm [Oct 20 09:04:55] DEBUG[2359] chan_zap.c: disabled echo
> cancellation on channel 4

Again, exactly the reverse alarm than it should be.

To see the status of alarms: 

  cat /proc/zaptel/1 

If there is 'RED' on a channel, it is in alarm.

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- 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] asterisk setup

2008-10-20 Thread Mike
> What country are you in? This is a truly global marketplace and mailing
> list. We have people from the UK, Ireland, Oztrailia, New Zealand,
> Bolivia, Russia, China, India, Argentina, etc. All over the world, really.
> Saying what country you need the DID/DDI in will narrow it down somewhat.
>

I am in the US. Hope someone here can help.

Gordon, thanks for your email.

___
-- 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] asterisk setup

2008-10-20 Thread randulo
On Mon, Oct 20, 2008 at 8:42 AM, Mike <[EMAIL PROTECTED]> wrote:
> Am new to asterisk pbx systems.

Hi Mike,

Welcome to the wonderful world of asterisk!

> I am trying to figure out what to do, I'll list and folks feel free to
> give feedback and advice.

You don't mention if you have read one of the several books out on
asterisk or whether you are familiar with sources like
http://voip-info.org. If you haven't already, look into the O'Reilly
book:

 http://oreilly.com/catalog/9780596510480/

> --
> 1. setup and install asterisk (1.4.x)  --> DONE
>   -currently configuring sip.conf and extenstion.conf files.
>   -using soft-phone till I find a cheap voip phone(recommendations ??)

Define cheap. I believe for home use there are entry-level phones by
known manufacturers for well under $200, but that's 10 times what a
cheap cordless costs, right? You can get a Grandstream for under $100,
but people will already be groaning at the mention of these. You can
also purchase FXS/FXO cards to connect regular phones to your asterisk
box, among these the Digium TDM400 can accept four modules. Pricey
perhaps, but this avoids buying phones if you already have some. Ypour
budget will depend on how serious your needs are. If you just want an
answering machine to experiment with, cheap iup phones maybe from Ebay
will do it for you. (Ebay is the Devil, I do not recommend it
personally)

> 2. trying to get a DID number
>   -alot of search results, not sure which are reliable, most are
> charging per month usage and some are charging setup charges
>   -also looking for DID provider which will interface with asterisk
> pbx (sip and iax protocols, is that ok? )
>   -Am I missing anything else here?
>   -Are there any providers folks would recommend? Looking for
> affordable and reliable)

There are many SIP providers, but among those that are part of or
support the asterisk community, Junction Networks, Teliax, VoicePulse
Connect loom large. I have had accounts with all of those and find
them to be reasonable in price and service. This stuff is very
subjective, though. Maybe look through the mialing list for references
to those names and other providers.

r

___
-- 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] asterisk setup

2008-10-20 Thread Gordon Henderson
On Mon, 20 Oct 2008, Mike wrote:

> Hi folks,
>
> Am new to asterisk pbx systems.
>
> I am trying to figure out what to do, I'll list and folks feel free to
> give feedback and advice.
>
> MAIN purpose for usage:
> 1.exposure to setup an asterisk box
> 2.get home phone service via VOIP/internet connection.
>
> tasks so far
> --
> 1. setup and install asterisk (1.4.x)  --> DONE

Heh... You'll never be done!

Read the starfish book cover to cover (free online/PDF, or buy a paper 
copy).

Read the Voip-wiki.


>   -currently configuring sip.conf and extenstion.conf files.
>   -using soft-phone till I find a cheap voip phone(recommendations ??)

If you want a cheap VoIP phone look for a Grandstream - BT200 is cheap and 
functional. GXP1200 will give you something with a small display (BT200 is 
numeric only) GXP2000 has a bigger display and more buttons. However holy 
wars have been fought over Grandstream - some people like them, some hate 
them. You get what you pay for and I've deployed 100's of the damn things.

> 2. trying to get a DID number
>   -alot of search results, not sure which are reliable, most are
> charging per month usage and some are charging setup charges
>   -also looking for DID provider which will interface with asterisk
> pbx (sip and iax protocols, is that ok? )
>   -Am I missing anything else here?
>   -Are there any providers folks would recommend? Looking for
> affordable and reliable)

What country are you in? This is a truly global marketplace and mailing 
list. We have people from the UK, Ireland, Oztrailia, New Zealand, 
Bolivia, Russia, China, India, Argentina, etc. All over the world, really. 
Saying what country you need the DID/DDI in will narrow it down somewhat.

Well done so-far and Good luck!

Gordon

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