[asterisk-users] problems in REFER request to different machine

2008-04-10 Thread tloginbr-asterisk
Hi everyone,

I'm currently trying to enable call transfer to different domains in
asterisk box (Asterisk 1.2.13 running on Debian etch). I have a
configuration that requires me to transfer call to separate domains
like [EMAIL PROTECTED]:5050. My calls come from a R2 channels in a
board installed in the machine. When the call comes in I dial a sip
address in another machine and I need to receive REFER from this
other machine to transfer the call to a third sip URI, that may be or
not in any of the two machines . My machines change all the time, so
registering them in my asterisk box is not an option. The big picture
here is this: I have a asterisk box to receive calls from PSTN and I
send this calls to sip application that I made that will transfer the
call from the user to different sip application depending on user
input. And this other application also need the ability to transfer
calls to different sip URI. The applications are conferences, voice
mail and others, each running on a different sip uri ([EMAIL PROTECTED]:port)
and the user needs to jump between them. So I need my asterisk box to
accept  arbitrary sip URI in a REFER (xfer) command. Right now it
always tries to send the call to a local extension, for example, if I
have a call from my asterisk to [EMAIL PROTECTED]:5060 and this
application asks asterisk to transfer this call to
[EMAIL PROTECTED]:5070 asterisk will try to send the to the local
extension 666. Bellow I have a sip debug from the messages. My
asterisk box is running in the IP 201.73.67.5, and my first
application (the one that asterisk dials directly) is at the address
201.73.67.7:5080 and it transfers the calls to 201.73.67.7:5070, but
it fails.

All help is very much welcome.

Thanks in advance,

Thiago

Sip debug:

-- SIP read from 201.73.67.7:5080:
REFER sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP
201.73.67.7:5080;rport;branch=z9hG4bKPj3r0RqvljQLyTKpBVXgbhce5dADV20tVx
Max-Forwards: 70
From: sip:[EMAIL PROTECTED];tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
To: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
Contact: sip:201.73.67.7:5080
Call-ID: [EMAIL PROTECTED]
CSeq: 15651 REFER
Event: refer
Expires: 300
Accept: message/sipfrag;version=2.0
Allow-Events: presence, refer
Refer-To: sip:[EMAIL PROTECTED]:5070
Referred-By: sip:[EMAIL PROTECTED]
Content-Length:  0


--- (15 headers 0 lines) ---
Transfer to 5070 in from-sip-external
Transfer from 0778 in from-sip-external
Transmitting (no NAT) to 201.73.67.7:5080:
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP
201.73.67.7:5080;branch=z9hG4bKPj3r0RqvljQLyTKpBVXgbhce5dADV20tVx;received=201.73.67.7;rport=5080
From: sip:[EMAIL PROTECTED];tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
To: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
Call-ID: [EMAIL PROTECTED]
CSeq: 15651 REFER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: sip:[EMAIL PROTECTED]
Content-Length: 0
X-Asterisk-HangupCause: Normal Clearing


---
set_destination: Parsing sip:201.73.67.7:5080 for address/port to
send to
set_destination: set destination to 201.73.67.7, port 5080
Reliably Transmitting (no NAT) to 201.73.67.7:5080:
NOTIFY sip:201.73.67.7:5080 SIP/2.0
Via: SIP/2.0/UDP 201.73.67.5:5060;branch=z9hG4bK26db8c59;rport
From: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
To: sip:[EMAIL PROTECTED]:5080;tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
Contact: sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 103 NOTIFY
User-Agent: Asterisk PBX
Max-Forwards: 70
Event: refer;id=15651
Subscription-state: terminated;reason=noresource
Content-Type: message/sipfrag;version=2.0
Content-Length: 14

SIP/2.0 200 OK
---
set_destination: Parsing sip:201.73.67.7:5080 for address/port to
send to
set_destination: set destination to 201.73.67.7, port 5080
Reliably Transmitting (no NAT) to 201.73.67.7:5080:
BYE sip:201.73.67.7:5080 SIP/2.0
Via: SIP/2.0/UDP 201.73.67.5:5060;branch=z9hG4bK1e66e326;rport
From: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
To: sip:[EMAIL PROTECTED]:5080;tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
Call-ID: [EMAIL PROTECTED]
CSeq: 104 BYE
User-Agent: Asterisk PBX
Max-Forwards: 70
X-Asterisk-HangupCause: Normal Clearing
Content-Length: 0


