[Asterisk-Users] problems with chan_capi 0.3.5 , divactrl, eicon diva server, and kernel 2.6.10/2.6.12

2005-06-28 Thread Luis Vazquez

Hello all,
I'm having problems getting chan_capi 0.3.5 to work well with an Eicon 
Diva Server card using using the driver from linux kernel both 2.6.10 
and 2.6.12 (vanilla versions).


I have a (really two) producción system(s) running chan_capi in another 
identical Eicon Card using kernel 2.4.27 and the Diva Server drivers 
from Eicon. I installed an compiled the source level rpm 
divas4linux_EICON-104.429-1.i386.rpm into a binary rpm named 
divas4linux_EICON-105.465-1.i386.rpm.
It works (allmost) without problems except for the fact of some random 
segmentation faults in Asterisk when capi is handling incoming calls 
(the same problem has already been reported in the list without 
solutions as long as I know).
The problem with Eicon's Diva Server Driver is they dont give a version 
to work with kernel 2.6 and I need to upgrade to k2.6 for many reasons, 
besides I prefer to use the open source version.


The first problem I found was having no response when making a call in 
2.6.12. After searching the list I downgraded to 2.6.10 and I was able 
to made a call.
Then I found the patch(es) in the comments at Asterisk How to connect 
with CAPI at voip-info.org. I'm using the one from nitram that seems 
very similar to the one from irroot but more complete. With this patch 
chan_capi is mostly working with 2.6.12 but I have some problems I don't 
have with Eicon's driver in 2.4.27. And the same synthoms occur both 
with 2.6.12 or 2.6.10.


The worst first:

1-  When I made a call from Asterisk through the capi interface it take 
many seconds (around 10 secs) to get connected and then you hear a 
static noise, something like permanent random clicks mixed with the voice.
I used the ditrace tool to debug a call and I see many Layer 1 - [Lost 
Framing] in the output, not present when using the same BRI line in the 
production PBX using k2.4.27 and Eicon's Driver/Tools.

I have tried exchanging the cards too, but the problem is the same.

Here is a snippet of ditrace.txt:
==
0:01:51.055 s 2 Layer 2 - [Idle]
0:01:51.057 s 2 Layer 1 - [Lost Framing] -
0:01:51.057 s 2 Layer 2 - [Idle]
...
0:01:51.085 s 2 Layer 1 - [Syncronized]
0:01:51.085 s 2 Layer 2 - [Idle]
0:01:51.087 s 2 Layer 1 - [Lost Framing] --
...
0:01:51.177 s 2 Layer 2 - [Idle]
0:01:51.295 s 2 Layer 1 - [Syncronized]
0:01:51.295 s 2 Layer 2 - [Idle]
0:01:51.297 s 2 Layer 1 - [Activated]
0:01:51.297 s 2 Layer 2 - [Idle]
0:01:51.328 L 8 CAPI_REGISTER - Id = 1
0:01:51.328 L 8   MaxLogicalConnections = 30(30)
0:01:51.328 L 8   MaxBDataBuffers   = 7
0:01:51.328 L 8   MaxBDataLength= 160
0:01:51.328 L 8   Allocated Memory  = 75000
0:01:51.328 L 8 CAPI_REGISTER - Id = 1
0:01:51.328 L 8   MaxLogicalConnections = 30(30)
0:01:51.328 L 8   MaxBDataBuffers   = 7
0:01:51.328 L 8   MaxBDataLength= 160
0:01:51.328 L 8 CAPI_REGISTER - appl already registered
0:01:51.329 - CAPI20_PUT(026)

0:01:51.331 - 1 CREATEID ok: context:1f assigned Id:5 freeIds=ec

0:01:51.342 - CAPI20_GET(014)
 0x  01 00 05 81  06 00 02 00  00 00 00 00   
   
 ---

 LISTEN CONF  AppID 0x0001 MsgNr 0x0006 CNTR: 0x0002
   Info: initiated
0:01:51.344 - 4 alloc cr in use =3
0:01:51.344 - 3 free cr in use =2
0:01:51.344 - 2 DELETEID ok: deleted Id:5 freeIds=ec
0:01:51.346 - 4 free cr in use =2
0:01:51.346 - 3 DELETEID ok: deleted Id:5 freeIds=ec
0:01:51.348 - 4 DELETEID ok: deleted Id:5 freeIds=ec
0:01:51.357 s 2 Layer 1 - [Syncronized]
0:01:51.357 s 2 Layer 2 - [Idle]
0:01:51.359 s 2 Layer 1 - [Activated]

0:01:52.105 s 2 Layer 1 - [Lost Framing] -
0:01:52.105 s 2 Layer 2 - [Idle]
0:01:52.107 s 2 Layer 1 - [Syncronized]
0:01:52.107 s 2 Layer 2 - [Idle]
0:01:52.109 s 2 Layer 1 - [Activated]
0:01:52.109 s 2 Layer 2 - [Idle]
0:01:52.222 s 2 Layer 1 - [Lost Framing] -
0:01:52.105 s 2 Layer 2 - [Idle]
0:01:52.107 s 2 Layer 1 - [Syncronized]
0:01:52.107 s 2 Layer 2 - [Idle]
0:01:52.109 s 2 Layer 1 - [Activated]
0:01:52.109 s 2 Layer 2 - [Idle]

0:01:53.032 s 2 Layer 1 - [Lost Framing] -
0:01:53.032 s 2 Layer 2 - [Idle]
0:01:53.034 s 2 Layer 1 - [Syncronized]
0:01:53.034 s 2 Layer 2 - [Idle]

2 - After the call is terminated from asterisk side I see the  hangup on 
asterisk CLI but the capi line keeps busy for a while (at least 15-20 
secs). I see the orange light in Eicon Card is on and I'm unable to 
place a new call in meantime.


3 - Sometimes when I take the system down (halt or reboot) I get a 
kernel panic with null pointer errors related to capi drivers.


If have checked both with and withoud early B3 connects dial option but 
the problems are the same.


