[asterisk-users] rtp connection remained when call busy using agi for call control

CHEN XUEQIN chenxq at star-net.cn
Fri Mar 19 01:50:49 CDT 2010


Hi there:

    I compiled asterisk 1.6.2.6 and install it on my Ubuntu
OS. I run a perl fastagi for call control. Two SIP ua register
  asterisk, here as UA_1, UA_2. The problem can be reproduced
in following step.

    1) SIP UA_1 and UA_2 successfully register to asterisk

    2) UA_1 call UA_2, send invite to asterisk

    3) asterisk execute a dialpan, as following

      exten => _X.,1,Agi(agi://127.0.0.1/dial_handler)
      exten => _x.,1,Hangup

      dial_handler is a perl FastAGI server, it just query
      some variable, call SetAMAFlags application, finally
      call Dial application for invite UA_2

     3) UA_2 ring, but reject the call by send 486 busy

     4) AGI call hangup then exit

     5) call end, use netstat find two udp port used by asterisk
        like these

        netstat -anup
udp        0      0 0.0.0.0:14634           0.0.0.0:*                           4219/asterisk
udp        0      0 0.0.0.0:14635           0.0.0.0:*                           4219/asterisk

        It will remain forever, unless restart asterisk.

    For information,

     1) UA_1 call UA_2 directly by dial application, rtp connection will be
     destroyed normal.
     2) UA_1 call UA_2 also by AGI, if UA_2 answer, then hangup, rtp
      connection will also be destroyed normal.

    Why the rtp connection remained when UA_2 reject the call? If I use
    asterisk for many calls, the rtp connection resource will be occupied
    to much. Anything wrong in my AGI program or dialplan ?

    Thanks in advance.


    Regards,

    Chen








More information about the asterisk-users mailing list