[asterisk-users] VoIP Information in CDRs

2009-02-21 Thread Costa Tsaousis

Hi,

I am trying to find a way to add the following info in CDRs (with 
asterisk 1.4.23.1):


1. Codec used
2. RTP QoS statistics
3. RTP IP of remote host
4. For answered calls, the peer that requested to end the conversation

I have managed to get 1 and 2 for the caller, like that:

exten = h,1,Set(CDR(userfield)=RIP=${SIPCHANINFO(recvip)} 
Codec=${CHANNEL(audioreadformat)}/${CHANNEL(audiowriteformat)}/${CHANNEL(audionativeformat)}/${SIPCHANINFO(t38passthrough)} 
QOS=${RTPAUDIOQOS})


The problems I have so far:

*1. CODEC
*Codec is reported only for A-Leg.
When transcoding asterisk logs the above line as: slin for read / slin 
for write / the codec of A-Leg / 0 for t.38.

Is there a way to get the codec for both legs of a call?

*2. RTP Qos is reported only for A-Leg.
*Also, asterisk seems to ignore the RTP statistics reports by B-Leg 
after the BYE:


   -- Executing [...@core-dialplan:3] Hangup(SIP/401-08231540, ) in 
new stack
 == Spawn h extension (core-dialplan, h, 3) exited non-zero on 
'SIP/401-08231540'
Scheduling destruction of SIP dialog 
'0aa4f73f5c9715b7661b50080a669...@10.11.12.1' in 6656 ms (Method: INVITE)
set_destination: Parsing sip:4...@10.11.12.43:5060;transport=udp for 
address/port to send to

set_destination: set destination to 10.11.12.43, port 5060
Reliably Transmitting (no NAT) to 10.11.12.43:5060:
*BYE sip:4...@10.11.12.43:5060;transport=udp SIP/2.0
*Via: SIP/2.0/UDP 10.11.12.1:5060;branch=z9hG4bK3077b703;rport
From: Office Line 1 sip:4...@10.11.12.1;tag=as1d9352fe
To: 
sip:4...@10.11.12.43:5060;transport=udp;tag=0009b7aa1aaa51eb2c767e13-7fb3b34a

Call-ID: 0aa4f73f5c9715b7661b50080a669...@10.11.12.1
CSeq: 103 BYE
User-Agent: home.tsaousis.gr
Max-Forwards: 70
Content-Length: 0

---
 == Spawn extension (core-dialplan, 422, 1) exited non-zero on 
'SIP/401-08231540'

box*CLI
--- SIP read from 10.11.12.43:50539 ---
*SIP/2.0 200 OK
*Via: SIP/2.0/UDP 10.11.12.1:5060;branch=z9hG4bK3077b703;rport
From: Office Line 1 sip:4...@10.11.12.1;tag=as1d9352fe
To: 
sip:4...@10.11.12.43:5060;transport=udp;tag=0009b7aa1aaa51eb2c767e13-7fb3b34a

Call-ID: 0aa4f73f5c9715b7661b50080a669...@10.11.12.1
Date: Sat, 21 Feb 2009 14:29:42 GMT
CSeq: 103 BYE
Server: Cisco-CP7960G/8.0
Content-Length: 0
_*RTP-RxStat: Dur=4,Pkt=180,Oct=28800,LatePkt=0,LostPkt=0,AvgJit=0
RTP-TxStat: Dur=4,Pkt=183,Oct=29280
*_
These SIP messages are being exchanged after the dialplan has executed 
the h extension.

Is there a way to have RTP statistics for both legs?

*3. RTP IP is not reported anywhere.
*The RIP= variable I have above, reports the SIP IP, and again only for 
A-Leg.

Is it possible to find out the RTP (not SIP) IPs for both legs?

*4. Find out who hangedup an answered call.
*I have not found any way to determine the peer that requested to hangup 
the call.

Is it possible to find who of the two legs requested the hangup?

Any help is appreciated.

Costa

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

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

Re: [asterisk-users] TDM400P periodic sound clicks on FXS

