[asterisk-users] While loop inside recursive calls

2017-03-21 Thread Ethy H. Brito

Hi All

What happens if I, inside of a while/endwhile loop, call recursively a
macro that itself has another while/endwhile loop and calls exitwhile() inside 
the
recursive call?

[macro-recursive]
instance=$ARG1
if instance>3
macroexit
X=1
_var1=""
; recursive loop
while(Dcondition)
_var1=value_${X}
recursive(instance+1)
if var1==""
ExitWhile()
X=X+1
some_Dcondition_changing
bla...
bla...
EndWhile
macroexit

[some_running_context]
; Main loop
while(Zcondition) 
recursive(1)
if (var1=="")
ExitWhile
some_Zcondition_changing
bla...
bla...
endwhile
more_intructions
MacroExit

The problem I see is if I reentry "macro-recursive" a the second time,
Macroexit returns to "more_instructions" at "some_running_context" (just after
the Main Loop endWhile). It should return to 'if (var1=="")' at the previous
"macro-recursive" call.

It is like the second call to "macro-recursive" overwrites the first
"macro-recursive" while/endwhile loop return point, and the second ExitWhile
exits from the while/endwhile at "some_running_context" and not from first
"macro-recursive" instance.

In short: second (and subsequent??) call to macro-recursive is ExitWhile()ing
from "some_running_context" while loop. First call exits ok.

Any directions to share?

Is this explanation too complicated to understand?

Regards

Ethy

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] IMPORT from bridged Local channels not importing.

2016-12-08 Thread Ethy H. Brito
On Tue, 15 Nov 2016 12:21:31 -0200
"Ethy H. Brito"  wrote:

> 
> Hi All
> 
> I have some users that can access outside world telephone number.
> They have external numbers to be reached as well.
> 
> Due to internal policy restrictions, they are not allowed to dial 
> each other internal numbers. I Can't change that.
> 
> When an internal user dials the external number for another internal
> user, I Dial(Local/...) the second user. 
> 
> So I end up with two channels:
>   SIP/origin to Local/dest_ext_num;1
>   and
>   Local/dest_ext_num;2 to SIP/destination
> 
> When the call is hung up (h extension), I need to grab the stats of both 
> legs (SIP/origin and SIP/destination) of the call, so I use:
> 
>   ${RTPAUDIOQOS} 
> 
> to grab the origin leg stats and 
> 
>   Set(MyDESTCH=${CUT(CDR(dstchannel),\;,1)}\;2)
>   Set(DESTCH=${IMPORT(${MyDESTCH},BRIDGEPEER)})
>   Set(STATS=${IMPORT(${DESTCH},CHANNEL(rtpqos,audio,all))})
> 
> to grab the stats for destination leg.
> 
> MyDESTCH is correctly set to "Local/dest_ext_num;2"
> DESTCH receives "SIP/destination"
> But STATS is ""
> 
> What am I missing here?
> Is there a smarter way for grabbing these?
> 
> Another questions: when the call is hung, in which context is "h
> extension" run? Always originator? Always destination? Depends on what? 
> What about in this scenario I describe (four contexts involved)?
> 
> Environment is: asterisk -V
> 
>   Asterisk 11.7.0~dfsg-1ubuntu1 running on Ubuntu 14.04.5 LTS
> 
> 
> Thanx for your time.
> Cheers
> 
> Ethy

Hi All

No suggestions at all??

Cheers

Ethy


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] how are channels numbers assigned

2016-12-08 Thread Ethy H. Brito

Hi All

I have this system here where:

# dahdi_hardware 
pci::07:04.0 wctdm24xxp+  d161:8005 Wildcard TDM410P
pci::07:09.0 wcte11xp+e159:0001 Digium Wildcard TE110P T1/E1 Board

channels are 
0-31 for TE110P
and
32-35 for TDM410P

I want to insert a new TE110P. 
How will these new channels be assigned? 
What is the dahdi_genconf logic for these assignments?

Is there a way to force these assignments to prevent they to change if I
insert/remove any card from the system?

chan_dahdi.conf is a bit confusing to me.
What makes the configuration for one channel be finished and start the
configuration for the next channel?

Would you point me any docs on this matter?

Asterisk is 11.7.0
Dahdi is 2.7.0
Ubuntu 14.04.5 LTS

Cheers

Ethy

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] IMPORT from bridged Local channels not importing.

2016-11-15 Thread Ethy H. Brito

Hi All

I have some users that can access outside world telephone number.
They have external numbers to be reached as well.

Due to internal policy restrictions, they are not allowed to dial 
each other internal numbers. I Can't change that.

When an internal user dials the external number for another internal user, 
I Dial(Local/...) the second user. 

So I end up with two channels:
SIP/origin to Local/dest_ext_num;1
and
Local/dest_ext_num;2 to SIP/destination

When the call is hung up (h extension), I need to grab the stats of both 
legs (SIP/origin and SIP/destination) of the call, so I use:

${RTPAUDIOQOS} 

to grab the origin leg stats and 

Set(MyDESTCH=${CUT(CDR(dstchannel),\;,1)}\;2)
Set(DESTCH=${IMPORT(${MyDESTCH},BRIDGEPEER)})
Set(STATS=${IMPORT(${DESTCH},CHANNEL(rtpqos,audio,all))})

to grab the stats for destination leg.

MyDESTCH is correctly set to "Local/dest_ext_num;2"
DESTCH receives "SIP/destination"
But STATS is ""

What am I missing here?
Is there a smarter way for grabbing these?

Another questions: when the call is hung, in which context is "h extension" 
run? 
Always originator? Always destination? Depends on what? 
What about in this scenario I describe (four contexts involved)?

Environment is: asterisk -V

Asterisk 11.7.0~dfsg-1ubuntu1 running on Ubuntu 14.04.5 LTS


Thanx for your time.
Cheers

Ethy


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] SIP and RTP port and IP addresses

2016-11-10 Thread Ethy H. Brito
On Thu, 10 Nov 2016 00:35:54 +0100
Max Grobecker  wrote:

> Hi Ethy,

Hi Max and All. 

> 
> 
> Am 09.11.2016 um 17:13 schrieb Ethy H. Brito:
> 
> > How are these parameters available from dialplan?
> > 
> > For instance, ${SIPURI} holds the internal "IP:port" if the client is
> > behind NAT. I need the external IP:port  
> 
> 
> You can get the peer's signalling IP address from ${CHANNEL(recvip)} and the
> RTP address with ${CHANNEL(rtpsource)} resp. ${CHANNEL(rtpdest)}. If you need
> more information (like the codecs used) you can find other channel variables
> on https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL

H.

${CHANNEL(rtpsource)} is always returning something like "0.0.0.0:p" where
p=[0-9]

and ${CHANNEL(rtpdest)} returns the internal (not accessible) IP addr if the
caller is behind NAT, therefore, not what I need.

Wouldn't these two variables have correct values only after the callee answers
the call??

> 
> Please note that, if you have not disabled re-invites, the RTP address may
> change while the call is running.

Interesting observation.

Thanx

Ethy

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


[asterisk-users] SIP and RTP port and IP addresses

2016-11-09 Thread Ethy H. Brito

Hi all

I'd like to log the client IP addr and port used for SIP and RTP *during* in a
call.

The IPs must be the real source IPs (internet accessible).

How are these parameters available from dialplan?

For instance, ${SIPURI} holds the internal "IP:port" if the client is behind 
NAT. 
I need the external IP:port

Regards

Ethy

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

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


Re: [asterisk-users] Lost outgoing SIP packets

2016-03-31 Thread Ethy H. Brito
On Thu, 31 Mar 2016 14:41:14 +0200
Roel van Meer  wrote:

> Dovid Bender writes:
> 
> > Just guessing I would verify that the out of : iptables -L -nv
> > Shows no dropped packets, try disabling selinux as well as look at the  
> > limits of the asterisk pid (cat /proc//limits). I know the  
> > defualt for rhel is 1024 which was never enough for us.
> 
> Thanks for the hints. Selinux is disabled, there is no outgoing firewall  
> (anymore) on this box, and the limits seems fine: 200637 open files.
> 
> 
> Ifconfig output looks like this:
> 
> root@communiceer:~# ifconfig eth1
> eth1  Link encap:Ethernet  HWaddr b4:99:ba:a9:3e:e5
>   inet addr:x.x.x.x  Bcast:x.x.x.127  Mask:255.255.255.128
>   UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>   RX packets:5967421 errors:0 dropped:21425 overruns:0 frame:0

Did you notice this ^ value???

Should not be a problem since you are complaining abou TX packets, not RX,
but...

does dmesg say anything about this?

Cheers

Ethy




>   TX packets:6085933 errors:0 dropped:0 overruns:0 carrier:0
>   collisions:0 txqueuelen:1000
>   RX bytes:1223605260 (1.1 GiB)  TX bytes:2096293903 (1.9 GiB)
>   Interrupt:17 Memory:fbfe-fc00
> 
> I was thinking maybe there's a problem with the transmit queue, but 1000 is  
> the default value for txqueuelen and I have never needed to change it.
> 
> 
> I have the default queueing discipline:
> 
> root@communiceer:~# tc qdisc show dev eth1
> qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1
> 1 1 1
> 
> 
> The output of ethtool also looks good:
> 
> root@communiceer:~# ethtool eth1
> Settings for eth1:
> Supported ports: [ TP ]
> Supported link modes:   10baseT/Half 10baseT/Full
> 100baseT/Half 100baseT/Full
> 1000baseT/Full
> Supports auto-negotiation: Yes
> Advertised link modes:  10baseT/Half 10baseT/Full
> 100baseT/Half 100baseT/Full
> 1000baseT/Full
> Advertised pause frame use: No
> Advertised auto-negotiation: Yes
> Speed: 1000Mb/s
> Duplex: Full
> Port: Twisted Pair
> PHYAD: 1
> Transceiver: internal
> Auto-negotiation: on
> MDI-X: on
> Supports Wake-on: pumbg
> Wake-on: g
> Current message level: 0x0007 (7)
>drv probe link
> Link detected: yes
> 
> 
> And the nic stats also look good:
> 
> root@communiceer:~# ethtool -S eth1
> NIC statistics:
>  rx_packets: 6071960
>  tx_packets: 6189424
>  rx_bytes: 1244435132
>  tx_bytes: 2117335817
>  rx_broadcast: 293751
>  tx_broadcast: 193
>  rx_multicast: 29827
>  tx_multicast: 0
>  rx_errors: 0
>  tx_errors: 0
>  tx_dropped: 0
>  multicast: 29827
>  collisions: 0
>  rx_length_errors: 0
>  rx_over_errors: 0
>  rx_crc_errors: 0
>  rx_frame_errors: 0
>  rx_no_buffer_count: 0
>  rx_missed_errors: 0
>  tx_aborted_errors: 0
>  tx_carrier_errors: 0
>  tx_fifo_errors: 0
>  tx_heartbeat_errors: 0
>  tx_window_errors: 0
>  tx_abort_late_coll: 0
>  tx_deferred_ok: 0
>  tx_single_coll_ok: 0
>  tx_multi_coll_ok: 0
>  tx_timeout_count: 0
>  tx_restart_queue: 0
>  rx_long_length_errors: 0
>  rx_short_length_errors: 0
>  rx_align_errors: 0
>  tx_tcp_seg_good: 37559
>  tx_tcp_seg_failed: 0
>  rx_flow_control_xon: 0
>  rx_flow_control_xoff: 0
>  tx_flow_control_xon: 0
>  tx_flow_control_xoff: 0
>  rx_csum_offload_good: 3447739
>  rx_csum_offload_errors: 2
>  rx_header_split: 0
>  alloc_rx_buff_failed: 0
>  tx_smbus: 0
>  rx_smbus: 0
>  dropped_smbus: 0
>  rx_dma_failed: 0
>  tx_dma_failed: 0
>  rx_hwtstamp_cleared: 0
>  uncorr_ecc_errors: 0
>  corr_ecc_errors: 0
>  tx_hwtstamp_timeouts: 0
> 
> 
> So I really don't know where to look elsewhere..
> 
> Thanks,
> 
> Roel
> 
> 
> 
> >
> > -Original Message-
> > From: Roel van Meer 
> > Date: Thu, 31 Mar 2016 14:10:48
> > To: ; Asterisk Users Mailing List - Non-Commercial  
> > Discussion
> > Subject: Re: [asterisk-users] Lost outgoing SIP packets
> >
> > Dovid Bender writes:
> >
> > > The tcpdump that you are running is on the Asterisk box or via port
> > > mirroring?
> >
> > It's on the asterisk box itself.
> >
> > I've already replaced the network card - no change.
> >
> > Thanks,
> >
> > Roel
> >
> >
> > > Regards,
> > >
> > > Dovid
> > >
> > > -Original Message-
> > > From: Roel van Meer 
> > > Sender: asterisk-users-bounces@lists.digium.comDate: Thu, 31 Mar 2016
> > > 13:34:51
> > > To: 
> > > Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
> > >  
> > > Subject: [asterisk-users] Lost outgoing S

Re: [asterisk-users] Lost outgoing SIP packets

2016-03-31 Thread Ethy H. Brito
On Thu, 31 Mar 2016 15:29:07 +0200
Roel van Meer  wrote:

> Ethy H. Brito writes:
> 
> > Just guessing: do you have conntrack enabled?
> 
> Yes, I do.
> 
> > If not, "modprobe nf_conntrack_netlink" (you can remove it and its  
> > dependencies
> > later)
> >
> > What are the outputs of
> > sysctl net.netfilter.nf_conntrack_count
> > and
> > sysctl net.netfilter.nf_conntrack_max
> >
> > when the problem shows up?
> 
> Hm, good one. I'll monitor them. Currently the values are:
> 
> root@communiceer:~# sysctl net.netfilter.nf_conntrack_max
> net.netfilter.nf_conntrack_max = 65536
> 
> root@communiceer:~# sysctl net.netfilter.nf_conntrack_count
> net.netfilter.nf_conntrack_count = 245
> 
> I'll report back if the count comes anywhere near maximum.
> 
> Are there any other limits like these that might play a role here?

I think nf_conntrack_count is the one you should be aware of. 
But you can play with the timeouts in net.ipv4.netfilter.ip_conntrack_* if you 
experience any problems.

Cheers

Ethy

> 
> Thanks,
> 
> Roel
> 
> 
> > cheers
> >
> > Ethy
> >
> > On Thu, 31 Mar 2016 12:17:12 +
> > "Dovid Bender"  wrote:
> >
> > > Just guessing I would verify that the out of : iptables -L -nv
> > > Shows no dropped packets, try disabling selinux as well as look at the  
> > limits
> > > of the asterisk pid (cat /proc//limits). I know the
> > > defualt  
> > for
> > > rhel is 1024 which was never enough for us.
> > >
> > >
> > > Regards,
> > >
> > > Dovid
> > >
> > > -Original Message-
> > > From: Roel van Meer 
> > > Date: Thu, 31 Mar 2016 14:10:48
> > > To: ; Asterisk Users Mailing List - Non-Commercial
> > > Discussion Subject: Re: [asterisk-users]
> > > Lost outgoing SIP packets
> > >
> > > Dovid Bender writes:
> > >
> > > > The tcpdump that you are running is on the Asterisk box or via port
> > > > mirroring?
> > >
> > > It's on the asterisk box itself.
> > >
> > > I've already replaced the network card - no change.
> > >
> > > Thanks,
> > >
> > > Roel
> > >
> > >
> > > > Regards,
> > > >
> > > > Dovid
> > > >
> > > > -Original Message-
> > > > From: Roel van Meer 
> > > > Sender: asterisk-users-bounces@lists.digium.comDate: Thu, 31 Mar 2016
> > > > 13:34:51
> > > > To: 
> > > > Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
> > > >  
> > > > Subject: [asterisk-users] Lost outgoing SIP packets
> > > >
> > > > Hi list!
> > > >
> > > > I have a problem where SIP packets sent by Asterisk do not hit the
> > > > wire,  
> > and
> > > > I don't know what could cause this.
> > > >
> > > > I'm running Asterisk 1.8.28_cert5 with full SIP debug. At the same
> > > > time,  
> > I'm
> > > > doing a tcpdump of the traffic on the network interface. I can see in
> > > > the SIP debug log that asterisk is sending packets. Most of the time, I
> > > > can  
> > see
> > > > those packets in the tcpdump, as you would expect.
> > > > However, sometimes Asterisk sends a packet that *does not show up* in
> > > > the tcpdump. Asterisk then does several retransmits (that also don't
> > > > show  
> > up).
> > > > The next packet that is not a retransmit does show up again.
> > > >
> > > > This causes Asterisk to log the peer it was sending packets to  
> > temporarily
> > > > as Lagged or unreachable.
> > > >
> > > > There is no outgoing firewall on this box.
> > > >
> > > > Could anyone give me some pointers where to look?
> > > >
> > > > If Asterisk logs "VERBOSE[13019] chan_sip.c: Reliably Transmitting
> > > > (NAT)  
> > to
> > > > x.x.x.x:" you would expect to see that packet in a tcpdump trace, right?
> > > > What could cause this not to be so? Are there network statistics I could
> > > > look at? Is there a counter in /proc or /sys for problems with sending
> > > > packets? Anything?
> > > >
> > > > If more information is necessary please do let me know.
> > &g

Re: [asterisk-users] Lost outgoing SIP packets

2016-03-31 Thread Ethy H. Brito

Hi Roel

Just guessing: do you have conntrack enabled?
If not, "modprobe nf_conntrack_netlink" (you can remove it and its dependencies
later)

What are the outputs of 
sysctl net.netfilter.nf_conntrack_count
and
sysctl net.netfilter.nf_conntrack_max

when the problem shows up?

cheers

Ethy

On Thu, 31 Mar 2016 12:17:12 +
"Dovid Bender"  wrote:

> Just guessing I would verify that the out of : iptables -L -nv
> Shows no dropped packets, try disabling selinux as well as look at the limits
> of the asterisk pid (cat /proc//limits). I know the defualt for
> rhel is 1024 which was never enough for us.
> 
> 
> Regards,
> 
> Dovid
> 
> -Original Message-
> From: Roel van Meer 
> Date: Thu, 31 Mar 2016 14:10:48 
> To: ; Asterisk Users Mailing List - Non-Commercial
> Discussion Subject: Re: [asterisk-users]
> Lost outgoing SIP packets
> 
> Dovid Bender writes:
> 
> > The tcpdump that you are running is on the Asterisk box or via port  
> > mirroring?
> 
> It's on the asterisk box itself.
> 
> I've already replaced the network card - no change.
> 
> Thanks,
> 
> Roel
> 
> 
> > Regards,
> >
> > Dovid
> >
> > -Original Message-
> > From: Roel van Meer 
> > Sender: asterisk-users-bounces@lists.digium.comDate: Thu, 31 Mar 2016  
> > 13:34:51
> > To: 
> > Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion
> >  
> > Subject: [asterisk-users] Lost outgoing SIP packets
> >
> > Hi list!
> >
> > I have a problem where SIP packets sent by Asterisk do not hit the wire, and
> > I don't know what could cause this.
> >
> > I'm running Asterisk 1.8.28_cert5 with full SIP debug. At the same time, I'm
> > doing a tcpdump of the traffic on the network interface. I can see in the
> > SIP debug log that asterisk is sending packets. Most of the time, I can see
> > those packets in the tcpdump, as you would expect.
> > However, sometimes Asterisk sends a packet that *does not show up* in the
> > tcpdump. Asterisk then does several retransmits (that also don't show up).
> > The next packet that is not a retransmit does show up again.
> >
> > This causes Asterisk to log the peer it was sending packets to temporarily
> > as Lagged or unreachable.
> >
> > There is no outgoing firewall on this box.
> >
> > Could anyone give me some pointers where to look?
> >
> > If Asterisk logs "VERBOSE[13019] chan_sip.c: Reliably Transmitting (NAT) to
> > x.x.x.x:" you would expect to see that packet in a tcpdump trace, right?
> > What could cause this not to be so? Are there network statistics I could
> > look at? Is there a counter in /proc or /sys for problems with sending
> > packets? Anything?
> >
> > If more information is necessary please do let me know.
> >
> > Thanks a lot in advance,
> >
> > Roel
> >
> > --
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> > --
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users

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

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


Re: [asterisk-users] Nube question: where is chan_sip.so?

2016-02-07 Thread Ethy H. Brito
On Sun, 7 Feb 2016 14:55:26 +
Peter Wallis  wrote:

> Thanks all for the guidance and offers of help.  Ethy was on the money -
> I had installed asterisk from source and been able to run it, but had not
> installed "asterisk-modules"
> 
> I now have chan_alsa.so and a chan_sip.so  (no res_pjsip.???) where I
> would expect them to be.

Well, I cannot say for sure because I've never installed it from source.

But maybe
https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject
is in handy.

Just a shot in the dark.

cheers and good luck

Ethy


> 
> P
> 
> On 7 February 2016 at 10:29, Peter Wallis  wrote:
> 
> > I am having real trouble getting started.  A definitive "hello world"
> > is certainly missing from the official site and the ones out there are
> > dated or broken.
> >
> > I am beginning to think something went wrong with the install.  It was
> > a fresh install of an  Ubuntu server, and a fresh install of 13.7.0 -
> > Should be Okay no?
> >
> > A question.  Am I expecting to find chan_sip.so in
> > /usr/lib/asterisk/modules/ ?
> >
> > If so, it is not there - no idea how I would have lost it.  We do have
> > a new cat - perhaps she ate it.
> >
> > If I ought not expect to find it there, why does
> > [modules]
> > require =chan_sip.so
> > and/or
> > require = res_pjsip.so
> > cause asterisk to fail to start? The documentation makes no mention of
> > an alternate method of loading modules.
> >
> > best wishes,
> >
> > P
> >
> >
> >

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

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


Re: [asterisk-users] Nube question: where is chan_sip.so?

2016-02-07 Thread Ethy H. Brito
On Sun, 7 Feb 2016 10:29:11 +
Peter Wallis  wrote:

> I am having real trouble getting started.  A definitive "hello world" is
> certainly missing from the official site and the ones out there are dated
> or broken.
> 
> I am beginning to think something went wrong with the install.  It was a
> fresh install of an  Ubuntu server, and a fresh install of 13.7.0 -
> Should be Okay no?
> 
> A question.  Am I expecting to find chan_sip.so in
> /usr/lib/asterisk/modules/ ?
> 
> If so, it is not there - no idea how I would have lost it.  We do have a
> new cat - perhaps she ate it.
> 
> If I ought not expect to find it there, why does
> [modules]
> require =chan_sip.so
> and/or
> require = res_pjsip.so
> cause asterisk to fail to start? The documentation makes no mention of an
> alternate method of loading modules.

Don't know about asterisk 13, but in asterisk 11 you have to install 
asterisk-modules.
This should be done automatically.

Do you have asterisk-modules or equivalent installed?

What does "dpkg -L asterisk-modules | grep chan" say about chan_sip.so? 
(if this is the correct package name, of course)

Cheers

Ethy


> 
> best wishes,
> 
> P

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

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


Re: [asterisk-users] NAME/USERNAME conflict

2016-01-21 Thread Ethy H. Brito
On Thu, 21 Jan 2016 19:36:42 -0500
kazabe  wrote:

> hi.
> 
> thanks for the recommendation.  i discard that (and delete and create
> again the ext with random generated password), and the issue continue.

Sorry. I meant username/password you set on both terminals, not in asterisk's 
'conf' files.

Also check if the IP addresses on the terminals are really those you wrote here 
and
the ether addresses of both if they are on the same ethernet segment
that asterisk is with 
arp -an | grep '192.168.11.\(100\|160\)'

Can you "ping" them from asterisk?

What are the outputs of
sip show peer 100
and 
sip show peer 109
?

Note that your 'sip show peers' shows only one registered terminal. It
means, in your case, that asterisk may be getting the same registration
credentials from two different sources (IPs).

Cheers

Ethy


> El ene 21, 2016 10:59 AM, "Ethy H. Brito" 
> escribió:
> 
> > On Thu, 21 Jan 2016 10:49:21 -0500
> > kazabe  wrote:
> >
> > > Hi.
> > >
> > > we are experimenting a strange issue in our PBX.
> > >
> > > By example: if we dial to the 100, the call is answered in 199.  We
> > > dont have any redirection for that, but the cli show the same issue
> > > when
> > request
> > > show peers.  Aditionally, the user 100 use the ip address
> > > 192.168.11.100, and the cli show connected the user from
> > > 192.168.11.160 (that ip is assigned to the user 199)
> > >
> > > PBX*CLI> sip show peers
> > > Name/username HostDyn
> > > Forcerport ComediaACL Port Status  Description
> > > 100/199   192.168.11.160
> > > D  Yes Yes A  5060 OK (30 ms)
> > >
> > >
> > > I check the sip 100 and (aparently) show all normal
> > >
> > >
> > > PBX*CLI> sip show peer 100
> > >
> > >
> > >   * Name   : 100
> > >   Description  :
> > >   Secret   : 
> > >   MD5Secret: 
> > >   Remote Secret: 
> > >   Context  : MAIN
> > >   Record On feature : automon
> > >   Record Off feature : automon
> > >   Subscr.Cont. : 
> > >   Language :
> > >   Tonezone : 
> > >   AMA flags: Unknown
> > >   Transfer mode: open
> > >   CallingPres  : Presentation Allowed, Not Screened
> > >   Callgroup: 1
> > >   Pickupgroup  : 1
> > >   Named Callgr :
> > >   Nam. Pickupgr:
> > >   MOH Suggest  :
> > >   Mailbox  : 100@device
> > >   VM Extension : *97
> > >   LastMsgsSent : 0/0
> > >   Call limit   : 2147483647
> > >   Max forwards : 0
> > >   Dynamic  : Yes
> > >   Callerid : "JDOE" <100>
> > >   MaxCallBR: 384 kbps
> > >   Expire   : 2680
> > >   Insecure : no
> > >   Force rport  : Yes
> > >   Symmetric RTP: Yes
> > >   ACL  : Yes
> > >   DirectMedACL : No
> > >   T.38 support : No
> > >   T.38 EC mode : Unknown
> > >   T.38 MaxDtgrm: 4294967295
> > >   DirectMedia  : No
> > >   PromiscRedir : No
> > >   User=Phone   : No
> > >   Video Support: No
> > >   Text Support : No
> > >   Ign SDP ver  : No
> > >   Trust RPID   : Yes
> > >   Send RPID: No
> > >   TrustIDOutbnd: Legacy
> > >   Subscriptions: Yes
> > >   Overlap dial : Yes
> > >   DTMFmode : rfc2833
> > >   Timer T1 : 500
> > >   Timer B  : 32000
> > >   ToHost   :
> > >   Addr->IP : 192.168.11.160:5060
> > >   Defaddr->IP  : (null)
> > >   Prim.Transp. : UDP
> > >   Allowed.Trsp : UDP
> > >   Def. Username: 199
> > >   SIP Options  : path replaces replace timer
> > >   Codecs   : (ulaw)
> > >   Codec Order  : (ulaw:20)
> > >   Auto-Framing : No
> > >   Status   : OK (28 ms)
> > >   Useragent: Grandstream GXP2000 1.2.5.3
> > >   Reg. Contact : sip:101@192.168.11.160:5060;transport=udp
> > >   Qualify Freq : 6 ms
> > >   Keepalive: 0 ms
> > >   Sess-Timers  : Accept
> > >   Sess-Refresh : uas
> > >   Sess-Expires : 1800 secs
> > >   Min-Sess : 90 secs
> > >   RTP Engine   : asterisk
> > >   Parkinglot   :
> > >   Use Reason   : No
> > >   Encryption   : No
> > >
> > > W

Re: [asterisk-users] NAME/USERNAME conflict

2016-01-21 Thread Ethy H. Brito
On Thu, 21 Jan 2016 10:49:21 -0500
kazabe  wrote:

> Hi.
> 
> we are experimenting a strange issue in our PBX.
> 
> By example: if we dial to the 100, the call is answered in 199.  We dont
> have any redirection for that, but the cli show the same issue when request
> show peers.  Aditionally, the user 100 use the ip address 192.168.11.100,
> and the cli show connected the user from 192.168.11.160 (that ip is
> assigned to the user 199)
> 
> PBX*CLI> sip show peers
> Name/username HostDyn
> Forcerport ComediaACL Port Status  Description
> 100/199   192.168.11.160   D  Yes
>  Yes A  5060 OK (30 ms)
> 
> 
> I check the sip 100 and (aparently) show all normal
> 
> 
> PBX*CLI> sip show peer 100
> 
> 
>   * Name   : 100
>   Description  :
>   Secret   : 
>   MD5Secret: 
>   Remote Secret: 
>   Context  : MAIN
>   Record On feature : automon
>   Record Off feature : automon
>   Subscr.Cont. : 
>   Language :
>   Tonezone : 
>   AMA flags: Unknown
>   Transfer mode: open
>   CallingPres  : Presentation Allowed, Not Screened
>   Callgroup: 1
>   Pickupgroup  : 1
>   Named Callgr :
>   Nam. Pickupgr:
>   MOH Suggest  :
>   Mailbox  : 100@device
>   VM Extension : *97
>   LastMsgsSent : 0/0
>   Call limit   : 2147483647
>   Max forwards : 0
>   Dynamic  : Yes
>   Callerid : "JDOE" <100>
>   MaxCallBR: 384 kbps
>   Expire   : 2680
>   Insecure : no
>   Force rport  : Yes
>   Symmetric RTP: Yes
>   ACL  : Yes
>   DirectMedACL : No
>   T.38 support : No
>   T.38 EC mode : Unknown
>   T.38 MaxDtgrm: 4294967295
>   DirectMedia  : No
>   PromiscRedir : No
>   User=Phone   : No
>   Video Support: No
>   Text Support : No
>   Ign SDP ver  : No
>   Trust RPID   : Yes
>   Send RPID: No
>   TrustIDOutbnd: Legacy
>   Subscriptions: Yes
>   Overlap dial : Yes
>   DTMFmode : rfc2833
>   Timer T1 : 500
>   Timer B  : 32000
>   ToHost   :
>   Addr->IP : 192.168.11.160:5060
>   Defaddr->IP  : (null)
>   Prim.Transp. : UDP
>   Allowed.Trsp : UDP
>   Def. Username: 199
>   SIP Options  : path replaces replace timer
>   Codecs   : (ulaw)
>   Codec Order  : (ulaw:20)
>   Auto-Framing : No
>   Status   : OK (28 ms)
>   Useragent: Grandstream GXP2000 1.2.5.3
>   Reg. Contact : sip:101@192.168.11.160:5060;transport=udp
>   Qualify Freq : 6 ms
>   Keepalive: 0 ms
>   Sess-Timers  : Accept
>   Sess-Refresh : uas
>   Sess-Expires : 1800 secs
>   Min-Sess : 90 secs
>   RTP Engine   : asterisk
>   Parkinglot   :
>   Use Reason   : No
>   Encryption   : No
> 
> What can cause that?  i delete both extensions and create again and the
> problem continue.  Adn others extensions are showing the same issue (call
> to another extension and answer at 199).
> 
> thanks in advance

Hi

Check if the extensions 100 and 109 aren't using the same username to register 
themselves.

Cheers

Ethy




-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] how to flush user input before READ()

2016-01-19 Thread Ethy H. Brito
On Mon, 18 Jan 2016 16:09:17 -0200
"Ethy H. Brito"  wrote:

> On Mon, 18 Jan 2016 09:38:52 -0800 (PST)
> Steve Edwards  wrote:
> 
> > On Mon, 18 Jan 2016, Ethy H. Brito wrote:
> > 
> > >> how to flush user input before READ()?
> > 
> > How about a read() to a dummy variable with a 1 second timeout to consume
> > the octothorpe and password?
> 
> 
> It is an odd solution but i'll give it a try.

To close the thread, the solution did "flush" the input as a side effect of the
short timeout.

Thank you mr. Edwards.

Cheers

Ethy


> 
> Thanx;
> 
> Ethy
> 
> 
> > 
> > -- 
> > Thanks in advance,
> > -
> > Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
> > 
> > -- 
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >http://www.asterisk.org/hello
> > 
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> -- 
> 
> Ethy H. Brito /"\
> InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
> +55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
> S.J.Campos - Brasil   / \ 
>  
> PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] how to flush user input before READ()

2016-01-18 Thread Ethy H. Brito
On Mon, 18 Jan 2016 09:38:52 -0800 (PST)
Steve Edwards  wrote:

> On Mon, 18 Jan 2016, Ethy H. Brito wrote:
> 
> >> how to flush user input before READ()?
> 
> How about a read() to a dummy variable with a 1 second timeout to consume
> the octothorpe and password?


It is an odd solution but i'll give it a try.

Thanx;

Ethy


> 
> -- 
> Thanks in advance,
> -
> Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] how to flush user input before READ()

2016-01-18 Thread Ethy H. Brito

Hi All.

No one ? Anyone?

Cheers

Ethy


On Fri, 15 Jan 2016 15:37:51 -0200
"Ethy H. Brito"  wrote:

> 
> Hi
> 
> how to flush user input before READ()?
> 
> I wrote a small script to ask for user password before granting access to
> outside, but some telefones memorize the full user input, including "#".
> 
> So, when the user press redial, for instance 5556789#123, asterisk accepts the
> number and the password "123" and gives access to the outside word to whomever
> redials that terminal.
> 
> Any hints?
> 
> Cheers
> 
> Ethy
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


[asterisk-users] how to flush user input before READ()

2016-01-15 Thread Ethy H. Brito

Hi

how to flush user input before READ()?

I wrote a small script to ask for user password before granting access to
outside, but some telefones memorize the full user input, including "#".

So, when the user press redial, for instance 5556789#123, asterisk accepts the
number and the password "123" and gives access to the outside word to whomever
redials that terminal.

Any hints?

Cheers

Ethy

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

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


Re: [asterisk-users] endwhile jumping out of macro

2015-11-30 Thread Ethy H. Brito
On Mon, 30 Nov 2015 09:40:50 -0600
Matthew Jordan  wrote:

> On Sat, Nov 28, 2015 at 7:14 AM, Ethy H. Brito 
> wrote:
> 
> >
> > Hi
> >
> > I have a 3 level nested while-endwhile loop in a macro that when the
> > execution reaches endwhile, it is jumping out to the While at the caller
> > macro.
> >
> > It shouldn't since the are instructions after the endwhile.
> >
> > -- Executing [s@macro-call-from-outside:72]
> > EndWhile("DAHDI/i1/1234567-4a7f", "") in new stack
> >   == Channel 'DAHDI/i1/1234567-4a7f' jumping out of macro
> > 'call-from-outside'
> > -- Executing [s@macro-recurse_check_redirect_not_mailbox:7]
> > While("DAHDI/i1/1234567-4a7f", "1") in new stack
> >
> > I checked the while-endwhile balance and it seems ok.
> > I also checked if I GoTo() outside the loop. I don't.
> >
> > Macroexit is executed inside the while-endwhile loop in certain cases
> > exiting some inner loop.
> >
> > Could MacroExiting inside a while loop cause this lost of balance?
> >
> >
> Yes it could. A While loop should be terminated with an EndWhile.

I've already suspected that. 
I did some changes in the code. It is now running smooth.

BTW, is there a "breakwhile" or something like that, that jumps out of a
while-endwhile loop? Just like the "C" break command.

> 
> Both the While application as well as the Macro application attempt to
> control the PBX flow while a channel is executing within them. Terminating
> an outer container of PBX flow without properly terminating an inner one
> can inbalance the stack.
> 
> And just as a reminder, Macros are deprecated. They tend to have odd side
> effects at times, and overly nesting Macros can result in a crash. You
> should consider switching to subroutines.

Can you please point me some good tutorial on converting Macros to subroutines?
Or on subroutines operation themselves?

Regards

Ethy


> 
> Matt
> 

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

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


[asterisk-users] endwhile jumping out of macro

2015-11-28 Thread Ethy H. Brito

Hi

I have a 3 level nested while-endwhile loop in a macro that when the
execution reaches endwhile, it is jumping out to the While at the caller
macro.

It shouldn't since the are instructions after the endwhile.

-- Executing [s@macro-call-from-outside:72] 
EndWhile("DAHDI/i1/1234567-4a7f", "") in new stack
  == Channel 'DAHDI/i1/1234567-4a7f' jumping out of macro 'call-from-outside'
-- Executing [s@macro-recurse_check_redirect_not_mailbox:7]
While("DAHDI/i1/1234567-4a7f", "1") in new stack

I checked the while-endwhile balance and it seems ok.
I also checked if I GoTo() outside the loop. I don't.

Macroexit is executed inside the while-endwhile loop in certain cases
exiting some inner loop.

Could MacroExiting inside a while loop cause this lost of balance?

Regards

Ethy

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

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


Re: [asterisk-users] subscriber state before dial

2015-11-24 Thread Ethy H. Brito
On Tue, 24 Nov 2015 12:39:01 +
Barry Flanagan  wrote:

> On 24 November 2015 at 12:20, Ethy H. Brito  wrote:
> 
> >
> > Hi All
> >
> > After a Dial() I get:
> >
> > WARNING[7964][C-75a8]: app_dial.c:2437 dial_exec_full: Unable to create
> > channel of type 'SIP' (cause 20 - Subscriber absent)
> >
> > if the subscriber is not registered.
> >
> > Is there a way from dialplan to know, *before* Dial(), if a destination
> > Subscriber is
> > a) not registered or
> > b) busy ?
> >
> > I need to redirect a call to some other Subscriber if (s)he is not there
> > like this: Dial(SIP/1&SIP/2&SIP/3).
> > So if "2" is not registered (or is busy) then Dial(SIP/1&SIP/5&SIP/3).
> >
> >
> Perhaps CHANISAVAIL will do what you need:
> http://www.voip-info.org/wiki/view/Asterisk+cmd+ChanIsAvail
> 
> Hope this helps.

