Koozali.org: home of the SME Server

Double Dial to Make Outgoing

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Double Dial to Make Outgoing
« on: September 29, 2009, 01:11:24 PM »
I am having a recurring problem making calls. Sail 2.3.2-12 and Linksys SPA942 handset.

The problem is if I dial a number on the SPA I immediatley get Declined but if I immediately redial the call goes through. Output from asterisk CLI is below - the first call seems to fail at ast_carefulwrite.

(Note I have changed the dialled number to 1234567)

Code: [Select]
-- Executing [1234567@internal:1] AGI("SIP/5001-08ddf938", "selintra|OutCluster|1234567") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
[Sep 29 12:00:16] NOTICE[13139]: utils.c:938 ast_carefulwrite: Timed out trying to write
    -- AGI Script selintra completed, returning 0
  == Auto fallthrough, channel 'SIP/5001-08ddf938' status is 'UNKNOWN'
    -- Executing [h@internal:1] Hangup("SIP/5001-08ddf938", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/5001-08ddf938'
    -- Executing [1234567@internal:1] AGI("SIP/5001-08de3948", "selintra|OutCluster|1234567") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script selintra completed, returning 0
    -- Executing [1234567@default:1] AGI("SIP/5001-08de3948", "selintra|OutRoute|UK Landline") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
    -- AGI Script Executing Application: (Dial) Options: (SIP/00441211234567@SIPDiscount||)
    -- Called 00441211234567@SIPDiscount
    -- SIP/SIPDiscount-08de7958 is making progress passing it to SIP/5001-08de3948
  == Spawn extension (default, 1234567, 1) exited non-zero on 'SIP/5001-08de3948'
    -- Executing [h@default:1] Hangup("SIP/5001-08de3948", "") in new stack
  == Spawn extension (default, h, 1) exited non-zero on 'SIP/5001-08de3948'

This only appears to happen on external calls.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #1 on: September 29, 2009, 09:49:16 PM »
At the asterisk console do

Code: [Select]
agi debug
Run your calls again and post the output

Thanks

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Re: Double Dial to Make Outgoing
« Reply #2 on: September 29, 2009, 10:04:45 PM »
As requested. Again the number has been changed. I was also wrong about internal calls - they are the same

Code: [Select]
smeserver*CLI> agi debug
AGI Debugging Enabled
    -- Executing [1234567@internal:1] AGI("SIP/5001-08de2588", "selintra|OutCluster|1234567") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: SIP/5001-08de2588
[Sep 29 20:55:13] NOTICE[4529]: utils.c:938 ast_carefulwrite: Timed out trying to write
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1254254113.68
AGI Tx >> agi_callerid: 5001
AGI Tx >> agi_calleridname: NashCDL
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 1234567
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: internal
AGI Tx >> agi_extension: 1234567
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> CLI>
AGI Rx << GET VARIABLE EXTLEN
AGI Tx >> 200 result=1 ()
    -- AGI Script selintra completed, returning 0
  == Auto fallthrough, channel 'SIP/5001-08de2588' status is 'UNKNOWN'
    -- Executing [h@internal:1] Hangup("SIP/5001-08de2588", "") in new stack
  == Spawn extension (internal, h, 1) exited non-zero on 'SIP/5001-08de2588'
    -- Executing [1234567@internal:1] AGI("SIP/5001-08de6598", "selintra|OutCluster|1234567") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: SIP/5001-08de6598
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1254254116.69
AGI Tx >> agi_callerid: 5001
AGI Tx >> agi_calleridname: NashCDL
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 1234567
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: internal
AGI Tx >> agi_extension: 1234567
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> CLI>
AGI Rx << GET VARIABLE EXTLEN
AGI Tx >> 200 result=1 ()
AGI Rx << SET PRIORITY 1
AGI Tx >> 200 result=0
AGI Rx << SET EXTENSION 1234567
AGI Tx >> 200 result=0
AGI Rx << SET CONTEXT default
AGI Tx >> 200 result=0
    -- AGI Script selintra completed, returning 0
    -- Executing [1234567@default:1] AGI("SIP/5001-08de6598", "selintra|OutRoute|UK Landline") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: SIP/5001-08de6598
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1254254116.69
AGI Tx >> agi_callerid: 5001
AGI Tx >> agi_calleridname: NashCDL
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 1234567
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: default
AGI Tx >> agi_extension: 1234567
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >> CLI>
AGI Rx << GET VARIABLE EXTLEN
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE PLAYBEEP
AGI Tx >> 200 result=1 (YES)
AGI Rx << GET VARIABLE PLAYBUSY
AGI Tx >> 200 result=1 (YES)
AGI Rx << GET VARIABLE PLAYCONGESTED
AGI Tx >> 200 result=1 (YES)
AGI Rx << GET VARIABLE EXTLEN
AGI Tx >> 200 result=1 ()
AGI Rx << GET VARIABLE VOIPMAX
AGI Tx >> 200 result=1 (3)
AGI Rx << GET VARIABLE ALLOWHASHXFER
AGI Tx >> 200 result=1 (disabled)
AGI Rx << SET CALLERID 0845987654
AGI Tx >> 200 result=1
AGI Rx << SET VARIABLE GROUP() "OUTBOUND_GROUP"
AGI Tx >> 200 result=1
AGI Rx << GET VARIABLE GROUP_COUNT()
AGI Tx >> 200 result=1 (1)
AGI Rx << GET VARIABLE CALLRECORD1
AGI Tx >> 200 result=1 (None)
AGI Rx << EXEC Dial SIP/00441211234567@SIPDiscount||
    -- AGI Script Executing Application: (Dial) Options: (SIP/00441211234567@SIPDiscount||)
    -- Called 00441211234567@SIPDiscount
    -- SIP/SIPDiscount-08dea5a8 is making progress passing it to SIP/5001-08de6598
AGI Tx >> 200 result=-1
  == Spawn extension (default, 1234567, 1) exited non-zero on 'SIP/5001-08de6598'
    -- Executing [h@default:1] Hangup("SIP/5001-08de6598", "") in new stack
  == Spawn extension (default, h, 1) exited non-zero on 'SIP/5001-08de6598'
smeserver*CLI>

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #3 on: October 01, 2009, 01:07:51 AM »
Not a clue why this is happening.  The carefullwrite error almost certainly means that Asterisk isn't loading the AGI correctly.  There are some references to similar behaviours on the Asterisk bulletin boards.

No idea what to suggest because it looks like an Asterisk error.  Perhaps a later/earlier asterisk release?

Best


S

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Re: Double Dial to Make Outgoing
« Reply #4 on: October 02, 2009, 10:41:16 AM »
Also discovered that inbound had the same problem. Incoming call, phone rings, answer, no audio in either direction. The ast_carefulwrite error was occurring at beginning of call handling. If a call was made, answered, hungup and immediately redialled the call was OK.

Anyway, I did an Initialiaise / Regen / Comit / Stop / Start sequence in PCI Cards to regenerate the dahdi and system conf files and all has returned to normal. I know I did this the last time I updated Sail so not sure what has happened since to mess it up.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #5 on: October 02, 2009, 11:04:24 AM »
Hmmmm

Clearly an Asterisk issue then.  Strange that a regen should clear it up.  Anyway, glad you are back on the road and thanks for posting back.

Kind Regards

S

 

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Re: Double Dial to Make Outgoing
« Reply #6 on: October 02, 2009, 01:59:29 PM »
OK - I spoke too soon. The fix only lasted for a while. There seems to be some time element involved with the error. If I double dial and get a call working and then make further calls they continue to work, but after a period of inactivity - no calls - the ast-carefulwrite problem returns. I haven't determined the exact period of time involved but maybe 5 minutes.

I have since upgraded to latest sail release 2.3.2-15, regened the dahdi conf again and still get ast-carefulwrite errors on first dial out or first call in. Asterisk forums seem to suggest reverting to asterisk 1.4.22 but I can't find the rpms.
« Last Edit: October 02, 2009, 02:17:11 PM by timn »

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #7 on: October 02, 2009, 03:05:55 PM »
Hmmm

I might be tempted to go forward rather than back.  I'm 99% sure that this isn't a sail problem (famous last words) so I would try 1.4.24 or later, if you can find kmdls that will run with your kernel.  Other alternative is a compile from sources.

Best

S

Offline David Harper

  • *
  • 653
  • +0/-0
  • Watch this space
    • Workgroup Technology Solutions
Re: Double Dial to Make Outgoing
« Reply #8 on: October 03, 2009, 06:52:44 AM »
I'm not sure whether this will help you or not, but check my RPM archive at http://sme.david-harper.com/data/

Offline timn

  • *
  • 62
  • +0/-0
    • Nash CDL
Re: Double Dial to Make Outgoing
« Reply #9 on: October 05, 2009, 04:20:27 PM »
Sark Devs

I am already running asterisk-1.4.25.1-78 and dhadi, hence thought about going back to 1.4.21 and zaptel. I assume forward would mean 1.6.

David
Thanks, I had already found your archive.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #10 on: October 05, 2009, 07:19:01 PM »
1.4.26.2 is available from Digium and 1.4.27 rc1 is just out or, as you say you can go back to zaptel 1.4.21.


Best

S

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Double Dial to Make Outgoing
« Reply #11 on: October 07, 2009, 10:57:40 AM »
Hmm, not sure what I've done here. I was having the same problem as timn but mainly when I was dialing the wakeup call. After seeing this thread I thought I'd have a go at updating Asterisk to try and fix the problem. I decided to go with the atrpms version (asterisk14) but now it seems as though asterisk is expecting the files to be located in /usr/share:
Code: [Select]
[Oct  7 19:33:51] ERROR[7161]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
AGI Tx >>
[Oct  7 19:33:51] ERROR[7161]: utils.c:966 ast_carefulwrite: write() returned error: Broken pipe
AGI Rx << verbose "Failed to execute '/usr/share/asterisk/agi-bin/selintra': No such file or directory" 2
  ==  selintra|OutCluster|77: Failed to execute '/usr/share/asterisk/agi-bin/selintra': No such file or directory
AGI Tx >> 200 result=1
Here's what I've got installed:
Code: [Select]
[root@server sail]# rpm -q asterisk14 asterisk-addons14 sail
warning: only V3 signatures can be verified, skipping V4 signature
asterisk14-1.4.26.1-86.el4
warning: only V3 signatures can be verified, skipping V4 signature
asterisk-addons14-1.4.9-24.el4
sail-2.3.2-15
[root@server sail]#
Is there something I can do to make asterisk look in /var/lib or should I just roll back to asterisk-1.4.25.1-78.el4.i386.rpm from smecontribs?
Regards, Lloyd

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #12 on: October 07, 2009, 11:36:25 AM »
Hi Lloyd

I don't know what Asterisk14 is.  I've never seen that naming convention before.  Usually, you just intall asterisk.

Best

Jeff


Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Double Dial to Make Outgoing
« Reply #13 on: October 07, 2009, 12:01:44 PM »
With atrpms, asterisk has been split into asterisk12, asterisk14 and asterisk160. See http://www.mail-archive.com/atrpms-devel@atrpms.net/msg00462.html for more info. Basically asterisk from atrpms is now Asterisk 1.6.
Lloyd

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Double Dial to Make Outgoing
« Reply #14 on: October 07, 2009, 12:10:28 PM »
Ah OK,

I wasn't aware of that.  The location of the AGI directory is set in asterisk.conf in the variable astagidir.

I don't know why they would have changed it though.

Best

Jeff

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Double Dial to Make Outgoing
« Reply #15 on: October 07, 2009, 12:12:22 PM »
ln -s /var/lib/asterisk/agi-bin/selintra /usr/share/asterisk/agi-bin/
seems to have got things back on track. Maybe the old asterisk.conf got clobbered.
Ta