2007-09-12 Thread Costa Tsaousis
Tzafrir Cohen wrote:
 How about calls from either the card or the trunk to an echo test
 extension? to a local SIP/IAX phone?

   
It seems that the FXS slots do no have the issue with local VoIP phones.

Any ideas?



___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

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

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


[asterisk-users] TDM400P periodic sound clicks on FXS

2007-09-11 Thread Costa Tsaousis
Hi,

I am having periodic sound clicks (2-3 per second) on all FXS of a 
TDM400P when the remote end is my VoIP provider. However:

- recording the conversation on the asterisk, does not have the 
glitches, although I can hear them on a real phone.
- My VoIP provider to my VoIP phones through the same asterisk is OK.
- TDM to TDM through the same asterisk is OK.

I tried with and without echocancel and different values of echotrain 
(including 'no'), without luck.
The card is not sharing interrupts.

Any ideas?



Kernel is 2.6.9
asterisk is 1.2.19-BRIstuffed-0.3.0-PRE-1y-h

# lspci
 00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller 
Hub (rev 02)
 00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ 
Integrated Graphics Controller (rev 02)
 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
 00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC 
Interface Bridge (rev 01)
 00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE 
Controller (rev 01)
 00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) 
SATA IDE Controller (rev 01)
 00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller 
(rev 01)
 01:00.0 ISDN controller: Cologne Chip Designs GmbH ISDN network 
Controller [HFC-4S] (rev 01)
 01:02.0 Network controller: Tiger Jet Network Inc. Tiger3XX Modem/ISDN 
interface
 01:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. 
RTL-8139/8139C/8139C+ (rev 10)

# cat /proc/interrupts
CPU0  
   0:4262013  XT-PIC  timer
   1:  8  XT-PIC  i8042
   2:  0  XT-PIC  cascade
   3:4217220  XT-PIC  qozap
   5:  11979  XT-PIC  eth0
   8:  1  XT-PIC  rtc
  11:  29016  XT-PIC  libata
  15:4211433  XT-PIC  wctdm
 NMI:  0
 ERR:  0




___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

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

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


Re: [asterisk-users] TDM400P periodic sound clicks on FXS

2007-09-11 Thread Costa Tsaousis

Matthew Fredrickson wrote:

Costa Tsaousis wrote:
  

Hi,

I am having periodic sound clicks (2-3 per second) on all FXS of a 
TDM400P when the remote end is my VoIP provider. However:


- recording the conversation on the asterisk, does not have the 
glitches, although I can hear them on a real phone.

- My VoIP provider to my VoIP phones through the same asterisk is OK.
- TDM to TDM through the same asterisk is OK.



If TDM to TDM is ok, then it would strongly point towards a problem with 
perhaps the VoIP provider.  This is just shooting off of my hip, but 
maybe a jitterbuffer issue, like with the phones?  I think when Asterisk 
bridges SIP-SIP calls, it doesn't do any jitter buffering.
  
If it is a jitterbuffer, then why the recordings (of the same calls I 
hear the clicks, not other calls) do not have them?


Also, I believe it cannot be an issue of the provider since all ATAs I 
tested do not have the issue (same provider, same account).



___

Sign up now for AstriCon 2007!  September 25-28th.  http://www.astricon.net/ 

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

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

[Asterisk-Users] CallerID presentation

2005-01-10 Thread Costa Tsaousis
Hi,

My * (latest stable CVS) is not sending the caller id on its zap channels
(digium TDM40B). The callerid is shown on call-waiting, but is hidden if
the ringing channel is not already in a call.

The same * and configuration was working before upgrading to the latest
stable CVS.

Of course I have (in zapata.conf):

usecallerid = yes
callwaitingcallerid = yes


With defaultzone=gr (zaptel.conf) I was getting: Didn't finish Caller-ID
spill.. I changed defaultzone=us and I also tried with DEFAULT_CIDRINGS=2
(in chan_zap.c). With this setup the error is gone, but the caller id is
still not sent to the phones.

As I said, callwaitingcallerid is working right.

Any ideas?

Regards,

Costa


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