Thank you. 

I'll give it a try and let you know.

cheers

Ethy

> 
> -Barry Flanagan


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] very long line in extensions.conf

2015-11-24 Thread Ethy H. Brito
On Sat, 21 Nov 2015 09:48:51 -0200
"Ethy H. Brito"  wrote:

> 
> Hi
> 
> Who to split a very long line in extension.conf?
> 
> Something like:
>   same => n,very long sequence \
>   of a binary expression inside a \
>   gotoif test

Hi All

Any answer to this?

Not even a "not possible" ?

Regards

Ethy



> 
> Cheers
> 
> Ethy
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


[asterisk-users] subscriber state before dial

2015-11-24 Thread Ethy H. Brito

Hi All

After a Dial() I get:

WARNING[7964][C-75a8]: app_dial.c:2437 dial_exec_full: Unable to create
channel of type 'SIP' (cause 20 - Subscriber absent)

if the subscriber is not registered.

Is there a way from dialplan to know, *before* Dial(), if a destination
Subscriber is
a) not registered or
b) busy ?

I need to redirect a call to some other Subscriber if (s)he is not there like 
this: Dial(SIP/1&SIP/2&SIP/3).
So if "2" is not registered (or is busy) then Dial(SIP/1&SIP/5&SIP/3).

Regards

