[Asterisk-Users] SIP call hangup from asterisk CLI

Abhimanyu Rapria Abhimanyu at Synotek.com
Wed Apr 12 03:26:45 MST 2006


Hi,

We are using Vicidial and sometime even when agent disconnects, outgoing
call originated by dialer is still active. Since call was initiated by
dialer and then bought into meetme conference of agent and we can't corelate
this call to any agent channel.


When agents are dialing, channels doesn't show calls

vicidial2*CLI> show channels

Channel              Location             State   Application(Data)

Local/78600051 at defau 78600051 at default:1   Up      MeetMe(8600051|q)

Local/78600051 at defau 8309 at default:3       Up      Wait(3600)

SIP/primus-8f43      (None)               Ringing AppDial((Outgoing Line))

Local/761394353177 at d 761394353177 at default Ring    Dial(
SIP/61394353177 at primus||t

Local/761394353177 at d s at default:1          Down    (None)

Local/78600053 at defau 78600053 at default:1   Up      MeetMe(8600053|q)

Local/78600053 at defau 8309 at default:3       Up      Wait(3600)

SIP/primus-00fe      (None)               Ringing AppDial((Outgoing Line))

Local/761394357078 at d 761394357078 at default Ring    Dial(
SIP/61394357078 at primus||t

Local/761394357078 at d s at default:1          Down    (None)

Local/78600054 at defau 78600054 at default:1   Up      MeetMe(8600054|q)

Local/78600054 at defau 8309 at default:3       Up      Wait(3600)

SIP/primus-95db      8600051 at default:1    Up      MeetMe(8600051)

Zap/pseudo-122590356 s at default:1          Rsrvd   (None)

SIP/agent7-44fa      8600055 at default:1    Up      MeetMe(8600055)

SIP/primus-0a7c      8600053 at default:1    Up      MeetMe(8600053)

SIP/primus-7c73      8600054 at default:1    Up      MeetMe(8600054)

Local/78600052 at defau 78600052 at default:1   Up      MeetMe(8600052|q)

Local/78600052 at defau 8309 at default:3       Up      Wait(3600)

SIP/primus-2ed8      8600052 at default:1    Up      MeetMe(8600052)

Zap/pseudo-104079549 s at default:1          Rsrvd   (None)

SIP/agent1-32b5      8600054 at default:1    Up      MeetMe(8600054)

Zap/pseudo-204709889 s at default:1          Rsrvd   (None)

SIP/agent8-d3ab      8600056 at default:1    Up      MeetMe(8600056)

SIP/agent5-ec77      8600051 at default:1    Up      MeetMe(8600051)

Zap/pseudo-926666046 s at default:1          Rsrvd   (None)

SIP/agent3-2df5      8600053 at default:1    Up      MeetMe(8600053)

Zap/pseudo-204290210 s at default:1          Rsrvd   (None)

SIP/agent2-4ff6      8600052 at default:1    Up      MeetMe(8600052)

SIP/primus-fc90      8600051 at default:1    Up      MeetMe(8600051)

Zap/pseudo-170346238 s at default:1          Rsrvd   (None)

31 active channels

After agents have logged out


vicidial2*CLI> show channels
Channel              Location             State   Application(Data)
SIP/primus-fc90      8600051 at default:1    Up      MeetMe(8600051)
Zap/pseudo-170346238 s at default:1          Rsrvd   (None)


Calls doesn't show channels

vicidial2*CLI> sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Form  Hold     Last
Message
203.63.248.197   122001      20a58a2e251  00651/00000  unkn  No
203.196.128.56   6135625116  5420f80176e  00102/00000  g729  No       Tx:
ACK

calls doesn't show channel
CLI>sip show channel 5420f80176e

  * SIP Call

  Direction:              Outgoing

  Call-ID:                5420f80176e3e56679ce4e537ffdbd3f at 203.196.128.56

  Our Codec Capability:   256

  Non-Codec Capability:   1

  Their Codec Capability:   256

  Joint Codec Capability:   256

  Format                  g729

  Theoretical Address:    203.196.128.56:5060

  Received Address:       203.196.128.56:5060

  NAT Support:            RFC3581

  Audio IP:               220.227.174.4 (local)

  Our Tag:                as7a55ac7a

  Their Tag:              29258

  SIP User agent:

  Username:               61356251162

  Peername:               90340

  Original uri:           sip:61356251162 at 216.181.122.44:5060

  Need Destroy:           0

  Last Message:           Tx: ACK

  Promiscuous Redir:      No

  Route:                  sip:61356251162 at 203.196.128.56
;ftag=as7a55ac7a;lr=on

  DTMF Mode:              rfc2833

  SIP Options:            (none)
BUT ONE THING IS COMMON IS THAT OLDEST SIP CALL WILL COME IN THE BOTTOM OF
THE LIST of COMMAND sip show channels (agents will be above it) so it is
hung and needs to be destroyed manually. Also channel corresponding to this
call will also come in the bottom of SHOW Channels command for same
technology i.e. it will be last SIP/XYZ entry so to destroy this call lets
try destroy last SIP channel entry.


vicidial2*CLI> soft hangup SIP/primus-fc90
Requested Hangup on channel 'SIP/primus-fc90'
    -- Hungup 'Zap/pseudo-1703462386'
  == Spawn extension (default, 8600051, 1) exited non-zero on
'SIP/primus-fc90'
    -- Executing DeadAGI("SIP/primus-fc90", "call_log.agi|h") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/call_log.agi
    -- AGI Script call_log.agi completed, returning 0
    -- Executing DeadAGI("SIP/primus-fc90", "VD_hangup.agi|h") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/VD_hangup.agi
    -- AGI Script VD_hangup.agi completed, returning 0




vicidial2*CLI> sip show channels
Peer             User/ANR    Call ID      Seq (Tx/Rx)  Form  Hold     Last
Message
0 active SIP channels


IT WORKS!! A crude way but very important to save 100 of dollars of hung
call while agent are dialing. You can always do stop now but then whole
operations will stop.

Dont know why this happens in first place but atleast I have seen it coming
twice and now keep a vigil that no call is below the agents in sip show
channels, it there is any it means its a hung call costing you money

Abhimanyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060412/482b93e4/attachment.htm


More information about the asterisk-users mailing list