[Asterisk-Users] Re:[Asterisk-Users]SIPconfigdocumentation

2004-02-21 Thread Costa Tsaousis
Hi all,

(oej, I have lost your e-mail somehow, so I have replied to some other
reply to you... sorry!)

 context= ; UP, the context name for placing calls

 Q1: Why is there a context for peers?

 We use peers in some other situations as well.  This is strange and
 rather undocumented, but an incoming call is first matched by
 username with the defined users (including 'friends'). After that,
 we match on IP address with the peer table. Hopefully those
 peers have authentication (a secret), so we authenticate and accept
 the call based on IP. This is used when connecting Asterisk as
 a PSTN-gateway to other SIP proxys. Incoming calls are placed
 in the peer context.

Does this mean that if I have SER for example as the primary proxy for a
domain and I want to use asterisk as a media gateway, I can have SER
redirect my user agents to asterisk, which will be authenticated as nomral
by asterisk (sip.conf entries for each agent), without using
autocreatepeers=yes?

 canreinvite= ; UP yes, no or update.

 Q2: What the update option does?

 I think the update is not a keyword, but a value.

Yes, my fault.

 See here
 http://www.voip-info.org/wiki-Asterisk%20sip%20qualify

It is not a value of qualify. It is a value of canreinvite.
Do you know what it does?

 callerid= ; U- caller id of the user: Name number.

 Have to check this one. Been working a bit on this problem in the
 chan_sip2 channel.

I have submitted two bug reports. One includes a patch to chan_sip.c that
fixes the problem. See:

http://bugs.digium.com/bug_view_page.php?bug_id=0001074

Another is about CALLERIDNUM. This variable seems to strip the dots from
the domain without practical reason (also SetCIDNum and the like do this).
See:

http://bugs.digium.com/bug_view_page.php?bug_id=0001075

 callgroup= ; UP
 pckupgroup= ; UP

 Q4: Since a user cannot accept calls, why to setup call pickup for
 him/her?
 Sorry, haven't used or checked call groups. Anyone else?

No answer on this yet...

 language= ; U- language for voice messages and indications

 Q5: Why a peer does not have a language? What if we want to call
 someone
 with an IVR menu (via a .call file)? How we can choose the language
 for
 him/her? (yes, I know this can be set in the context the call will
 enter, but I think the elegant solution is to have this information
 here).

 This is a bug fixed in the chan_sip2 channel.

ok

 accountcode= ; U- CDR's account code
 incominglimit= ; U- concurrent call limitations ( = 0 )
 outgoinglimit= ; U- concurrent call limitations ( = 0 )

 Q6: How is it possible for a type=user phone to have BOTH incoming and
 outgoing limits?
 Interesting question. Anyone else?

No help on this either so far.

 nat= ; -P yes, no : Support NAT. (breaks RFC)
 Well, yes, it breaks the RFC, but makes SIP work. What nat=yes really
 does
 is that it ignores the IP data within the registration or invite and use
 the IP address Asterisk received the packet from. This works if the
 client is contacting us directly, with no outbound proxy in between.
 This is rather common in SIP proxy implementations right now. When STUN
 and UPNP and other NAT/VoIP solutions are more frequently implemented,
 the data sent to thte SIP server will not include any private NAT
 networks
 any more, but that will not happen overnight.

ok

 fromdomain= ; -P Domain to show in the domain field of the outgoing
 call TO the peer.
 I think this is mainly used when we REGISTER with an outbound proxy,
 like FWD.
 fromuser= ; -P User to show in the user field of the outgoing call TO
 the peer.
 Same here.

fromdomain and fromuser overwrite the callerid sent TO the peer. The
[general] section fromdomain and callerid are the same respectivelly
(callerid in [general] is fromuser actually) for destinations not defined
as peers in sip.conf (i.e. DNS SRV based lookups). The patch I have
sumbitted above allows the type=user entities to have a
fromdomain/fromuser given in their callerid:

callerid = My Name [EMAIL PROTECTED]