-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


[asterisk-users] very long line in extensions.conf

2015-11-21 Thread Ethy H. Brito

Hi

Who to split a very long line in extension.conf?

Something like:
same => n,very long sequence \
of a binary expression inside a \
gotoif test

Cheers

Ethy

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

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


Re: [asterisk-users] oslec echo cancellation

2015-10-22 Thread Ethy H. Brito
On Thu, 22 Oct 2015 17:12:46 +0300
Tzafrir Cohen  wrote:

> On Thu, Oct 22, 2015 at 11:46:38AM -0200, Ethy H. Brito wrote:
> > On Thu, 22 Oct 2015 15:06:59 +0300
> > Tzafrir Cohen  wrote:
> > 
> > > On Wed, Oct 21, 2015 at 01:33:27PM -0200, Ethy H. Brito wrote:
> > > > 
> > > > Hi
> > > > 
> > > > Who should insert dahdi_echocan_oslec.ko module in Ubuntu 14.04?
> > > 
> > > dahdi_echocan_oslec should be built by default. What you may miss is the
> > > 'echo.ko' (OSLEC) kernel module.
> > 
> > Ooopss.
> > 
> > I did not make myself clear.
> > 
> > All modules are in place and working  - *if* I "modprobe" them manually.
> > 
> > The problem is "service dahdi start" does not load echo+dahdi_echocan_oslec.
> > 
> > I have a production system that does it. I just do not know how.
> > 
> > After copying this system to another machine and upgrade it (apt-get
> > dist-upgrade), echo+dahdi_echocan_oslec does not get inserted anymore and I
> > am wondering why.
> 
> The echo canceller modules get loaded automatically when needed: if you
> have the line 'echocanceller=foo,12' in /etc/dahdi/system.conf and run
> dahdi_cfg, dahdi_cfg will attempt to configure the echo canceller 'foo'
> for channel 12. The DAHDI core (kernel code) will notice it has no such
> echo canceller and try to load a module caller 'dahdi_echocan_foo'.

I do have a bunch of lines like these:
echocanceller=oslec,1-15,17-31
echocanceller=oslec,32
echocanceller=oslec,33

May the problem be that in this copy we do not have the cards installed?

Quit odd choice dahdi_cfg made if this is the case, since "service dahdi start" 
installed the drivers for these same inexistent cards!