The relevant parts of my capi.conf, dial command used and kernel config 
are at the end.
I am using asterisk-1.0.7; vanilla kernel-2.6.10 or 2.6.12 compiled with 
gcc 3.4 in Mandrake 10.1, divactrl 2.0 from Melware, chan-capi 0.3.5 
(with deadlock cvs-HEAD patch from 

Re: [Asterisk-Users] Where are chan_capi bug reports and bugfixes sent?

2005-02-04 Thread Luis Vazquez
Thank you for your very instructive response!
I also use chan_capi with Eicon Diva Server, and the problem I had was 
not critic, but related with some  ERROR's  reported by chan_capi when 
the it receives not handled (subcommand=CAPI_CONF command=CAPI_LISTEN)  
messages from the telco.
I fixed this by looking at the handling of this message type in the 
capisuite proyect and adding the code snippet in the proper case entry.
I didn't know of the patch on leviogo.de so I will take a look in case 
the problem I found is fixed in this code.

On the other hand, I am currently using the chan_capi to  handle 6 (3BRI 
x2) pstn lines at the company I'm working in, and the only serious 
problem I'm having is with some phantom (bursts of) dtmf  tones the 
users hear some times in the middle of a conversation.
Have you (or any other capi user) experienced similar problems? There is 
any known fix for this?

Thanks a lot and best regards
Luis
Patrick wrote:
Hi Luis,
I think the best way is to make a diff against the latest chan_capi 
which seems to be version 0.3.5 and email it to kapejod. You may 
probably want to use something like : diff -uNr 
original_chan_capi_dir chan_capi_dir_with_fixes   
chan_capi_patch.txt

You can find his email address here: 
http://www.junghanns.net/asterisk/page1.html

Are you aware that there is a patch for chan_capi that fixes some 
issues? You can find it here:
http://www.levigo.de/VoIP/chan_capi-0.3.5-cvs-HEAD-patch.tar.bz2
The note about this patch on voip-info.org says:
NOTE: If you are using chan_capi 0.3.5 with asterisk cvs-head (as of 
November 2004) you need to apply a small patch here for it to work. 
This patch also enables sending and receiving of faxes with active 
ISDN cards.

I would appreciate it if you could email me the diff because I use 
chan_capi-0.3.5 with an Eicon Diva Server card at home.

Thanks for finding the bugs.
Regards,
Patrick
Luis Vazquez wrote:
Hello all
I found a bug in the chan_capi driver (really a not implemented 
message handling and then a false error condition) and I guess I have 
wrote a patch to fix it (basically I searched the internet for other 
capi open source implementation an borrowed the code snippet) but I 
don't know where to send the report and bugfix.
I also found some miss-behaviours that I would like to share with 
other asterisk+chan_capi users.
I went to Asterisk bugtracker but I didn't find a capi (or related) 
section. I also looked at Junghanns.net and I didn't find an asterisk 
capi users mailing list or a way to report bugfixes to chan_capi.

Does anybody knows the best way to submit the report so it's 
available to anyone?

Thanks a lot
Luis
___
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 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] patch for chan_capi error condition report when receiving CAPI_CONF:CAPI_LISTEN message

2005-02-04 Thread Luis Vazquez
Hello,
here I submit a (previously mentioned) patch that fix a (false) error 
report when usin chan_capi.
I have checked this is not included in the patch at leviogo.de

Best regards
Luis
Pd: Just in case,if anybody need it I have made a version of 
chan_capi-0.3.5-cvs-HEAD-patch.tar.bz2  compatible with the asterisk 
stable version at http://200.59.203.76/pub/chan_capi-0.3.5-patch.stable.diff

diff -ruN --ignore-all-space chan_capi-0.3.5/chan_capi.c chan_capi-0.3.5.ipcontact/chan_capi.c
--- chan_capi-0.3.5/chan_capi.c	2005-02-04 15:04:29.0 -0300
+++ chan_capi-0.3.5.ipcontact/chan_capi.c	2005-02-04 18:32:45.0 -0300
@@ -2161,6 +2161,18 @@
 		PLCI = INFO_CONF_PLCI(CMSG);
 //		ast_log(LOG_ERROR,INFO_CONF PLCI=%#x INFO=%#x\n,PLCI,INFO_CONF_INFO(CMSG));
 	break;
+	case CAPI_LISTEN:
+	  if (LISTEN_CONF_INFO(CMSG)!=0) {
+		char * message = capi_info2str(LISTEN_CONF_INFO(CMSG));
+		if(!message) {
+		  asprintf(message, CAPI returned an unknown error! Please ask your manufacturer for assistance (error code=0x%X)\n, LISTEN_CONF_INFO(CMSG));
+		  ast_log(LOG_ERROR, message);
+		  free(message);
+		} else {
+		  ast_log(LOG_ERROR, %s\n, message);
+		}
+	  }
+	  break;
 	case CAPI_CONNECT:
 		PLCI = CONNECT_CONF_PLCI(CMSG);
 		if (option_verbose  3) {
___
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] Where are chan_capi bug reports and bugfixes sent?

2005-02-03 Thread Luis Vazquez
Hello all
I found a bug in the chan_capi driver (really a not implemented message 
handling and then a false error condition) and I guess I have wrote a 
patch to fix it (basically I searched the internet for other capi open 
source implementation an borrowed the code snippet) but I don't know 
where to send the report and bugfix.
I also found some miss-behaviours that I would like to share with other 
asterisk+chan_capi users.
I went to Asterisk bugtracker but I didn't find a capi (or related) 
section. I also looked at Junghanns.net and I didn't find an asterisk 
capi users mailing list or a way to report bugfixes to chan_capi.

Does anybody knows the best way to submit the report so it's available 
to anyone?

Thanks a lot
Luis
___
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] zt_get_index: nullok is not asserted could led to freeze?

2004-10-22 Thread Luis Vazquez
Hello all,
we have been random freezes in two asterisk systems more or less once a 
day last mounth.
In both system we are using a T100P card and a channel bank for local 
extensions (fxs) and h323 or sip (we have tried both with same results) 
voip gateways for FXO connectivity.
We used to have some SIP local clients using SER but those were taken 
out trying to fix the problem.
When the system freezes it keeps responding pings, and the channel bank 
doesn't loose T1 syncronism (the T1 led keeps green) but nothing else 
responds (no ssh connection, no console response).
Channel bank gives dialtone but no call can be made. In calls in 
progress  the voice start do be more and more discontinous and then you 
hear only silence.

Once we reset the machine we don't find any error or warning in the logs 
(asterisk, kernel, messages, etc).
We are running sysstat in one of the systems and the only clear sympthom 
we see is the cpu usage raises to
100% just before we have to reset the system.

