Limit outbond calls duration to 1 minute

Home » Asterisk Users » Limit outbond calls duration to 1 minute
Asterisk Users 5 Comments

hello list

i have configured a sip account in order to do an outbound calls and i want to force a hang up after 1 min for 222 sip in extensions.conf i have

exten => 222,1,MixMonitor(sip_${EXTEN}_${UNIQUEID}.wav|av(0}V(0))
exten => 222,n,AbsoluteTimeout(60)
exten => 222,n,Set(AUDIOHOOK_INHERIT(MixMonitor)=yes)
exten => 222,n,Dial(SIP/${EXTEN},,KkTt)
exten => 222,n,Hangup();

could you please see this code and tell me what is wrong

5 thoughts on - Limit outbond calls duration to 1 minute

  • exten => 222,n,Dial(SIP/${EXTEN},,KkTtLL(60000:30000:10000))

    this will call the extension and sets the limit to 60000MS which equals 60 seconds.. and will inform the caller of his remaining time when he has only 30 seconds left.. and will repeat the notification every ten seconds (this is an over do and playing such sounds files at this rate will consume the resources!)

    Tarek Sawah

    Information Technology Adviser

    Integrated Digital Systems


    USA: +1 386 492 9993

    but there is no exemple for when i must put X in order to limit the call

    can you please give me an exemple

  • ok thanks it’s work fine

    now i have one question please

    it’s work fine when i call extension 222 but i want to call any number from
    my sip account 222 and the call hang up after 1 Min

    for exemple i call my mobile phone 067XXXXXXX using my sip 222 (x-lite) and
    the call hangup after 1 min

    any help please

    thanks and regards

    2011/9/28 Tarek Sawah

  • (top-posting mess fixed the lazy man’s way …..)

    What you have to do is create a new context in extensions.conf, and specify
    this in sip.conf as the default context from extension 222. Then, use the
    same KkTtL(60000) options to your Dial() command(s) within this context.

    If there are some numbers that you want to be able to make unlimited-length
    calls to (other SIP phones that don’t require going out via the PSTN, for
    example), just give them their own extension(s) without the KkTlL(60000) .

    Remember, Asterisk always tries to match “hardest first”, i.e. fewest “wild
    card” characters first, irrespective of the actual order of lines in

  • ok thanks for your response i will try that and i will update you as soon as
    i have any result

    best regards

    2011/9/29 A J Stiles

  • Hi

    Thanks everyone for your help and support all works perfectly

    Best Regards

    2011/9/29 salaheddine elharit