> 
> So, what do you have in /etc/dahdi/system.conf ? What is the output of
> lsdahdi?

Nothing since the cards are installed inside the production system.

Ethy




> 
> -- 
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] oslec echo cancellation

2015-10-22 Thread Ethy H. Brito
On Thu, 22 Oct 2015 15:06:59 +0300
Tzafrir Cohen  wrote:

> On Wed, Oct 21, 2015 at 01:33:27PM -0200, Ethy H. Brito wrote:
> > 
> > Hi
> > 
> > Who should insert dahdi_echocan_oslec.ko module in Ubuntu 14.04?
> 
> dahdi_echocan_oslec should be built by default. What you may miss is the
> 'echo.ko' (OSLEC) kernel module.

Ooopss.

I did not make myself clear.

All modules are in place and working  - *if* I "modprobe" them manually.

The problem is "service dahdi start" does not load echo+dahdi_echocan_oslec.

I have a production system that does it. I just do not know how.

After copying this system to another machine and upgrade it (apt-get
dist-upgrade), echo+dahdi_echocan_oslec does not get inserted anymore and I am
wondering why.

I intend to upgrade the production system tomorrow night and this "bug" is
haunting me.

Regards

Ethy


> 
> Try:
> 
>   /sbin/modinfo echo
> 
> Do you have it available?
> 
> The https://notabug.org/tzafrir/dahdi-linux-extra repository is where I
> maintain a copy of DAHDI with OSLEC and from it I create the OSLEC patch
> for the DAHDI package in Debian.
> 
> -- 
>Tzafrir Cohen
> icq#16849755  jabber:tzafrir.co...@xorcom.com
> +972-50-7952406   mailto:tzafrir.co...@xorcom.com
> http://www.xorcom.com

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

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


[asterisk-users] oslec echo cancellation

2015-10-21 Thread Ethy H. Brito

Hi

Who should insert dahdi_echocan_oslec.ko module in Ubuntu 14.04?

dahdi start/stop service?

I have a test installation that is not launching it when asterisk/dahdi starts.

Clues?

Regards

Ethy

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

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


Re: [asterisk-users] asterisk core dumped after UBUNTU 14.04 dist-upgrade

2015-10-20 Thread Ethy H. Brito
On Tue, 20 Oct 2015 13:23:42 -0500
Cisco Tech  wrote:

> Out of curiosity why did you perform an upgrade to ubuntu?  Where you moving
> from a 32bit to 64bit, or from an older version? 

I did not upgrade *to* Ubuntu. I upgraded in between Ubuntu. 
It should be a regular upgrade. Same version (14.04). 

As i said, I run "apt-get dist-upgrade" to include kernel upgrade.

Regards

Ethy


> 
> 
> > On Oct 20, 2015, at 11:59 AM, Ethy H. Brito  wrote:
> > 
> > 
> > Hi
> > 
> > I had a bad experience upgrading Ubuntu a few months ago.
> > Today I made a "dd" copy to another harddisk and tried to dist-upgrade.
> > 
> > I get "Illegal instruction (core dumped)" running "service asterisk debug"
> > at random places.
> > 
> > Any help will be appreciated to spot this problem.
> > 
> > I think it is worth to mention that the dadhi hardware is not present at the
> > copied system.
> > 
> > regards
> > 
> > Ethy
> > 
> > -- 
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >   http://www.asterisk.org/hello
> > 
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >   http://lists.digium.com/mailman/listinfo/asterisk-users
> 
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] asterisk core dumped after UBUNTU 14.04 dist-upgrade

2015-10-20 Thread Ethy H. Brito
On Tue, 20 Oct 2015 11:18:05 -0700 (PDT)
Steve Edwards  wrote:

> On Tue, 20 Oct 2015, Ethy H. Brito wrote:
> 
> > I had a bad experience upgrading Ubuntu a few months ago. Today I made a 
> > "dd" copy to another harddisk and tried to dist-upgrade.
> >
> > I get "Illegal instruction (core dumped)" running "service asterisk 
> > debug" at random places.
> 
> Different CPU?

Both are 64 bits. One is Intel and the other AMD.

> 
> Different kernel version?

Yes. dist-upgrade changed from "3.13.0-32-generic #57-Ubuntu SMP" to
"3.13.0-66-generic #108-Ubuntu SMP"

> 
> Was the install from packages or did you compile it yourself?

Installed from packages. 
DKMS installation script compile the modules to this new kernel.

Regards

Ethy


> 
> -- 
> Thanks in advance,
> -
> Steve Edwards   sedwa...@sedwards.com  Voice: +1-760-468-3867 PST
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


[asterisk-users] asterisk core dumped after UBUNTU 14.04 dist-upgrade

2015-10-20 Thread Ethy H. Brito

Hi

I had a bad experience upgrading Ubuntu a few months ago.
Today I made a "dd" copy to another harddisk and tried to dist-upgrade.

I get "Illegal instruction (core dumped)" running "service asterisk debug" at
random places.

Any help will be appreciated to spot this problem.

I think it is worth to mention that the dadhi hardware is not present at the
copied system.

regards

Ethy

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

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


Re: [asterisk-users] cdr table's "dst" column

2015-09-11 Thread Ethy H. Brito
On Fri, 11 Sep 2015 13:31:34 -0300
Helvio Junior  wrote:

> Ethy,
> 
> The number that is recorded in "dst" is the last EXTEN in your dialplan, 
> so if you need record another number you can create a new context and 
> change to this context with Goto.
> 
> Follows an example:
> 
> exten = _9X.,1,Dial...
> 
> 
> And you need to record without "9" you can do this:
> 
> exten = _9X.,1,Goto(context,${EXTEN:1},1)
> 
> 
> and in your new context this:
> 
> exten = _X.,1,Dial...

Hmmm!!

That solved the issue.

One of the modificativos I did was to remove an "unnecessary" Goto!!

Thanx
Regards

Ethy


> 
> 
> Rgs,
> 
> Att,
> Hélvio Junior
> SafeId - Gestão de identidades e Acessos
> +55 41 | 9893-2694, single-sign-on.com.br
> helvio.jun...@safetrend.com.br
> 
> On 11-09-2015 12:16, Ethy H. Brito wrote:
> > Hi All
> >
> > What, by definition, goes to the cdr table's "dst" column ??
> >
> > In our setup, to get outside the user has to dial X before any number.
> > This goes to the dst with the X stripped out.
> >
> > I recently made some changes in a macro and after that the X appeared in
> > this dst column!
> >
> > I run through the script and see no differences between the old and the new
> > one.
> >
> > Then the question: What, by definition, goes to the cdr table's "dst"
> > column ??
> >
> > Is it the "identifier" field from the Dial command?
> >
> > Regards
> >
> > Ethy
> >
> 
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


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

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

[asterisk-users] cdr table's "dst" column

2015-09-11 Thread Ethy H. Brito

Hi All

What, by definition, goes to the cdr table's "dst" column ??

In our setup, to get outside the user has to dial X before any number.
This goes to the dst with the X stripped out.

I recently made some changes in a macro and after that the X appeared in this 
dst column!

I run through the script and see no differences between the old and the new one.

Then the question: What, by definition, goes to the cdr table's "dst" column ??

Is it the "identifier" field from the Dial command?

Regards

Ethy

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

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


Re: [asterisk-users] compose_func_args: argbuf allocated 4 bytes compose_func_args: argbuf uses 3 bytes

2015-08-07 Thread Ethy H. Brito
On Fri, 07 Aug 2015 12:47:40 +0200
Jonas Kellens  wrote:

> Hello
> 
> 
> I have 2 strange errors when using the Background()-application and 
> DTMF-input that is received.
> 
> First of all, my first 2 lines are not being executed. The first line 
> being executed is the Set() application, thus line 3.
> 
> Secondly, the received digits (911) is not the same as the EXTEN (which 
> is set to 91).
> 
> 
> 
> exten => ivr,n,Set(TIMEOUT(digit)=2)
> exten => ivr,n,Background(/var/lib/asterisk/sounds/${ASTPROMPT})
> 
> exten => _X.,1,NoOp()
> exten => _X.,n,NoOp(input=${EXTEN})
> exten => _X.,n,Set(choice=${EXTEN})
> 
> 
> 
> [Aug  7 12:31:26] -- Executing [ivr@pbx-routing:7] 
> Set("SIP/SipAgenT-0626", "TIMEOUT(digit)=2") in new stack
> [Aug  7 12:31:26] -- Digit timeout set to 2.000
> [Aug  7 12:31:26] -- Executing [ivr@pbx-routing:8] 
> BackGround("SIP/SipAgenT-0626", "/var/lib/asterisk/sounds/5003") in 
> new stack
> [Aug  7 12:31:26] --  Playing 
> '/var/lib/asterisk/sounds/5003.slin'
> 
> [Aug  7 12:31:41] NOTICE[3886]: ast_expr2.y:763 compose_func_args: 
> argbuf allocated 4 bytes;
> [Aug  7 12:31:41] NOTICE[3886]: ast_expr2.y:782 compose_func_args: 
> argbuf uses 3 bytes;
> [Aug  7 12:31:41] -- Executing [911@pbx-routing:1] 
> Set("SIP/SipAgenT-0626", "choice=91") in new stack
> 
> 
> 
> I have reloaded the dialplan several times, but the first 2 lines never 
> get executed. In stead they generate the error : ast_expr2.y:763 
> compose_func_args: argbuf allocated 4 bytes;
> 
> 
> Anyone know what is going on here ?
> 
> 
> 
> Kind regards,
> 
> Jonas.

Hi Jonas

What is the output from "dialplan show" for this particular piece of code?

cheers

Ethy

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

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


Re: [asterisk-users] how to return a transfered call to the transferrer?

2015-07-16 Thread Ethy H. Brito
On Thu, 16 Jul 2015 09:51:54 +0100
Ishfaq Malik  wrote:

> On 15 July 2015 at 20:51, Ethy H. Brito  wrote:
> 
> >
> > Hi all
> >
> > Any of you guys could point me in the right direction?
> >
> > I need to make that a blind transfer to return to the transferrer when the
> > transferee does not answer.
> >
> > Scenario:
> > . Miss Jane Doe, our front desk attendant, picks up an external
> > call to
> > Mr. Smith;
> > . Miss Doe flashes, dial Mr. Smith's extension and then hangup;
> > . Mr Smith's phone rings until timeout;
> > . At this point, how to return the call to the Miss Doe's
> > extension;
> >
> > Cheers
> >
> > Ethy
> >
> > --
> > _
> >
> >
> Do a channel dump on the transferred channel, you'll see marker channel
> variables showing it's a transfer and that contain the sending peer name.
> You can use dialplan logic to check if it's a transfer. If it is, you can
> send the call back to the referrer peer.
> 