We are also capturing the console output to a file and we have noticed 
that (sometimes) there is a message like this in the console few lines 
before the end (not allways and not only, but...):

zt_get_index: Unable to get index, and nullok is not asserted
Does anybody knows if this message could be related to a system freeze
Thanks very much for any advice (and I'sorry for my poor english :( )
Luis
___
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


Re: [Asterisk-Users] FXO/FXS card

2004-10-14 Thread Luis Vazquez
TC, please re-read my statement:
T1 plus channels bank is a solution for USA but not ... other countries
and note the T1. 
So T1 channels banks (the ones proved an referenced in the wiki, most of the list messages and all the asterisk documentation) are developed to be used in USA so their signaling (is only compatible with USA POTS signaling (whe have bought many CAC AccessBankI here, acceptable price, but only usefull for FXS). Same for Adtran channel banks as long as we have found in the internet. I guess this respond your last question on Marcelo's comments.

Respect to E1 channel banks: as stated by Marcelo E1 channels banks are not a clear 
option because of high costs, I've searched the internet and the lower price for these 
devices (with the FXO cards included ) is U$2000 and above. Not acceptable for a deal 
with a small/medium company with 6 to 12 FXO lines, lesser if you firt have to buy the 
product to test if you are lucky and it works with Asterisk (as is stated many times 
by mainstream asterisk developers E1 zaptel drivers are much less tested than T1).
On the other side, trusting like idiots first on Voicetronix and then on Digium Support (Yes this 
card works perfectly with Asterisk, and we have many clients using them, FXO modules are 
perfect to deploy a PBX with up to 12 PSTN lines) we have wasted to much money in these cards (1400 
U$ in voicetronix os12 and close to $3000 in many TDM04B's) just to find none of them work's in an 
acceptable way (static noice, system frezes, asterisk frezes/crashes, stucked channels, hangups, and many 
etc)
Not a good start point to ask the boss to spend 2500 more bucks to play with some 
brand new E1 channel bank.
Regarding your question respect our PSTN signaling protocol, here we use Siemmens an 
Ericcsons pstn exchanges, and the signaling is 425 Hz tone pulses with diferent 
cadence for busy(500T-500P), disconnect(200T-200P-200T-600P), congestion(250T-250P), 
ringing(1000T-4000P), etc. I think this kind of signaling (diferent frequencies 
diferente cadences) is used in many/many countries in the world out there.
We also can purchase (incoming/outgoing) disconnect supervision service by polarity 
reversal on every PSTN line if we need it.
Best regards
Luis
Pd: what fkth is mfg?
TC wrote:
Em Sex 01 Out 2004 16:13, TC escreveu:
   

T1 plus channels bank is a solution for USA but not for many other
countries because disconnect suppervision in USA is different from
allmost all the rest of the world (USA people is allways special :)
   

hmmm
can you not get channel bank fxo ports that work in your part of the
world ?
as long the cb's signal the T1/E1 interface this should not be an issue
sice the t1 or e1 signal is a universal standard.
I just find it kinda hard to belive that with a technology that has been
around as
a channel banks that some mfg has not got it right by now ?
 

Marcelo Pacheco
E1 channel banks are extremely expensive.
   

Why do you care for e1 all you realy need are compible fxo ports
so an t1 channel bank with fxo ports that work with your countries analog
line would do you just fine
where are you located  how does you provide supply supervison ?
 

At least so far I couldn't find an E1 channel bank for 32 FXS under US$
   

1000
 

anywhere in the world.
There are US$ 500 24 FXS T1 channel banks.
   

you can use these to drive any analog phones any where.
Again why do you think you need e1 channel banks to service analog phones or
analog
fxo line ?
___
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 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] Static noise and server locked when using two 4FXO tdm400p pci cards

2004-09-16 Thread Luis Vazquez
Hello all
We have tested for a mounth or two an asterisk PBX using one T1 channel 
bank with 24 fxs and one TDM400P digium card with 4 FXO modules.
This worked with minor problems, the most notorious being some sporadic 
static noice or failure in the first FXO module on the wildcard.
Now we have a client with 12 pstn lines and 48 extensions and we are 
trying to deploy an Asterisk PBX server using two(x24)channel banks 
(Access Bank 1) an three TDM400P pci cards with 4 FXO each.
But when we use more that one TDM400P card, after some random number of 
calls, one of the cards starts to give a loud static noise when calling 
from inside in all their channels and if we keep trying to use the lines 
the server gets frozen.
Restarting Asterisk don't solves the problem and the only way of 
recovering the channels is to reload the zaptel modules (if the system 
is not locked yet).

We have seen some similar problems reports in the list, and some people 
telling they asked to digium support, but not a real solution.

Does anybody knows if is this a major hardware problem with Digium TDM 
cards and zaptel driver or if there is some way of fixing this?

Thanks very much
Luis
___
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


Re: [Asterisk-Users] Why is it called 'Comedian Mail?

2004-09-02 Thread Luis Vazquez
Just a hint, a friend workin with me in an Asterisk project traveled 
recently to Mendoza (Argentina) and called to a bank using a big and 
expensive PBX that anwered:
Meridian mail ... mailbox?
sounds very much like the
Comidian mail ... mailbox?
in Asterisk. Just a coincidence??

Bye
Luis
Chris Shaw wrote:
I've wondered that myself... obviously the writer has a sense of humor! :)
I like the sound of Digium Mail, it sounds cool...
- Original Message -
From: Kevin Walsh [EMAIL PROTECTED]
To: Asterisk Users Mailing List - Non-Commercial Discussion
[EMAIL PROTECTED]
Sent: Tuesday, August 31, 2004 2:30 PM
Subject: RE: [Asterisk-Users] Why is it called 'Comedian Mail?
 


___
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] Asterisk codecs and packet size

2004-08-31 Thread Luis Vazquez
Does anybody knows if it's posible or if there is some develoment in 
course to be able to use longer transmit packet sizes (as long as I know 
this is fixed in 20ms now) with the compressed voip codecs in asterisk 
(g729, g726, gsm, etc).
I need to use asterisk to connect remote sip clients with 24kb bandwidth 
lines and I'm using a licences g729 codec but because I can't increase 
the packet size to 40 or 60 ms in asterisk the connection is useless.
Thanks very much
Luis

___
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] Reverse Battery Disconnect Supervision in X100P or TDM400P FXO

