If you make your call files use a context, instead of a number, HANGUPCAUSE
will be available to you.  For example, let's say your call file now does
this:
Channel: DAHDI/2/ww12054918802
CallerID: SIP/104
MaxRetries: 1
WaitTime: 45
retryTime: 5
Application: record
Data: /tmp/DADHI2.wav

This calls a telco tone number and records into a file until asterisk is
restarted or the line is killed.  This example does the same thing but only
records for 20 seconds
Channel: DAHDI/2/ww12054918802
CallerID: SIP/104
MaxRetries: 1
WaitTime: 60
retryTime: 5
Set: ARG1=/tmp/test-2c.wav
Set: ARG2=8
Context: recordit
Extension: 104
You could make ARG3 be the number to call and make channel be LOCAL/1.


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Unni
Sent: Tuesday, August 18, 2009 9:56 AM
To: [email protected]; [email protected]
Subject: [asterisk-users] Get SS7 Hangup Code as Asterisk variable.

I'm making outbound calls by placing call files in the asterisk outgoing
directory. At times, the call would be hung by SS7 without even
attempting (due to error in the outgoing number). I get the following on
console:

    -- Attempting call on ss7/9297210213 for s...@croom:1 (Retry 1)
    -- Sent IAM CIC=22   ANI=9134904821 DNI=9297210213 RNI=
    -- SS7 hangup 'SS7/callserver/22' CIC=22 Cause=31 (state=7)

When a user actually hangs up without picking the phone, the SS7 Cause
code is 19. I need is to record the SS7 Cause code in my CDR to
differentiate between normal hangup and other issues.

Is there a variable that I can use? I tried DIALSTATUS and HANGUPCAUSE -
but both are to be used after a Dial() inside a dialplan.

Thanks for your time.
Unni
-- 
  Unni
  [email protected]

-- 
http://www.fastmail.fm - Faster than the air-speed velocity of an
                          unladen european swallow


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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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


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

AstriCon 2009 - October 13 - 15 Phoenix, Arizona
Register Now: http://www.astricon.net

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

Reply via email to