This allows asterisk serve multiple SIP domains concurrently (I am working
on this for some time - I have build a configurator that automatically
creates multi-domain configurations for using * for SIP virtual PBX
services - If you are interested for this builder, just send me a note to
send it to you - it is alpha currently).

 mask= ; -P netmask for host= parameter.
 This has to be defined *before* thet host= parameter.

Thanks for the hint. I didn't notice this.

 What it does? Don't know. Anyone else? Why do Asterisk apply a host mask
 to an IP address for a host?

This is still open too.

 defaultip= ; -P if the peer does not register with us, where we should
 try to find it by default.
 Useful if you restart Asterisk. The SIP device think it's registred for
 a while longer, but Asterisk lost contact with them.

ok.

 host=ip address
 port=port no
 means you don't use SIP REGISTER, the SIP ua is always at the same
 address.
 Again, mask - I don't really know.

ok

 username= ; -P 

[Asterisk-Users] Re:[Asterisk-Users] SIPconfigdocumentation

2004-02-21 Thread Costa Tsaousis
Hi again,

 Feel we need to document various solutions here.

Yes we do. I still have a filling that I don't exactly get it...


 Sorry, I was on the wrong topic, canreinvite has
 yes|no|update as keywords.
 with UPDATE a SIP method UPDATE is initiatied to change the media path.
 with YES, a new INVITE is issued within the current call. (a re-invite)
 with NO, the call stays within asterisk.

Sorry for asking this, but in practice, what does these mean?
(yes I know I should look at the FRC... :)


 I'll add comments to the bug reports. We really need to think about how
 we steer the SIP channel forward. Asterisk is a multi-protocol PBX, so
 there's no sense in making the SIP channel a stand-alone SIP proxy that
 doesn't work with the rest of the PBX. If you don't want a PBX in the core
 of your SIP network, use a SIP proxy there and use Asterisk where it fits
 in. This way of reasoning means there are things that will never happen in
 the Asterisk SIP channel because of the multi-protocol architecture. We
 need
 to be clear on that while moving the channel forward. Having said that,
 there's a lot of things to do to make the SIP client and server within
 Asterisk more compliant and functional with the rest of the SIP world.

Olle, I think it is a mater of prioritization. If you put the switched
world in the first priority, yes we should keep numbers. If you put SIP
first, then we should use e-mail like addresses. After some time there
might be another protocol, say XYZ. If you put XYZ first, then you should
choose the method this protocol uses, etc.

I believe there are three possible paths for asterisk:

1. Stick to the switched world (as the common denominator for telephony).
This means that * can have any number of gateways on it, but always, it
will be a switching-like PBX with some VoIP functionality, build in
software.

Example: forget about SIP, H.323 and the like, focus on switched telephony
with the ability to place and receive calls via VoIP making them as
switching-friendly as possible, of course with limitations.

2. Open up the possible scenarios and let the administrator choose the
primary protocol. This means that although asterisk will not address in
its core artificially intelligent thinks such as callerid convertion, it
could be configured to follow either schema. In this case, the
administrator should have the means to configure some aspects of the
secondary protocols.

Example: Support a number of protocols as primary and configure asterisk
according to them. This means that various building blocks (like callerid
handling) will be multiplied, one variation per primary protocol and the
whole system will support only one protocol for such functions. When there
are interfaces with other protocols the administrator should make hard
decisions about the properties that cannot be converted automatically.

This is my case today. I want SIP as primary and I know I will have to
provide numeric callerids in the configuration when interfacing with other
protocols. What I need is a SIP PBX and IVR, not a SIP proxy. I cannot do
what I need with SER (at least not that easy...).

3. Build asterisk as a superset of all protocols, internally. In our case
this could mean that the callerid could be defined as:

callerid=TEXT internet address number

or even:

callerid=Your Name sip:[EMAIL PROTECTED] h323:... mgcp:...

or just provide directory services for callerid convertions between non
compatible protocols.

As a superset of all protocols, asterisk will be able to be a fully
functional member of each of the supported worlds and will be able to also
handle all the protocols as primary at the same time.