2004-07-28 Thread Luis Vazquez
Is posible to make the Digium FXO cards detect disconnect supervision by 
polarity reversal instead of battery drop??
Our telco carrier here at Uruguay sales two disconnect supervision 
services called Incomming Polarity Reversal and Outgoing Polarity 
Reversal call supervision.
We just bought the first one in the line we are testing with X100P (we 
have bought many TDM400P cards too) but we found the card does not 
disconnect the call when the line polarity is reversed on remote hangup.
We checked with a voltimeter and the line voltage secuence is (approx):
a) +45 : normal state (open circuit)
b) -45 : Just before the first ring
c) -8 : asterisk answer the call (closed circuit)
d) +8 : remote party hangs up (polarity is reversed by telco)
zaptel channel is not hanged up an the call go to timeout, operator 
queue, etc ... PROBLEM HERE
e) +45 : WE finally hang up the channel

Any help will be greatly appreciated.
Luis
Pd: My boss tell me I can spend a week or two in fixing this problem 
through coding in the zaptel driver so if the hardware is capable of 
detecting this, any hint in the proper driver function to look for or 
any reference to the zaptel driver documentation could be of great help.

___
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


[Fwd: Re: [Asterisk-Users] call pickup fails.]

2004-05-28 Thread Luis Vazquez
More than one hundred messages related to *8 or call pickup problem in 
last 6 months!!

Please someone in the development team could clarify this and make 
himself responsible for the response.
By now It seems a bad joke.
We have spent thousand dollars with hardware, sip phones, working men 
hours, and with digium stuff (E1, fxo, fxs cards etc)
and we have had the *8 problem (sip callee ringing forever) al least for 
6 months.
This made us to lose at least a couple of clients (a IP PBX where you 
are not able to pickup correctly other SIP extensions, are you fooling, 
come back next year ) an we keep reading again and again people saying 
it is not working, and a couple of enlighted people saying their have 
the luck to have it working!!

Please this is not serious! 
This should be fixed for every-one-of-us (if you are one of the lucky 
boys send a sip.conf to THIS LIST or post it in wiki-asterisk with a 
couple of client definitions where people from the earth will be able to 
pick up it) or be recogniced as not working (most of the time if you 
prefer) and ask for someone to solve it (as an open bug report for example).
Is not so complicated stuff to put a callgroup=1 an a pickupgroup=1 in a 
file to suspect we are all fools not getting it to work because of some 
sort of mental illness, or I'm wrong. If someone feels himself 
intelligent by this, he have a problem!!

The money we have invested in Digium and Asterisk stuff in the last six 
months is the same money half of the people in my country
has to live eighteen years!!  More or less 450 times our basic salary 
here, so:
Please, there is people betting on open source software and loosing 
money out there because of these funny details, and that's the same 
people making Digium earn their bucks.
Sorry for my bad (o I should say mad?) english :(
Thanks for your attention guys
Luis

Pd: despite *8 pickup, asterisk is great (most of the time) :)

 Original Message 
Subject:Re: [Asterisk-Users] call pickup fails.
Date:   Thu, 27 May 2004 07:38:44 -0600
From:   Rich Adamson [EMAIL PROTECTED]
Reply-To:   [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
References: [EMAIL PROTECTED]

I saw a few weeks ago a discussion about cal pickup, *8, not working 
but did not find a message about it being resolved, I look for a bug on 
the bug list but did not find anything about it not working, nor a bug open.
I installed asterisk 0.9.0, have one sip fxo gateway and only sip 
phones, all of them have callgroup=1 and pickupgroup=1 but I can not get 
a call that is ringing in another phone, there is a message on the * 
console that says something like Nothing to pickup every time I try it.
Any hints ?
It's been working fine for me on cvs Head for months. We have to use
*8# from a sip phone however.

___
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 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] Not call pickup for call to sip from mgcp phone

2004-05-28 Thread Luis Vazquez
Just by the way, do anybody knows if call pickup of a call to a sip 
extension from a mgcp phone is supposed to work (even if sip keeps ringing).
The scenary is as follows:
[EMAIL PROTECTED] (ext 136) calls sip/julia (ext 133) and after It starts ringing 
[EMAIL PROTECTED] (ext 135) dials *8.
Nothing happens, only 135 gets congestion tone, 133 keeps ringing and in 
the asterisk console I get:
   -- SIP/pbxip.net-5d2c is ringing
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hd'
   -- MGCP mgcp_new(MGCP/aaln/[EMAIL PROTECTED]) created in state: Down
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '*'
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '8'
May 28 18:01:40 WARNING[1409052]: chan_mgcp.c:1857 mgcp_ss: No call 
pickup possible...
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hu'

All callgroup=2, pickupgroup=2 and call pickup works from mgcp to mgcp.
Asterisk version 0.9.0 (this is production system, til they kill us).
Any hints?
Thank's all.
Luis
___
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] Problem in SIP md5 REGISTER

2004-05-26 Thread Luis Vazquez
I guess I found a bug in the register logic  in chan_sip
I'm trying of registering two extensions from a SIP gateway into Asterisk.
I have defined two user entries in sip.conf as follows:
[0191]
type = friend
auth=md5
username=0191
secret=planet
disallow=all
allow=ulaw
dtmfmode=inband
host = dynamic
default = 192.168.2.183
[0192]
type = friend
auth=md5
username=0192
secret=planet
disallow=all
allow=ulaw
dtmfmode=inband
host = dynamic
default = 192.168.2.183
And configured the gateway to register to asterisk (192.168.2.175) both 
numbers with these username and passwords.
***
reg_num: 0191
 Registrar_ID 1: UnRegistered
 registrar: 192.168.2.175  5060expires: 600
 name: 0191passwd: planet
reg_num: 0192
 Registrar_ID 2: Registered
 registrar: 192.168.2.175  5060expires: 600
 name: 0192passwd: planet
***

When I reset the gateway I see the first sip user (0191) FAILS to 
register, but the second one (0192) registers OK.
I first thought there was a problem with the digest response from the 
gateway but after logging the SIP headers, and
reading the RFC's and use md5sum to check the digest values I realiced 
the values from the cliente where OK.

