$agi->hangup() Does Not Hang Up The Channel

Home » Asterisk Users » $agi->hangup() Does Not Hang Up The Channel
Asterisk Users 4 Comments

Hello All,

I need to use agi to handle some issue , after finishing agi i want to hang up the channel , if i call from an extension there is no problem but i want to be the same for PSTN (outside) caller , if someone call asterisk show the hang up channel but the caller is not disconnected and if meanwhile someone inside try to call from an extension the outide caller can listen to DTMF and everything . . . . I would be really grateful if you share your close experience .

Regards, Mehdi

4 thoughts on - $agi->hangup() Does Not Hang Up The Channel

  • If this is on Analog (FXO) lines then you may be out of luck. In India, at least, the called party cannot hang up an incoming call on an analog line — the caller has to do it.

    In any case, what happens if you execute HangUp() in your dialplan instead of in AGI?

    Regards,

    — Raj

  • Thank you for your reply i did it in both ways (AGI and DIALPLAN) but not working. so you mean it is because of telco ?
    what about digital lines such as E1 ?

    Regards, Mehdi

  • This is happen whenever caller calls from mobile phone and if the caller calls from analog line i can handle with :

    ;exten => s,n,Playtones(congestion) ; send the audio sequence that humans understand means “congestion”
    ;exten => s,n,Congestion(5) ; signal the other end of congestion. Wait for hangup.

    and call hangs up from the telco , but it does not for mobile calls

    Regards, Mehdi

  • From my experience: the call gets disconnected if the called party executes HangUp on a digital line. The problem is only with Analog lines.

    Regards,

    — Raj