callback

Discussion in 'General' started by mfdukn, Feb 4, 2009.

  1. mfdukn

    Joined:
    Sep 10, 2007
    Messages:
    16
    Likes Received:
    0
    Hello!
    I have elastix-1.2. with one outgoing route.This route has some alternative trunks(SIP trunks, but it is fxo gateway). maximum channels on every trunk is 1. When outgoing several calls from local extenisions are going on at one time, first call goes to first trunk, the second call to second trunk and so on. OK! But if outgouing call is initiated by callback, the second call doesn't see that first trunk is busy and tries to seize it. Unsuccesfully, of course. extension gets 'busy here'. No one outgoing call cannot be established, till callback's call hung up.
    :(
     
  2. tom@intersoft.net.au

    Joined:
    Jun 26, 2008
    Messages:
    32
    Likes Received:
    0
    I have the same problem.

    I have a number of SIP trunks each with max channels set. Calls made by extensions work as expected, failing through to the next trunk if the first has the maximum amount of calls, but callback just keeps sending calls over the first trunk regarless of the amount of calls already there.

    I'll have a hunt through the extensions config files and see what I can find...

    BTW, this is also an old version (1.0-17)... So maybe this has been fixed by now?
     
  3. tom@intersoft.net.au

    Joined:
    Jun 26, 2008
    Messages:
    32
    Likes Received:
    0
    Ok, callback seems to use /var/lib/asterisk/bin/callback to make the call and doesn't use whatever macro is normally called to dial, and therefore bypasses checking the 'maximum channels'
     
  4. tom@intersoft.net.au

    Joined:
    Jun 26, 2008
    Messages:
    32
    Likes Received:
    0
    UPDATE:

    The callback script uses 'originate' through the AMI to make the call, the channel used is Local/XXXXXXXX@from-internal, so I think it SHOULD use the same macros, etc. as a call placed from an extension...

    When I get a chance I'll make a call from an extension, and then make a call using the callback script (I assume I can call it from the comand line?) and compare the CLI output. Hopefully that should give me some leads at least...

    Does anyone else have any ideas or know if this is already fixed in a newer version?
     
  5. tom@intersoft.net.au

    Joined:
    Jun 26, 2008
    Messages:
    32
    Likes Received:
    0
    Ok.

    The callback script does user the same method to dial out as a normal extension AND it DOES check if max channels has been reached, and if it has it DOES fail through to the next trunk.

    The problem is that chanfull doesn't seem to recognise calls made by callback and add them to the number of channels used.

    IE. If you make a call with an extension, then make a call with callback, callback WILL fail through to the next trunk. However if you make a call with callback, then make a call with ANYTHING else, it will not fail through because as far as chanfull is concerned, the channel is empty.


    ...still have no idea why...
     
  6. tom@intersoft.net.au

    Joined:
    Jun 26, 2008
    Messages:
    32
    Likes Received:
    0
    ...Well, now I've tracked down exactly why this doesn't work, but I have no idea how it might be fixed.

    The problem is this...

    With a normal outgoing call the channel making the outgoing call (SIP/2002-0a1f4ac8 for eg.) adds itself to the group for the trunk it uses, when the call is finished, it is removed from the group.

    However, with callback Local/XXXXXXXX@from-internal actually makes the call and adds itself to the group. Then, when the person being called back answers, Local/XXXXXXXX@from-internal hangs up and the call is transfered to the destination of the callback. This means that the channel is cleared/removed from the trunk's group as soon as the person being called back answers.

    The only way around this that I can see is to reverse the internal/external destinations in the originate call in callback... though this would mean the internal extension would have to answer before the external would be called... which wouldn't work...

    Its starting to seem like I'm talking to myself here :-S does anyone else have any ideas?
     

Share This Page