In inserted some  ast_log(LOG_NOTICE, ..) into the chan_sip.c 's 
register_verify() and check_auth() functions
and found the problem is in Asterisk.
As you can see It seems for some reason when Asterisk receives both 
REGISTER request messages one after the other,
he is mixing the nonce value (called randdata into chan_sip.c) for one 
peer with the other.
So he ends evaluating the digest for the first register (0191) using the 
nonce value from the second one (0192) and It fails.
For some reason (I think It is because the randdata is resetted to '' 
after 0191 fails) the second register (0192) gets a second 407 Proxy 
Authentication Required with a third randdata and this time It is 
registered OK because the right nonce value is used.

I'm using Asterisk CVS version from 2004/05/19.
Here follow the console log (with my LOG_NOTICE debug messages) and the 
corresponding ngrep SIP capture. Look specially the randdata values used 
in check_auth (nonce value) and the (not) corresponding values sent in 
the SIP responses for each REGISTER.

Everyone can check the response=... sent by the gateway are ok using 
something like this:

A1=$(echo -n '0192:asterisk:planet'|md5sum|awk '{print $1}')
A2=$(echo -n 'REGISTER:sip:192.168.2.175'|md5sum|awk '{print $1}')
NONCE=17e63cd4
$(echo -n $A1:$NONCE:$A2|md5sum|awk '{print $1}')
**
*
Asterisk Console Logs
*
May 26 16:56:47 NOTICE[196621]: chan_sip.c:3861 register_verify: 
Checking Auth: randata= name=0191 secret=planet uri=sip:192.168.2.175
May 26 16:56:47 NOTICE[196621]: chan_sip.c:3861 register_verify: 
Checking Auth: randata=17e63cd4 name=0192 secret=planet 
uri=sip:192.168.2.175
May 26 16:56:47 NOTICE[196621]: chan_sip.c:3861 register_verify: 
Checking Auth: randata=49760cde name=0191 secret=planet 
uri=sip:192.168.2.175
May 26 16:56:47 WARNING[196621]: chan_sip.c:3764 check_auth: 
A1='0191:asterisk:planet'
May 26 16:56:47 WARNING[196621]: chan_sip.c:3769 check_auth: 
resp_uri='sip:192.168.2.175' uri='sip:192.168.2.175'
May 26 16:56:47 WARNING[196621]: chan_sip.c:3770 check_auth: 
A2='REGISTER:sip:192.168.2.175'
May 26 16:56:47 WARNING[196621]: chan_sip.c:3778 check_auth: 
resp='160723a2f5a8dcf360271903c6818b63:49760cde:c70c5186f40f678679f57680d2a4390d' 
resp_hash='267b05f67388676fcffb6bd3ee381b2e'
May 26 16:56:47 WARNING[196621]: chan_sip.c:3781 check_auth: Client 
response='406d89d8d15ba1c9753b5bef95931934'
May 26 16:56:47 NOTICE[196621]: chan_sip.c:5691 handle_request: 
Registration from 'sip:[EMAIL PROTECTED]' failed for '192.168.2.183'
May 26 16:56:48 NOTICE[196621]: chan_sip.c:3861 register_verify: 
Checking Auth: randata= name=0192 secret=planet uri=sip:192.168.2.175
May 26 16:56:48 NOTICE[196621]: chan_sip.c:3861 register_verify: 
Checking Auth: randata=23b5124b name=0192 secret=planet 
uri=sip:192.168.2.175
May 26 16:56:48 WARNING[196621]: chan_sip.c:3764 check_auth: 
A1='0192:asterisk:planet'
May 26 16:56:48 WARNING[196621]: chan_sip.c:3769 check_auth: 
resp_uri='sip:192.168.2.175' uri='sip:192.168.2.175'
May 26 16:56:48 WARNING[196621]: chan_sip.c:3770 check_auth: 
A2='REGISTER:sip:192.168.2.175'
May 26 16:56:48 WARNING[196621]: chan_sip.c:3778 check_auth: 
resp='c04abf6412f4f786ba81daddb46a82ee:23b5124b:c70c5186f40f678679f57680d2a4390d' 
resp_hash='c370755ec882aafa390ff867d1a99449'
May 26 16:56:48 WARNING[196621]: chan_sip.c:3781 check_auth: Client 
response='c370755ec882aafa390ff867d1a99449'