---

-- SIP read from 201.73.67.7:5080:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
201.73.67.5:5060;rport=5060;received=201.73.67.5;branch=z9hG4bK26db8c59
Call-ID: [EMAIL PROTECTED]
From: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
To: sip:[EMAIL PROTECTED];tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
CSeq: 103 NOTIFY
Contact: sip:201.73.67.7:5080
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY,
PUBLISH, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, norefersub
Content-Length:  0


--- (10 headers 0 lines) ---

-- SIP read from 201.73.67.7:5080:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
201.73.67.5:5060;rport=5060;received=201.73.67.5;branch=z9hG4bK1e66e326
Call-ID: [EMAIL PROTECTED]
From: 3130296800 sip:[EMAIL PROTECTED];tag=as26b5df58
To: sip:[EMAIL PROTECTED];tag=1jAy-XotYlPo06lq7VDTkQxfne5PnnPA
CSeq: 

Re: [asterisk-users] Rotating CDR records inside mysql - anyone does it?

2008-01-23 Thread tloginbr-asterisk
Thanks. I have about 1 million records, but my machine is not so
good. Its a core2 duo with 2 Gig of RAM. When I do only select it
takes a few seconds, but some of my reports require joins, and thats
a big problem.

Thiago

 Well, i wouldn't recommend delete, as that would keep mysql very
 unhappy. you could do RENAME TABLE and CREATE TABLE, or mysqldump
 and
 TRUNCATE TABLE, but they have to happen almost instantly (without
 asterisk trying to do INSERT). I have nearly none experience with
 transactions, but probably those would be helpful.
 
 Btw, you can block access to mysql by firewall (to move existing
 data)
 or stop mysql (to physycally copy binary database files) and then
 take
 it back up - asterisk will post it's CDRs later when db comes
 accessible.
 
 
 Btw - how many records do you have that it gets slow? On what
 machine?
 
 I currently have 3 million CDR records in MySQL with well created
 indexes - and most reports are dynamic. Usually from 0 to 2
 seconds,
 but sometimes up to minute for joins :p. Well, that's 2x Quad core
 xeons of 3GHz and 8Gb RAM (2 of which are used by MySQL indexes).
 Asterisk is running on same machine.
 
 Regards,
 Atis
 
 
 -- 
 Atis Lezdins
 VoIP Developer,
 IQ Labs Inc.
 [EMAIL PROTECTED]
 Skype: atis.lezdins
 Cell Phone: +371 28806004
 Work phone: +1 800 7502835
 



  Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/

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

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


[asterisk-users] Rotating CDR records inside mysql - anyone does it?

2008-01-22 Thread tloginbr-asterisk
Hi everyone,

I have a few asterisk machines doing PSTN calls, and I keep track of
all cdr in a single machine running mysql 5. Since I have a very
large amount of records in there, its getting pretty slow to query
the database, so I'm wondering if anyone does some type of log
rotating, like save the data for a single month inside a separate
table and do that every month, so I keep the tables small enough to
build my reports. I know this is mainly a mysql question, but maybe
someone here has some stored procedures that do this already...

Thanks for all help,

Thiago


  Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/

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

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


[asterisk-users] Problem with the ring timeout in dial command for local extensions

2007-12-07 Thread tloginbr-asterisk
Hi all,

I don't know if this is the right list to ask, since
I'm using Trixbox version 1.0.0.28, that has asterisk
1.2.17.
I'm trying to configure the ring timeout value for my
local extensions (when dialing from one to another),
and the dial command simply ignores my values... I
have one extension 0017 in my box, so I used the
command Dial(SIP/0017|100|rTtWw) to dial to it. The
call gets completed without a problem, but it only
rings for 30 seconds, when it should ring for a 100
seconds. I'm pretty sure this is my mistake here, but
I didn't find a solution. I also tried changing the
value directly in trixbox web interface that says
Number of seconds to ring phones before sending
callers to voicemail and nothing happens. I know that
trixbox does weird things to my configuration files,
but I edited extenions.conf, since it does not get
messed up by trixbox.

If I use the dial command to dial out with my
termination provider (runs on IAX2) the timeout option
works just fine.

All help is very welcome,

Thiago


  Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/

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

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