Path 3 is the perfect path. Path 2 is a good one. Path 1 demotes asterisk.
If it is going to be Path 1 I believe we, all, are going to use asterisk
as a secondary component in our telephony infrastructures that will
provide some valuable services, but it will never be the heart of it,
unless all that we need is a plain old switched-like PBX with some VoIP
functionality.


 We need to work together to handle the multi-domain scenario. Please
 send me whatever you have and let's continue discussing this so we get
 a solid architecture. I do want Asterisk to be in the forefront in
 preventing
 use of Asterisk as a open SIP spam relay to use mail terms. Mail servers
 are
 picky of which domains they server for inbound and outbound messages, in
 some
 cases also on what domain is used for outbound messages. We need to have
 configuration that follows this line of thinking for SIP. If someone is
 using
 our domain for outbound calls - authenticate. If someone is randomly
 placing
 calls to extensions in any domain they invent *into* our PBX, don't
 answer.

I agree with you, but still I think all these should be configuration
decisions, not implementation ones.

Regards,

Costa

___
Asterisk-Users mailing list
[EMAIL PROTECTED]

[Asterisk-Users] CAPI noise and scratches - strange behavior

2004-02-14 Thread Costa Tsaousis
Hi all,

Here are some additional info  findings:

My system is dual PIII 933MHz, with a Gigabyte GA-6VXDC7 mobo.
Asterisk produces noises and scratches when the system is IDLE and
*BOTH* CAPI channels are active (with one CAPI channel everything is
fine always).
When the system is busy (CPUs at 100%), sound is perfect with *BOTH*
CAPI channels active.

Here is how I can reproduce the problem:

If I keep one of my CPUs busy while both CAPI channels are active, the
noises stop. Just a scratch here and there.
I keep the CPU busy with this:

# while [ 1 = 1 ]; do echo   /dev/null; done

If I run this twice (to keep busy both CPUs), then the noises appear
just every a few seconds.

I can reproduce this every single time.

Note that I have a TDM40B (4xFXS) Digium card installed that is supposed
to provide a high resolution timer to asterisk. The effect is the same
with this card enabled and disabled.

I know the easy workaround: Run setiathome permanently :-)
However, it seems that chan_capi has some timing problems...

Any help?

Costa

On , 2004-02-11 at 14:08, Costa Tsaousis wrote:
 Hi,
 
 When I have two concurrent CAPI calls, * produces a lot of noises and
 scratches on both CAPI channels.
 
 I am using SIP phones; it appears on all phones, even if two separate SIP
 devices are connected to the two CAPI channels.
 
 The problem does not appear with any number of concurrent calls using SIP
 end-to-end (with * as a media gateway).
 
 I am using FritzCard! DSL (the ISDN part of it) and kernel 2.4.24 vanilla.
 
 Any help is appreciated.
 
 Costa
 


___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] Noise and scratches when there are two concurrent CAPI calls

2004-02-11 Thread Costa Tsaousis
Hi,

When I have two concurrent CAPI calls, * produces a lot of noises and
scratches on both CAPI channels.

I am using SIP phones; it appears on all phones, even if two separate SIP
devices are connected to the two CAPI channels.

The problem does not appear with any number of concurrent calls using SIP
end-to-end (with * as a media gateway).

I am using FritzCard! DSL (the ISDN part of it) and kernel 2.4.24 vanilla.

Any help is appreciated.

Costa

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[Asterisk-Users] High Density configuration for Voice Fax

2004-02-11 Thread Costa Tsaousis
Hi,

Are there any well known good H/W configurations for high density E1
setups supporting * and FAX? The response we got from digium about their
cards, as far as FAX is concerned, is: I would not depend upon them for
FAX. It does work, but it is not completely reliable..

The minimum we would need is 4 x E1 on each system but both Voice and FAX
at the same time.

Also, I saw somewhere on the asterisk sites, that * can support up to 100
concurrent calls on a dual Xeon 1.8GHz when doing media conversion.

We have a few projects that we will need PRI - GSM or G729 media
conversion (for WAN use). Do you know any cards that can take care of the
media conversion and free the CPUs (for use with * of course)?

Kind regards,

Costa

___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users