I'm sorry. I couldn't find "channel dump" (Asterisk 11).

The closer I got was "sip show channel XXX".
And it does not return any clue about a transferred channel. 
At least none I could rely on.

Isn't there any dialplan variable? Other tip?

Cheers

Ethy



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

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


[asterisk-users] how to return a transfered call to the transferrer?

2015-07-15 Thread Ethy H. Brito

Hi all

Any of you guys could point me in the right direction?

I need to make that a blind transfer to return to the transferrer when the 
transferee does not answer.

Scenario:
. Miss Jane Doe, our front desk attendant, picks up an external call to
Mr. Smith;
. Miss Doe flashes, dial Mr. Smith's extension and then hangup;
. Mr Smith's phone rings until timeout;
. At this point, how to return the call to the Miss Doe's extension;

Cheers

Ethy

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

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


[asterisk-users] default features

2015-06-03 Thread Ethy H. Brito

Hi

We are provisioning some default features to our customers like "automated 
answer when outside labor time", "rerouting when Subscriber Absent", and so.

These are macro calls embedded in key points inside the dialplan.

Since not all customers need/want all features and they (the features) are
customized, I named them like [macro-feature1-ClientA],
[macro-feature4-ClientF], ... 

Question: is there some built-in way to know if macro "feature1-ClientA" is 
defined? Something like 
ExecIfMacro(feature1-ClientA)?macro(feature1-ClientA):Goto(...).

For the moment, we are using an external command like 
"asterisk -rx 'dialplan show'| grep ..." 
to set a "__variable" and we use it later to decide to execute or not the
"suspicious" macro.

Cheers

Ethy

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

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


Re: [asterisk-users] chan_sip.c: Hanging up call

2015-05-28 Thread Ethy H. Brito
On Thu, 28 May 2015 11:15:45 -0500
Scott Griepentrog  wrote:

> The string "5a2600300339934f704528bb14ed05e9@MyAsterisk:5060" is the unique
> identifier for the call in SIP known as the Call-ID.  If you have a packet
> capture of the port 5060 SIP traffic, that identifier will be in each SIP
> message related to the call, which also includes the full from and to
> details.

That is the problem. Since the message occurs typically about 2~3 times a day 
(or even less), I will have tons of packets to sniff.

But, I will give it a try.

> 
> As an alternative to running a separate packet capture, you can enable SIP
> message logging in Asterisk, which puts the full SIP message into the same
> log file.  

You mean "sip set debug on" ?

> Be aware however that this can fill your hard drive quite
> rapidly, as well as put additional load on the disk storage system.

I am pretty aware of that. Learn it the hard way.

Cheers

Ethy


> 
> On Thu, May 28, 2015 at 11:03 AM, Ethy H. Brito 
> wrote:
> 
> >
> > Hi All
> >
> > I have a few lines like this at asterisk/messages.
> >
> > [May 25 15:22:42] WARNING[27725] chan_sip.c: Hanging up call
> > 5a2600300339934f704528bb14ed05e9@MyAsterisk:5060 - no reply to our
> > critical
> > packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
> > ).
> >
> > Since we have hundreds of clients with hundreds of simultaneous calls, how
> > is
> > it possible to know to which customer/IP those calls refer to?
> >
> > The above literature don't say much to help to narrow down the problem
> > scope.
> >
> > Cheers
> >
> > Ethy
> >
> > --
> > _
> > -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> > New to Asterisk? Join us for a live introductory webinar every Thurs:
> >http://www.asterisk.org/hello
> >
> > asterisk-users mailing list
> > To UNSUBSCRIBE or update options visit:
> >http://lists.digium.com/mailman/listinfo/asterisk-users
> >
> 
> 
> 
> -- 
> [image: Digium logo]
> Scott Griepentrog
> Digium, Inc · Software Developer
> 445 Jan Davis Drive NW · Huntsville, AL 35806 · US
> direct/fax: +1 256 428 6239 · mobile: +1 256 580 6090
> Check us out at: http://digium.com · http://asterisk.org


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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

[asterisk-users] chan_sip.c: Hanging up call

2015-05-28 Thread Ethy H. Brito

Hi All

I have a few lines like this at asterisk/messages.

[May 25 15:22:42] WARNING[27725] chan_sip.c: Hanging up call
5a2600300339934f704528bb14ed05e9@MyAsterisk:5060 - no reply to our critical
packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).

Since we have hundreds of clients with hundreds of simultaneous calls, how is
it possible to know to which customer/IP those calls refer to?

The above literature don't say much to help to narrow down the problem scope.

Cheers

Ethy

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

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



Re: [asterisk-users] Function IMPORT and Local channels

2015-04-29 Thread Ethy H. Brito
On Mon, 27 Apr 2015 23:56:30 -0300
"Ethy H. Brito"  wrote:

> On Mon, 27 Apr 2015 23:52:30 -0300
> "Ethy H. Brito"  wrote:
> 
> > 
> > Hi all
> > 
> > These questions were asked back in 2009 at lists.digium.com and got
> > unanswered:
> > 
> > - Has someone been successful in using IMPORT on a Local channel ? 
> > - Is there a known limitation in doing so ?
> > 
> > I run into the same problem.
> > 
> > ${IMPORT(Local/1234@example-abcd;2,CALLERID(dstchannel))} returns
> > nothing. But I can read the dstchannel for it into the CDR.
> 
> MY MISTAKE HERE!!
> 
> the correct instance is:
> 
> ${IMPORT(Local/1234@example-abcd;2,CDR(dstchannel))}
> 
> Stupid cut and paste error.
> 
> sorry for that.

Opps!! Maybe I got no answers up to this moment because I did not explained my
mistake correctly.

What I meant was that I made a mistake when choosing from where to copy the 
text into the mail. My coding is correct.

The problem of having IMPORT returning nothing to CDR(dstchannel) when channel
is "Local/...", is there. 

mysql> select channel,dstchannel from cdr where channel like "Local%" or 
dstchannel like "Local%" limit 2;
+-+-+
| channel | dstchannel  |
+-+-+
| SIP/jane_doe-0069ff70   | Local/1234@trunk-1908;1 |
| Local/1234@trunk-1908;2 | SIP/john_doe-00811c40   |
+-+-+

Shouldn't "same => 
n,Set(test=${IMPORT(Local/1234@trunk-1908;2,CDR(dstchannel))})" yield to 
test=SIP/john_doe-00811c40 ?

Regards

Ethy

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

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


Re: [asterisk-users] Function IMPORT and Local channels

2015-04-27 Thread Ethy H. Brito
On Mon, 27 Apr 2015 23:52:30 -0300
"Ethy H. Brito"  wrote:

> 
> Hi all
> 
> These questions were asked back in 2009 at lists.digium.com and got
> unanswered:
> 
> - Has someone been successful in using IMPORT on a Local channel ? 
> - Is there a known limitation in doing so ?
> 
> I run into the same problem.
> 
> ${IMPORT(Local/1234@example-abcd;2,CALLERID(dstchannel))} returns
> nothing. But I can read the dstchannel for it into the CDR.

MY MISTAKE HERE!!

the correct instance is:

${IMPORT(Local/1234@example-abcd;2,CDR(dstchannel))}

Stupid cut and paste error.

sorry for that.

Ethy

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

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


[asterisk-users] Function IMPORT and Local channels

2015-04-27 Thread Ethy H. Brito

Hi all

These questions were asked back in 2009 at lists.digium.com and got unanswered:

- Has someone been successful in using IMPORT on a Local channel ? 
- Is there a known limitation in doing so ?

I run into the same problem.

${IMPORT(Local/1234@example-abcd;2,CALLERID(dstchannel))} returns nothing.
But I can read the dstchannel for it into the CDR.

Asterisk is 11.7.0~dfsg-1ubuntu1

Regards

Ethy

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

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


Re: [asterisk-users] Error writing CDR

2015-04-26 Thread Ethy H. Brito
On Sun, 26 Apr 2015 11:11:10 +0200
jg  wrote:

> >> Hi All
> >>
> >> I have dozens of these messages on CLI complaining about database
> >> connection and error writing CDR to disk.
> >>
> >> The curious thing is I can find them all inside the database. I
> >> "selected" them using uniqueid and manually compared each column
> >> with the cdr_adaptive_odbc.c error line.
> >>
> >> "mysqlcheck -a -e -v DBase"  and "mysqlcheck -c -e -v DBase" both
> >> returned OK for all tables.
> >>
> >> Environment is: in production Asterisk 11.7.0~dfsg-1ubuntu1 Ubuntu
> >> 14.04.1 LTS
> >>
> >> Any thoughts?
> >>
> >> Thanx
> >>
> >> Ethy
> >>
> >> [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:645
> >> ast_odbc_prepare_and_execute: SQL Execute returned an error -1:
> >> 23000: [MySQL][ODBC 5.1
> >> Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
> >> '-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133)
> > Hi Ethy,
> >
> > why date and time are empty?
> >
> > At least date is used as a unique key and a unique key has to be
> > unique. In other words, the same key can not exist twice like in your
> > case.
> >
> > Check why there is no date and time anymore ...
> >
> 
> Or define your table with and independent primary key that gets added
> automatically:
> 
> mysql> describe cdr;
> +--+--+--+-+-++
> | Field| Type | Null | Key | Default |
> Extra  |
> +--+--+--+-+-++
> *| id   | int(11) | NO   | PRI | NULL|
> auto_increment |* | clid | varchar(80)  | NO   |
> | || | src  |
> varchar(80)  | NO   | MUL | || |
> dst  | varchar(80)  | NO   | |
> || ... | lastapp  | varchar(80)  | NO   |
> | || | lastdata |
> varchar(80)  | NO   | | || |
> duration | int(11)  | NO   | | 0
> || | billsec  | int(11)  | NO   | |
> 0   || | disposition  | varchar(45)
> | NO   | | || | start|
> datetime | NO   | MUL | -00-00 00:00:00 || |
> answer   | datetime | NO   | | -00-00 00:00:00
> || | end  | datetime | NO   | |
> -00-00 00:00:00 || | uniqueid | varchar(45)
> | NO   | | || ...
> 
> Just in case you get bogus records with offending primary keys due to
> some other problem, you would still have valid data base entries and you
> would be able to look at the pattern.
> 
> jg

Hi guys

I maybe have encountered a bug or I am doing something very stupid.

That is what happened: I disabled a connection I am playing around on
res_odbc.conf and the problem stopped. Just did this, nothing else.

By the beginning of this month I was trying to do a CDR extension to
accommodate calls statistics. I did not touched the CDR as you can see by
the "describe" above.

I just follow some "stepping stones" at 
http://www.asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/installing_configuring_odbc.html
and http://.../3rd_Edition/asterisk-book-html-chunk/database_storing-cdr.html to
activate ODBC and then I created a "h" extension at the extensions.conf file to
harvest some stats. 
No attributions at all (like Set(CDR(foo)=bar)), since I did not tampered the 
CDR.

What is happening to ODBC that it is trying to insert data into the CDR
when I did not told it to do so?

What I did not do to prevent this?

Thanx for your answers

Ethy

> 
> 

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

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


Re: [asterisk-users] Error writing CDR

2015-04-25 Thread Ethy H. Brito
On Sat, 25 Apr 2015 17:05:44 -0300
"Ethy H. Brito"  wrote:

> On Sat, 25 Apr 2015 17:11:34 +0200
> jg  wrote:
> 
> > 
> > > Hi All
> > >
> > > I have dozens of these messages on CLI complaining about database
> > > connection and error writing CDR to disk.
> > >
> > > The curious thing is I can find them all inside the database.
> > > I "selected" them using uniqueid and manually compared each column
> > > with the cdr_adaptive_odbc.c error line.
> > >
> > > "mysqlcheck -a -e -v DBase"  and "mysqlcheck -c -e -v DBase" both
> > > returned OK for all tables.
> > >
> > > Environment is:
> > >   in production Asterisk 11.7.0~dfsg-1ubuntu1
> > >   Ubuntu 14.04.1 LTS
> > >
> > > Any thoughts?
> > >
> > > Thanx
> > >
> > > Ethy
> > >
> > > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:645
> > > ast_odbc_prepare_and_execute: SQL Execute returned an error -1:
> > > 23000: [MySQL][ODBC 5.1
> > > Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
> > > '-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133)
> > >
> > > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:657
> > > ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying
> > > connection to MyAsterisk-asterisk [MyAsterisk-asterisk]...
> > >
> > > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:761
> > > ast_odbc_sanity_check: Connection is down attempting to reconnect...
> > >
> > > [Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1527
> > > odbc_obj_connect: Connecting MyAsterisk-asterisk
> > >
> > > [Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1559
> > > odbc_obj_connect: res_odbc: Connected to MyAsterisk-asterisk
> > > [MyAsterisk-asterisk]
> > >
> > > [Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:645
> > > ast_odbc_prepare_and_execute: SQL Execute returned an error -1:
> > > 23000: [MySQL][ODBC 5.1
> > > Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
> > > '-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133)
> > >
> > > [Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:657
> > > ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying
> > > connection to MyAsterisk-asterisk [MyAsterisk-asterisk]...
> > >
> > > [Apr 25 10:57:01]
> > > WARNING[19013][C-02cb]: res_odbc.c:761 ast_odbc_sanity_check:
> > > Connection is down attempting to reconnect...
> > >
> > > [Apr 25 10:57:02]
> > > WARNING[7666]: chan_sip.c:4409 __sip_autodestruct: Autodestruct on
> > > dialog '34f3f3481b8d1e4772dc111f42d13...@ip.ip.ip.ip:5060' with owner
> > > SIP/CLIENT_ID_1-0178 in place (Method: BYE). Rescheduling
> > > destruction for 1 ms
> > >
> > > [Apr 25 10:57:06] NOTICE[19013][C-02cb]: res_odbc.c:1527
> > > odbc_obj_connect: Connecting MyAsterisk-asterisk
> > >
> > > [Apr 25 10:57:06]
> > > NOTICE[19013][C-02cb]: res_odbc.c:1559 odbc_obj_connect:
> > > res_odbc: Connected to MyAsterisk-asterisk [MyAsterisk-asterisk]
> > >
> > > [Apr 25 10:57:06]
> > > WARNING[19013][C-02cb]: cdr_adaptive_odbc.c:739 odbc_log:
> > > cdr_adaptive_odbc: Insert failed on 'MyAsterisk-asterisk:cdr'.  CDR
> > > failed: INSERT INTO cdr
> > > (dst,accountcode,clid,src,dcontext,channel,dstchannel,lastapp,duration,billsec,disposition,amaflags,userfield,lastdata,uniqueid)
> > > VALUES (blahblahblah, ... ,'1429970147.612')
> > >
> > Can you post the output of "describe ;"? At least the first
> > error message is probably related to a not so optimal primary key
> > definition.
> 
> Thanx for the reply.
> 
> request follows...
> 
> mysql> describe cdr ;
> +-+--+--+-+-+---+
> | Field   | Type | Null | Key | Default | Extra |
> +-+--+--+-+-+---+
> | calldate| datetime | NO   | PRI | -00-00 00:00:00 |   |
> | dst | varchar(80)  | NO   | PRI | NULL|   |
> | accountcode | varchar(20)  | NO   | PRI | NULL|   |
> | clid| varchar(80)  | NO   | | NULL|   |
> | 

Re: [asterisk-users] Error writing CDR

2015-04-25 Thread Ethy H. Brito
On Sat, 25 Apr 2015 17:11:34 +0200
jg  wrote:

> 
> > Hi All
> >
> > I have dozens of these messages on CLI complaining about database
> > connection and error writing CDR to disk.
> >
> > The curious thing is I can find them all inside the database.
> > I "selected" them using uniqueid and manually compared each column
> > with the cdr_adaptive_odbc.c error line.
> >
> > "mysqlcheck -a -e -v DBase"  and "mysqlcheck -c -e -v DBase" both
> > returned OK for all tables.
> >
> > Environment is:
> > in production Asterisk 11.7.0~dfsg-1ubuntu1
> > Ubuntu 14.04.1 LTS
> >
> > Any thoughts?
> >
> > Thanx
> >
> > Ethy
> >
> > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:645
> > ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
> > [MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate
> > entry '-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133)
> >
> > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:657
> > ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying
> > connection to MyAsterisk-asterisk [MyAsterisk-asterisk]...
> >
> > [Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:761
> > ast_odbc_sanity_check: Connection is down attempting to reconnect...
> >
> > [Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1527
> > odbc_obj_connect: Connecting MyAsterisk-asterisk
> >
> > [Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1559
> > odbc_obj_connect: res_odbc: Connected to MyAsterisk-asterisk
> > [MyAsterisk-asterisk]
> >
> > [Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:645
> > ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
> > [MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate
> > entry '-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133)
> >
> > [Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:657
> > ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying
> > connection to MyAsterisk-asterisk [MyAsterisk-asterisk]...
> >
> > [Apr 25 10:57:01]
> > WARNING[19013][C-02cb]: res_odbc.c:761 ast_odbc_sanity_check:
> > Connection is down attempting to reconnect...
> >
> > [Apr 25 10:57:02]
> > WARNING[7666]: chan_sip.c:4409 __sip_autodestruct: Autodestruct on
> > dialog '34f3f3481b8d1e4772dc111f42d13...@ip.ip.ip.ip:5060' with owner
> > SIP/CLIENT_ID_1-0178 in place (Method: BYE). Rescheduling
> > destruction for 1 ms
> >
> > [Apr 25 10:57:06] NOTICE[19013][C-02cb]: res_odbc.c:1527
> > odbc_obj_connect: Connecting MyAsterisk-asterisk
> >
> > [Apr 25 10:57:06]
> > NOTICE[19013][C-02cb]: res_odbc.c:1559 odbc_obj_connect: res_odbc:
> > Connected to MyAsterisk-asterisk [MyAsterisk-asterisk]
> >
> > [Apr 25 10:57:06]
> > WARNING[19013][C-02cb]: cdr_adaptive_odbc.c:739 odbc_log:
> > cdr_adaptive_odbc: Insert failed on 'MyAsterisk-asterisk:cdr'.  CDR
> > failed: INSERT INTO cdr
> > (dst,accountcode,clid,src,dcontext,channel,dstchannel,lastapp,duration,billsec,disposition,amaflags,userfield,lastdata,uniqueid)
> > VALUES (blahblahblah, ... ,'1429970147.612')
> >
> Can you post the output of "describe ;"? At least the first
> error message is probably related to a not so optimal primary key
> definition.

Thanx for the reply.

request follows...

mysql> describe cdr ;
+-+--+--+-+-+---+
| Field   | Type | Null | Key | Default | Extra |
+-+--+--+-+-+---+
| calldate| datetime | NO   | PRI | -00-00 00:00:00 |   |
| dst | varchar(80)  | NO   | PRI | NULL|   |
| accountcode | varchar(20)  | NO   | PRI | NULL|   |
| clid| varchar(80)  | NO   | | NULL|   |
| src | varchar(80)  | NO   | MUL | NULL|   |
| dcontext| varchar(80)  | NO   | | NULL|   |
| channel | varchar(80)  | NO   | | NULL|   |
| dstchannel  | varchar(80)  | NO   | | NULL|   |
| lastapp | varchar(80)  | NO   | | NULL|   |
| duration| int(11)  | NO   | | 0   |   |
| billsec | int(11)  | NO   | | 0   |   |
| disposition | varchar(45)  | NO   | MUL | NULL|   |
| amaflags| int(11)  | NO   | | 0   |   |
| userfield   | varchar(255) | NO   | | NULL|   |
| lastdata| varchar(80)  | NO   | | NULL|   |
| uniqueid| varchar(32)  | YES  | MUL | NULL|   |
+-+--+--+-+-+---+
16 rows in set (0.00 sec)


FYI this has been running smooth for years.

This "problem" started a few days ago.

Ethy


-- 
_
-- Bandwidth and Colo

[asterisk-users] Error writing CDR

2015-04-25 Thread Ethy H. Brito

Hi All

I have dozens of these messages on CLI complaining about database connection 
and error writing CDR to disk.

The curious thing is I can find them all inside the database.
I "selected" them using uniqueid and manually compared each column with the 
cdr_adaptive_odbc.c error line.

"mysqlcheck -a -e -v DBase"  and "mysqlcheck -c -e -v DBase" both returned OK 
for all tables.

Environment is:
in production Asterisk 11.7.0~dfsg-1ubuntu1
Ubuntu 14.04.1 LTS

Any thoughts?

Thanx

Ethy

[Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:645
ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
'-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133) 

[Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:657
ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
MyAsterisk-asterisk [MyAsterisk-asterisk]... 

[Apr 25 10:56:56] WARNING[19013][C-02cb]: res_odbc.c:761 
ast_odbc_sanity_check: Connection is down attempting to reconnect... 

[Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1527 odbc_obj_connect: 
Connecting MyAsterisk-asterisk 

[Apr 25 10:57:01] NOTICE[19013][C-02cb]: res_odbc.c:1559
odbc_obj_connect: res_odbc: Connected to MyAsterisk-asterisk 
[MyAsterisk-asterisk]

[Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:645
ast_odbc_prepare_and_execute: SQL Execute returned an error -1: 23000:
[MySQL][ODBC 5.1 Driver][mysqld-5.5.40-0ubuntu0.14.04.1-log]Duplicate entry
'-00-00 00:00:00-1234-CLIENT_ID' for key 'PRIMARY' (133) 

[Apr 25 10:57:01] WARNING[19013][C-02cb]: res_odbc.c:657
ast_odbc_prepare_and_execute: SQL Execute error -1! Verifying connection to
MyAsterisk-asterisk [MyAsterisk-asterisk]... 

[Apr 25 10:57:01]
WARNING[19013][C-02cb]: res_odbc.c:761 ast_odbc_sanity_check: Connection is
down attempting to reconnect... 

[Apr 25 10:57:02]
WARNING[7666]: chan_sip.c:4409 __sip_autodestruct: Autodestruct on dialog
'34f3f3481b8d1e4772dc111f42d13...@ip.ip.ip.ip:5060' with owner
SIP/CLIENT_ID_1-0178 in place (Method: BYE). Rescheduling destruction
for 1 ms 

[Apr 25 10:57:06] NOTICE[19013][C-02cb]: res_odbc.c:1527
odbc_obj_connect: Connecting MyAsterisk-asterisk 

[Apr 25 10:57:06]
NOTICE[19013][C-02cb]: res_odbc.c:1559 odbc_obj_connect: res_odbc:
Connected to MyAsterisk-asterisk [MyAsterisk-asterisk] 

[Apr 25 10:57:06]
WARNING[19013][C-02cb]: cdr_adaptive_odbc.c:739 odbc_log:
cdr_adaptive_odbc: Insert failed on 'MyAsterisk-asterisk:cdr'.  CDR failed: 
INSERT
INTO cdr
(dst,accountcode,clid,src,dcontext,channel,dstchannel,lastapp,duration,billsec,disposition,amaflags,userfield,lastdata,uniqueid)
VALUES (blahblahblah, ... ,'1429970147.612')

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

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


[asterisk-users] Iax2 statistics in dialplan

2015-03-29 Thread Ethy H. Brito

Hi All

How to have access to the IAX2 call statistics inside the dialplan (not CLI)?

I have no IAX2 clients (yet) to test, but do RTPAUDIOQOS.* variables do the job?

Are they available to IAX2 calls as they are for SIP?

Stats like total packets sent and received, lost pkts, rtt, etc. would be nice.

cheers

Ethy

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

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


Re: [asterisk-users] Asterisk 13. Writing call quality parameters to CDR. How?

2015-03-25 Thread Ethy H. Brito
On Thu, 19 Mar 2015 10:12:22 +0100
Marek Cervenka  wrote:

> because of problems you are facing i decided to go way with second table
> 
> CREATE TABLE `cdr_extended` (
>`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
>`uniqueid` varchar(32) NOT NULL DEFAULT '',
>   `callid` varchar(256) NOT NULL DEFAULT '' COMMENT 'sip call-id',
>`hangupcause` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci 
> NOT NULL COMMENT 'info about hangup',
>`peerip` varchar(15) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`recvip` varchar(15) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`from_u` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`uri` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`useragent` varchar(30) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT 
> NULL,
>`codec1` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`codec2` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL,
>`llp` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
> COMMENT 'lost packets by local end',
>`rlp` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
> COMMENT 'lost packets by remote end ',
>`ljitt` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
> COMMENT 'the same for jitter ',
>`rjitt` varchar(10) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL 
> COMMENT 'the same for jitter ',
>PRIMARY KEY (`id`),
>KEY `uniqueid` (`uniqueid`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
> 
> in hangup handler or h exten i will use func_odbc
> like
> insert into cdr_extended (uniqueid,hangupcause,peerip,...) values 
> ('${UNIQUEID}',...);

Interesting approach.

But how to tell from a call going directly (directmedia) and a call with
asterisk in between??

In the last case, two bridged channels, how to collect the parameters from each 
"leg" in the "h" extension?

Cheers

Ethy


> 
> 
> Dne 18.3.2015 v 20:37 Dmitriy Serov napsal(a):
> > Hello.
> >
> > Voice quality when calling - this is one of the most important in the 
> > PBX.
> > You need to record the quality parameters for each call to improve.
> >
> > Because the overall quality of a call can only be determined upon 
> > completion, I did it in the HangUp handler and wrote in custom fields 
> > of CDR.
> > This worked well in asterisk 11.
> >
> > In asterisk 13 I did not find a handler after the call, but before 
> > finalizing the CDR.
> > I tried to call the AGI and there to update the CDR record by unique 
> > identifiers. But faced with the fact that there are no needed record 
> > in the table yet.
> > To write the data into a separate table and join them may be an 
> > option. But do not want to resort to such a decision
> >
> > How do you solve this problem?
> >
> > Dmitriy Serov.
> >
> 
> 
> -- 
> ---
> Marek Cervenka
> ===
> 
> 
> -- 
> _________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


Re: [asterisk-users] SSL traffic on RTP instance without an SSL session

2015-02-10 Thread Ethy H. Brito


Hi again.

Does nobody have a good answer for this?

Cheers

Ethy


On Fri, 30 Jan 2015 12:37:36 -0200
"Ethy H. Brito"  wrote:

> 
> Hi All
> 
> We've been reading this in the CLI a lot lately: 
>   Received SSL traffic on RTP instance '0x7fe7481faad8' without an SSL
>   session
> 
> How can we find details about this particular RTP instance?
> 
> "rtp set debug" needs an IP which is precisely what I want to know (and I
> don't)!
> 
> Cheers
> 
> Ethy


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

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


[asterisk-users] SSL traffic on RTP instance without an SSL session

2015-01-30 Thread Ethy H. Brito

Hi All

We've been reading this in the CLI a lot lately: 
Received SSL traffic on RTP instance '0x7fe7481faad8' without an SSL
session

How can we find details about this particular RTP instance?

"rtp set debug" needs an IP which is precisely what I want to know (and I 
don't)!

Cheers

Ethy

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

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


[asterisk-users] subscriber absent

2015-01-28 Thread Ethy H. Brito

Hi all

WE have some users that turns off their phones when they are not at home.

We see the warning message:

Unable to create channel of type 'SIP' (cause 20 - Subscriber absent)

just after the Dial() command and a 

Everyone is busy/congested at this time

message.

Where is this "unable - cause 20" status available in the dialplan? 
Which variable holds this?

We'd like to play something to the caller in case the user is absent.

Cheers

Ethy

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

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


Re: [asterisk-users] Ubuntu 12.04 LTS / Asterisk / apt-get upgrade / exclude packages

2014-10-10 Thread Ethy H. Brito
On Fri, 10 Oct 2014 13:11:10 +0200
jg  wrote:

> 
> > When doing an "apt-get upgrade" the system packages will be update but
> > sometimes Asterisk is broken.
> Can you describe what is broken?

Hi jg and All.

I will go in this flow and say I reported a similar bug at Launchpad and I got
no answers up to this moment. Please see:

https://bugs.launchpad.net/bugs/1338578

Every kernel upgrade is a nightmare here!

Who can help us?

Regards

Ethy



> > Which packages do I have to exclude when I
> > do not have time to recompile Asterisk/Dahdi each time? libc?
> > Kernel-Packages?
> The way things are set up is that you have to compile the wanpipe drivers
> always against the current versions of the kernel and DAHDI. You could change
> that with a pretty high risk of breaking things, mainly due to frequent
> changes in the network related parts of the kernel.
> 
> I have never seen something break, except for kernel updates, but my systems
> are RedHat based. I doubt that the Debian based systems are much different as
> far as interface changes are concerned for a certain release. My guess is
> that you should be fine if you do not execute "apt-get dist-upgrade".
> 
> jg
> 
> -- 
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>http://www.asterisk.org/hello
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users


-- 

Ethy H. Brito /"\
InterNexo Ltda.   \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860 X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc

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

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


[asterisk-users] revesecharge and asterisk 11

2014-07-11 Thread Ethy H. Brito

Hi All

I installing a new S.O. (Ubuntu 14.04) and upgrading my asterisk 1.8. to
Asterisk 11

Asterisk 11 is not in production right now but is scheduled to be soon.

>From its logs (Asterisk 11) I read a lots of:

[Jul 11 12:07:45] WARNING[24074][C-] func_channel.c: Unknown or
unavailable item requested: 'reversecharge'

One of the lines triggering the warning at extensions.conf is:
exten => s,n,ExecIf($['${CHANNEL(reversecharge)}' = '1']?Set(COLLECT_CALL=1))

https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CHANNEL says
that nothing has changed from 1.8 to 11.

What am I doing wrong? Why 'reversecharge' is an unavailable item now?
Some missing library/package?

Regards

Ethy

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

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


[asterisk-users] chan_dahdi.conf sintax

2014-07-08 Thread Ethy H. Brito

Hi All

This may be a silly question but...

I have this dahdi_genconf generated file:

; Autogenerated by /usr/sbin/dahdi_genconf on Fri Jul  4 22:05:29 2014
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: WCT1/0 "Digium Wildcard TE110P T1/E1 Card 0" 
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = pri_cpe
channel => 1-15,17-31
context = default
group = 63

; Span 2: WCTDM/0 "Wildcard TDM410P" (MASTER) 
;;; line="32 WCTDM/0/0 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 32
callerid=
group=
context=default

;;; line="33 WCTDM/0/1 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 33
callerid=
group=
context=default

;;; line="34 WCTDM/0/2 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 34
callerid=
group=
context=default

;;; line="35 WCTDM/0/3 FXSKS"
signalling=fxs_ks
callerid=asreceived
group=0
context=from-pstn
channel => 35
callerid=
group=
context=default

I can see, for instance, 5 "signalling=" lines.
How can I tell which signalling refer to which channel?

How chan_dadhi.conf groups the config options for each channel?
What indicates the end of the configuration of one dahdi channel and starts
another channel?

It is very confusing to me.

Reagards

Ethy

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

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