interface: eth0 (192.168.2.0/255.255.255.0)
filter: ip and ( port 5060 and host 

Re: [Asterisk-Users] *8 problem still there?

2004-05-19 Thread Luis Vazquez
John Vogel wrote:
I upgraded to the latest stable version of 1.0 today and am still 
seeing the *8 problem where the phone that was originally dialed keeps 
on ringing even after another phone picks up.

Are other people also seeing this? Has somebody figured out how to 
make this go away?

Thanks!
As for version 0.9 the problem is still there and after 4 days deciphering the sip 
channel code and trying to understand de masquerade an zombie magic Asterisk does with 
channels in call pickup, and some
# ngrep SIP port 5060
in the Asterisk box I'm sure it is still a bug on Asterisk and not Grandstream's bug 
(they have many others).
I have tried with other hardware too (Ovislink VOIP800 sip gateway, kphone) and the 
problem is the same.
99% of the times Asterisk never sends a CANCEL (or anything else) to the first called 
phone after it gets the INVITE(*8) from the second one.
It seems to me like a race condition or something like that on different threads after 
the masquerading of the channels. It seems like most of the time the old channel is 
destroyed before it get the chance to send a CANCEL.
The problem is most of this happens outside sip channel:
*
** in 
./res/res_parking.c: int ast_pickup_call(ast_channel*)
it searches the ringing channels and masquerades this one
into the picking channel
** in
./channel.c:int ast_channel_masquerade(ast_channel*, ast_channel*) //ugly!!
*
so it is not easy (to me) to fix it being sure you are not breaking something else.

I thought in defining a new function like 

ast_channel *orig ast_get_pickup_channel(ast_channel *chan)
using the code on first part of ast_pickup_call() to get the channel we need to sent 
the CANCEL from inside chan-sip.c before doing the ast_pickup_call() call, but it is 
very dirty and I don't want to change channel.c if it's posible.
Most of the time, after the masquerade the original channel is destroyed or 'zombied' 
or something else (in a different thread?) before it gets to hangup (I saw it using 
ast_log(LOG_DEBUG,...) in many places)
I don't know if it's fixed in the latest CVS , It was not fixed around one month ago. 
I tried to fix it, I spent 4 days but It was too dark for me 
(anyway I learned a lot about sip channel so It wasn't wasted time   )

If anyone knows by sure It is fixed or how to fix it, I will be very happy and I will 
thanks him a lot if he says exactly where (cvs date) and/or how (a diff with 0.9 or 
1.0??).
(by now I'm using asterisk in a production environment and is not so easy to do 
testings like this)
To people how keep seeing it is fixed, please don't say it is fixed (it only builds on your ego); if you know say how to fix it (or how it was fixed)! 

Of course all the callgruoup and pickupgroup stuff is n-checked (with n\to\infty).
Thanks!
Luis

___
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


Re: [Asterisk-Users] *8 problem still there?

2004-05-19 Thread Luis Vazquez
Shaun Ewing wrote:
I'm not seeing this - using stable CVS from 14-05-2004.
Phone types are Grandstream Budgetone 101 using firmware 1.0.4.68, and Cisco
7940 using SIP 6.2.
-Shaun
 

Just to give more info.
I just made a testing using stable CVS from 24-04-2004 and 3 softphone 
clients registered in asterisk with users
luis, lia and jorge (with fromdomain=ipcontact.com.uy in sip.conf):
 
kphone ( sip:111 --- sip:[EMAIL PROTECTED] --- sip:192.168.2.176:5062)
messenger ( sip:114 -- sip:[EMAIL PROTECTED] --- sip:192.168.2.179:16616 )
xlite ( sip:[EMAIL PROTECTED] --- sip:192.168.2.179:5061)

Here is the dialog in a call from luis(kphone) to 114(messenger) and a 
pickup with *8 from jorge(xlite).

The kphone and xlite get connected but 114 (lia - messenger) never gets 
a CANCEL:

Invite from luis to [EMAIL PROTECTED] **:
U 192.168.2.176:5062 - 192.168.2.175:5060
 INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 192.168.2.176:5062;rport
CSeq: 5406 INVITE
To: sip:[EMAIL PROTECTED]..Content-Type: application/sdp
From: Luis Vazquez sip:[EMAIL PROTECTED];tag=E340D0A
Call-ID: [EMAIL PROTECTED]
Subject: sip:[EMAIL PROTECTED]
Content-Length: 187
User-Agent: kphone/4.0.2
Contact: Luis Vazquez sip:[EMAIL PROTECTED]:5062;transport=udp
v=0..o=username 0 0 IN IP4 192.168.2.176..s=The Funky Flow
c=IN IP4 192.168.2.176..t=0 0
m=audio 32842 RTP/AVP 0 97 3
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000..
#
U 192.168.2.175:5060 - 192.168.2.176:5062
 SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.176:5062;rport;received=192.168.2.176
From: Luis Vazquez sip:[EMAIL PROTECTED];tag=E340D0A
To: sip:[EMAIL PROTECTED];tag=as38ce4ffc
Call-ID: [EMAIL PROTECTED]
CSeq: 5406 INVITE
User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:[EMAIL PROTECTED]
Content-Length: 0
#
** Relay of Invite from asterisk to messenger***:
U 192.168.2.175:5060 - 192.168.2.179:16616
 INVITE sip:192.168.2.179:16616 SIP/2.0
Via: SIP/2.0/UDP 192.168.2.175:5060;branch=z9hG4bK535d9d2c
From: Luis(1084976431.475) sip:[EMAIL PROTECTED];tag=as3d3529c2
To: sip:192.168.2.179:16616
Contact: sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE
User-Agent: Asterisk PBX..Date: Wed, 19 May 2004 14:20:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
UniqueID: 1084976433.476
Content-Type: application/sdp
Content-Length: 211
v=0
o=root 20766 20766 IN IP4 192.168.2.175
s=session
c=IN IP4 192.168.2.175..t=0 0
m=audio 17996 RTP/AVP 0 397
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:97 iLBC/8000
a=silenceSupp:off - - - -..
#
*** Asterisk says to kphone messenger is ringing **:
U 192.168.2.175:5060 - 192.168.2.176:5062
 SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.2.176:5062;rport;received=192.168.2.176
From: Luis Vazquez sip:[EMAIL PROTECTED];tag=E340D0A
To:sip:[EMAIL PROTECTED];tag=as38ce4ffc..Call-ID: [EMAIL PROTECTED]
CSeq: 5406 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER
Contact: sip:[EMAIL PROTECTED]
Content-Length: 0
#
** Messenger says to Asterisk he is trying **:
U 192.168.2.179:1071 - 192.168.2.175:5060
 SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.2.175:5060;branch=z9hG4bK535d9d2c
From: Luis(1084976431.475) sip:[EMAIL PROTECTED];tag=as3d3529c2
To: sip:192.168.2.179:16616;tag=b271370b-aeed-4640-adca-d60c86b188d7
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE
User-Agent: Windows RTC/1.0
Content-Length: 0
#
*** Messenger is ringing (and will be forever if not anwered) 
:
U 192.168.2.179:1071 - 192.168.2.175:5060
 SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.2.175:5060;branch=z9hG4bK535d9d2c
From: Luis(1084976431.475) sip:[EMAIL PROTECTED];tag=as3d3529c2
To: sip:192.168.2.179:16616;tag=b271370b-aeed-4640-adca-d60c86b188d7
Call-ID: [EMAIL PROTECTED]
CSeq: 102 INVITE
User-Agent: Windows RTC/1.0
Content-Length: 0

#
* Here starts call pickup ***
*** Xlite enters the game sending an Invite to [EMAIL PROTECTED] ***:
U 192.168.2.179:5061 - 192.168.2.175:5060
 INVITE sip:[EMAIL PROTECTED] SIP/2.0
Via: SIP/2.0/UDP 
192.168.2.179:5061;rport;branch=z9hG4bK41344F5B08434749A915F0DCFAB2AE66
From: Jorge sip:[EMAIL PROTECTED]:5061;tag=1940958518
To: sip:[EMAIL PROTECTED]
Contact: sip:[EMAIL PROTECTED]:5061
Call-ID:[EMAIL PROTECTED]
CSeq: 19484 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103a
Content-Length: 193

v=0..o=jorge 2391140 2391203 IN IP4 192.168.2.179
s=X-Lite
c=IN IP4 192.168.2.179..t=0 0
m=audio 8000 RTP/AVP 3 101
a=rtpmap:3 gsm/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15..
#
 Asterisk responds he is trying **:
U 192.168.2.175:5060 - 192.168.2.179:5061
 SIP/2.0 100 Trying
Via: 
SIP/2.0/UDP192.168.2.179:5061;rport;branch=z9hG4bK41344F5B08434749A915F0DCFAB2AE66
From: Jorge sip:[EMAIL PROTECTED]:5061;tag=1940958518
To: sip:[EMAIL PROTECTED];tag=as4b041d55

Re: [Asterisk-Users] *8 problem still there?

2004-05-19 Thread Luis Vazquez
Sorry, you see the CANCEL sent on 1 from 20 pickups or you see the phone 
keep ringing  on 1 from 20 pickups??
Mi experience with versions 0.7.1, 0.7.2, 0.9, 1.0 and cvs until 4/04 is 
I see the CANCEL once in 20 (or more) ...

Best regards
Luis
Stephen J. Wilcox wrote:
FYI I see it only on 1 in about 10-20 pickups...
On Wed, 19 May 2004, Luis Vazquez wrote:
 

Shaun Ewing wrote:
   

I'm not seeing this - using stable CVS from 14-05-2004.
Phone types are Grandstream Budgetone 101 using firmware 1.0.4.68, and Cisco
7940 using SIP 6.2.
-Shaun

 


___
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] Segfault when parking from extension dialed inside AGI.

2004-03-03 Thread Luis Vazquez
Hello all,

Asterisk is segfault dying when I try to park a call from an extension 
dialed from an AGI script.
The situation is as follows:
I call from a sip phone (really It doesn't matter if It's SIP or not) to 
extension 181 (corresponding to a mgcp DG-104S phone).
.
exten = 181,1,AGI(dummydial.agi,MGCP/aaln/[EMAIL PROTECTED])
.
dummydial.agi is only a simplified test script I made to isolate the 
problem, It only makes a dial to the given channel:
#
#!/usr/bin/perl
# dummydial.agi: Marcar internos con AGI
use strict;
use Asterisk::AGI;

local $::INPUT_RECORD_SEPARATOR=\n;
local $::OUTPUT_AUTOFLUSH=1;
my $agi = new Asterisk::AGI;
my %input = $agi-ReadParse();
my ($dialstring) = shift @ARGV;
$agi-verbose(Dialing: $dialstring,1);
my $ret = $agi-exec('Dial',$dialstring|40|t);
# $ret = $agi-exec('Macro',generic_dial|$dialstring|$vm);  # This is 
the real thing, crashes to
# exit 0;
##

then I peak the phone and the call is established perfectly. 
Then I want to park the call with the following configuration at 
parking.conf:
###
[general]
parkext = 700  ; What ext. to dial to park
parkpos = 701-720  ; What extensions to park calls on
context = parkedcalls  ; Which context parked calls are in
parkingtime = 120  ; Number of seconds a call can 
be parked


so from the called extension (181) I press (#) I do hear transfer and 
then I dial 700.
Then the voice tell mi the call is parked at extension 701, but as soon 
as I hangup the called phone
and try to peak the parked call (and sometimes even before) Asterisk 
dies with segmentation fault.
As I said before It doesn't depend if I made a call from SIP to SIP or 
MGCP to SIP or MGCP to MGCP extension.
The final result (the server crashing with segfault) is always the same.
However If I do exactly the same but with the extension dialing directly 
from extensions.conf with:
exten = 183,1,Dial(MGCP/aaln/[EMAIL PROTECTED],40,tr)
the parking and recovering of the calls works correctly without any problem.

This is the output on the console:
=
*CLI -- Executing AGI(SIP/ipcontact.com.uy-0817d0c0, 
dummydial.agi|MGCP/aaln/[EMAIL PROTECTED]) in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/dummydial.agi
 dummydial.agi|MGCP/aaln/[EMAIL PROTECTED]: Dialing: MGCP/aaln/[EMAIL PROTECTED]
   -- AGI Script Executing Application: (Dial) Options: 
(MGCP/aaln/[EMAIL PROTECTED]|40|t)
   -- MGCP mgcp_request(aaln/[EMAIL PROTECTED])
   -- MGCP cw: -1, dnd: 0, so: 0, sno: 0
   -- MGCP mgcp_new(MGCP/aaln/[EMAIL PROTECTED]) created in state: Down
   -- Called aaln/[EMAIL PROTECTED]
   -- MGCP/aaln/[EMAIL PROTECTED] is ringing
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hd'
   -- MGCP/aaln/[EMAIL PROTECTED] answered SIP/ipcontact.com.uy-0817d0c0
   -- Attempting native bridge of SIP/ipcontact.com.uy-0817d0c0 and 
MGCP/aaln/[EMAIL PROTECTED]
Mar  3 16:07:42 NOTICE[458781]: rtp.c:264 process_rfc3389: RFC3389 
support incomplete.  Turn off on client if possible
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '#'
   -- Started music on hold, class 'default', on 
SIP/ipcontact.com.uy-0817d0c0
   -- Playing 'pbx-transfer' (language 'en')
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '7'
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '0'
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '0'
   -- Stopped music on hold on SIP/ipcontact.com.uy-0817d0c0
   -- Started music on hold, class 'default', on 
SIP/ipcontact.com.uy-0817d0c0
 == Parked SIP/ipcontact.com.uy-0817d0c0 on 701
   -- Playing 'digits/7' (language 'en')
   -- Playing 'digits/0' (language 'en')
   -- Playing 'digits/1' (language 'en')
   -- AGI Script dummydial.agi completed, returning 0
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hu'
   -- MGCP handle_request(aaln/[EMAIL PROTECTED]) ast_channel already destroyed
   -- MGCP handle_request(aaln/[EMAIL PROTECTED]) set vmwi(-)
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hd'
   -- MGCP mgcp_new(MGCP/aaln/[EMAIL PROTECTED]) created in state: Down
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '7'
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '0'
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed '1'
   -- Executing ParkedCall(MGCP/aaln/[EMAIL PROTECTED], 701) in new stack
   -- MGCP mgcp_answer(MGCP/aaln/[EMAIL PROTECTED]) on aaln/[EMAIL PROTECTED]
   -- Stopped music on hold on SIP/ipcontact.com.uy-0817d0c0
   -- Channel MGCP/aaln/[EMAIL PROTECTED] connected to parked call 701
   -- Attempting native bridge of SIP/ipcontact.com.uy-0817d0c0 and 
MGCP/aaln/[EMAIL PROTECTED]
Mar  3 16:07:53 WARNING[475166]: channel.c:846 ast_waitfor_nandfds: 
Thread 475166 Blocking 'SIP/ipcontact.com.uy-0817d0c0', 

Re: [Asterisk-Users] Segfault when parking from extension dialed inside AGI.

2004-03-03 Thread Luis Vazquez
Hello again
After a few minutes of thinking (usefull sometimes :) I solved the 
problem of using the AGI to make the dialing decision while avoid doing 
the dial from inside the agi application without changing context (to 
keep access to other extensions using transfer).
Very simple, using SET PRIORITY together with SET VARIABLE  after I get  
the needed information,
and then exiting from agi before doing the Dial.
Something like this:

[macro-generic_dial]
;   ${ARG1} - Extension
;
exten = s,1,AGI(gotodial.agi,${ARG1})
exten = s,2,Hangup
exten = s,3,Dial(${DIALCHANNEL},40,tr) ; Ring the selected channel 40 
seconds
exten = s,4,GotoIf($[${VMBOX} = 0]?4:3)
exten = s,5,VoiceMail([EMAIL PROTECTED]) ; If unavailable, send to 
voicemail
exten = s,6,Hangup ; Hangup the call
exten = s,104,GotoIf($[${VMBOX} = 0]?104:103)
exten = s,105,VoiceMail([EMAIL PROTECTED]) ; If busy, send to voicemail
exten = s,106,Hangup   ; Hangup the call

[default]
;; Generic extention dialing
exten = _1XX,1,Macro(generic_dial,${EXTEN})
And using something like this inside the gotodial.agi script:
.
   $agi-database_put(LastDial, $callinExten, 
$exten);  # To implement call return
   $agi-verbose(Dialing: $dialstring,1);
   $agi-set_variable('DIALCHANNEL',$dialstring);
   $agi-set_variable('VMBOX',$vm);
   $agi-set_priority('3');
   exit 0;
..

Anyway It would be nice If asterisk didn't die so easily (h323 transfer, 
agi dial and parking, openswitch channel's driver, speaking too loudly 
next to the server, etc)
Best regards
Luis



Luis Vazquez wrote:

Hello all,

Asterisk is segfault dying when I try to park a call from an extension 
dialed from an AGI script.
The situation is as follows:
I call from a sip phone (really It doesn't matter if It's SIP or not) 
to extension 181 (corresponding to a mgcp DG-104S phone).
.
exten = 181,1,AGI(dummydial.agi,MGCP/aaln/[EMAIL PROTECTED])
.
dummydial.agi is only a simplified test script I made to isolate the 
problem, It only makes a dial to the given channel:
#
#!/usr/bin/perl
# dummydial.agi: Marcar internos con AGI
use strict;
use Asterisk::AGI;

local $::INPUT_RECORD_SEPARATOR=\n;
local $::OUTPUT_AUTOFLUSH=1;
my $agi = new Asterisk::AGI;
my %input = $agi-ReadParse();
my ($dialstring) = shift @ARGV;
$agi-verbose(Dialing: $dialstring,1);
my $ret = $agi-exec('Dial',$dialstring|40|t);
# $ret = $agi-exec('Macro',generic_dial|$dialstring|$vm);  # This 
is the real thing, crashes to
# exit 0;
##

then I peak the phone and the call is established perfectly. Then I 
want to park the call with the following configuration at parking.conf:
###
[general]
parkext = 700  ; What ext. to dial to park
parkpos = 701-720  ; What extensions to park 
calls on
context = parkedcalls  ; Which context parked calls 
are in
parkingtime = 120  ; Number of seconds a call can 
be parked


so from the called extension (181) I press (#) I do hear transfer 
and then I dial 700.
Then the voice tell mi the call is parked at extension 701, but as 
soon as I hangup the called phone
and try to peak the parked call (and sometimes even before) Asterisk 
dies with segmentation fault.
As I said before It doesn't depend if I made a call from SIP to SIP or 
MGCP to SIP or MGCP to MGCP extension.
The final result (the server crashing with segfault) is always the same.
However If I do exactly the same but with the extension dialing 
directly from extensions.conf with:
exten = 183,1,Dial(MGCP/aaln/[EMAIL PROTECTED],40,tr)
the parking and recovering of the calls works correctly without any 
problem.

This is the output on the console:
=
*CLI -- Executing AGI(SIP/ipcontact.com.uy-0817d0c0, 
dummydial.agi|MGCP/aaln/[EMAIL PROTECTED]) in new stack
   -- Launched AGI Script /var/lib/asterisk/agi-bin/dummydial.agi
 dummydial.agi|MGCP/aaln/[EMAIL PROTECTED]: Dialing: MGCP/aaln/[EMAIL PROTECTED]
   -- AGI Script Executing Application: (Dial) Options: 
(MGCP/aaln/[EMAIL PROTECTED]|40|t)
   -- MGCP mgcp_request(aaln/[EMAIL PROTECTED])
   -- MGCP cw: -1, dnd: 0, so: 0, sno: 0
   -- MGCP mgcp_new(MGCP/aaln/[EMAIL PROTECTED]) created in state: Down
   -- Called aaln/[EMAIL PROTECTED]
   -- MGCP/aaln/[EMAIL PROTECTED] is ringing
   -- Endpoint 'aaln/[EMAIL PROTECTED]' observed 'hd'
   -- MGCP/aaln/[EMAIL PROTECTED] answered SIP/ipcontact.com.uy-0817d0c0
   -- Attempting native bridge of SIP/ipcontact.com.uy-0817d0c0 and 
MGCP/aaln/[EMAIL PROTECTED]
Mar  3 16:07:42 NOTICE[458781]: rtp.c:264

[Asterisk-Users] SIP text messages with Asterisk

2003-10-03 Thread Luis Vazquez
Hello all, I'm new to this list and starting with Asterisk.

Have any of you have tried a SIP client (like Microsoft messenger) to 
sent text messages and voice through an Asterix server?
Is this possible or the Asterix server simply can't manage this kind of 
traffic?

Regards,
  Luis
___
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users