No recognition of incoming calls

Installed FOP2 2.11 on Trixbox v 2.8.0.5 and am getting no recognition of incoming calls in FOP2. I've used the visual phonebook database as a lookup source for Trixbox and that's picking the correct record to display on the phone. No SQL query originated by FOP2 though. Extension simply shows inactive on both lines.

Tried to compare this to a working setup using Trixbox 2.6 and can't see any difference in my configuration. Any ideas on what's going wrong or how I can investigate further?

Thanks

Carlos.

Comments

  • Did you try:

    /usr/local/fop2/fop2_server --test

    ??
  • Hi,

    Yes. Received "Connection to manager OK!"

    Carlos
  • What is the output from /usr/local/fop2/autoconfig-buttons-freepbx.sh ?

    If you do not see button activity, the button definitions are wrong or the manager is not responding to events at all. You can also run fop2_server in debug mode: /usr/local/fop2/fop2_server -X 15

    Best regards
  • Output of autoconfig-buttons-freepbx.sh is normal.

    However /usr/local/fop2/fop2_server -X 15 generates: Can't listen to port 4445

    Tried to search for this on forum, but the search seems to be not working at present. Regards this as too common words.

    Thanks,

    Carlos
  • Sorry, forgot to say that netstat -nta gives:

    0.0.0.0:4444 0.0.0.0:* LISTEN
    0.0.0.0:4445 0.0.0.0:* LISTEN

    as I changed FOP1 to port 4444

    Carlos
  • Just to add a little more!

    I realised that I needed to stop the fop2 server and restart with -X 15 . Silly me!

    I've also noticed that internal calls show:

    500 Carlos
    Line1 device
    Line2 inactive

    501 Mobile
    Line1 501
    Line 2 inactive

    when calling extension 501 from extension 500

    What's the "device" mean?

    Carlos
  • FOP2 will display callerid as present in AMI events. The "device" is the callerid name for any sip peers on a standard FreePBX setup. If you see something, then there is activity showing?
  • Hi Nicolas,

    After some more experimentation, here are my finding:

    Trixbox 2.6 + FOP 2.11
    Inbound route straight to extension:
    FOP2 shows calling number at extension, Calling number and name shown on pop-up.

    Inbound route to queue:
    FOP2 shows calling number on all extensions which are queue agents. Shows calling number and name in queue. Shows calling name and number in pop-up.

    Trixbox 2.8 + FOP 2.11
    Inbound route straight to extension:
    FOP2 shows [u:3bfxb89z]called[/u:3bfxb89z] extension number at extension e.g ext 502 shows 502 calling. No pop-up.

    Inbound route to queue:
    FOP2 shows [u:3bfxb89z]called[/u:3bfxb89z] extension number at extension. Shows [u:3bfxb89z]calling[/u:3bfxb89z] number [u:3bfxb89z]and[/u:3bfxb89z] name in queue. No pop-up.
    (Each extension shows own number as calling number e.g. ext 511 shows 511 as calling number, 512 shows 512)

    I can only assume that FOP2 must be being given the calling number as it appears in the queue, but why isn't the extension showing the calling number (only shows own extension number calling) and there's no pop-up?

    Thanks

    Carlos.
  • Carlos, popups will not show if the callerid matches the extension, as you do not want self popups (as when doing originations). I have other reports of FreePBX using a RINGGROUP number as the called number, and not the callerid of the person calling. That change is in the ringgroup macro for some freepbx version. And it is freepbx that uses that callerid and fop2 just displays it. I do not have reports of this behavior on anything but ringgroups.

    If you can provide me access to your trixbox 2.8 I can take a deeper look, but it is a dialplan issue, not a fop2 issue...

    Best regards,
  • Hi Nicolas,

    Thanks for the offer, but I won't put you to trouble just yet ;-)

    Do you mean a difference in the extensions.conf file?

    Carlos.
  • Most probably yes.. a difference in the ring group dialplan for FreePBX, or something to that effect.
  • Hi Nicolas,

    Done a "diff" on the freepbx core modules, extensions.conf, sip.conf, iax.conf, and features.conf, between the Trixbox 2.8 (not working) and the Trixbox 2.6 (working) versions. Both exactly the same!

    Any other thoughts?
    Carlos.
  • Do not check the modules, but the dialplans or agi scripts. there are parts of the dialplan that are static (not _additional or _custom files).
  • Hi Nicolas,

    I'll try and get a report from fop2_server -X 15 for you if this will help guide you to the issue.

    Carlos
  • Hi Nicolas,

    Here's a snip from the screen:

    http://www.ripon.org/carlos/screen.jpg

    showing the incoming call to the queue, but each extension showing its own calling number.

    Carlos
  • Nicolas,

    Seem to be getting somewhere at last. If an agent logs into a queue via FOP2, then the CALLING number is shown as ringing the agent's extension and hence the pop-up works.

    If an agent logs into a queue via (queue number)* e.g. 803* or the agent is placed permanently into the queue via trixbox static agents, then it's the AGENT number which is shown as ringing the agent's extension, and hence no pop-up.

    Any thoughts?

    Carlos
  • Not sure how is the agent-add macro doing its thing, you should look at the "queue show" output from the asterisk cli to see how are the agents added, and if they use Local/XXX@YYY, verify that the button configuration use extension=XXX and queuecontext=YYY. You can see that by running autoconfig-buttons-freepbx.sh. There must be a coincidence between extension/queuecontext in both the queue member and the button config so fop2 can match the inbound call as a queue member call.
  • Hi Nicolas,

    Just had a further look and Trixbox adds to the queue:

    member=Local/500@from-internal/n,0

    when adding a static member. If I change this to:

    member=SIP/500

    then it works as expected. At least until Trixbox is relaoded and overwrites the change.

    Tried "queue show" and it gives Local/500@from-internal/n in both v2.6 and 2.8
    Also autoconfig-buttons-freepbx.sh gives:

    [QUEUE/803]
    type=queue
    extension=803
    label=Sales
    context=ext-queues
    queuecontext=from-internal
    extenvoicemail=*

    again in both v2.6 and 2.8

    To add yet more, setting the destination of an inbound route directly to an extension results in the CALLED extension being displayed against the extension in FOP2.

    Carlos.
  • Look at the extension configuration in the buttons.cfg file, not the queue configuration, and see if they have the queuecontext set and to what value it is set.. it should be "from-internal", but maybe it is set to "from-queue". If that is the case, you must change the autoconfiguration button script to use the correct queuecontext for your setup.
  • The thing is that as far as I know , FreePBX 2.6 or 2.7 introduced the from-queue context, so from-internal is used for older freepbx install.
  • Yet more info Nicolas,

    Using 2 setups, one with static queue members (not working) and one with dynamic members (working), I've had a look at the output of fop2_server -X 15 and here are the major differences:

    Static:

    127.0.0.1 <- Event: Newchannel
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Channel: Local/500@from-internal-0f29;1
    127.0.0.1 <- ChannelState: 0
    127.0.0.1 <- ChannelStateDesc: Down
    127.0.0.1 <- CallerIDNum:
    127.0.0.1 <- CallerIDName:
    127.0.0.1 <- AccountCode:
    127.0.0.1 <- Uniqueid: 1290532841.6
    127.0.0.1 <- Server: 0


    Dynamic:

    127.0.0.1 <- Event: ChannelUpdate
    127.0.0.1 <- Privilege: system,all
    127.0.0.1 <- Channel: SIP/500-00000009
    127.0.0.1 <- Uniqueid: 1290532944.13
    127.0.0.1 <- Channeltype: SIP
    127.0.0.1 <- SIPcallid: 7fb80dba1efb090159448854183948a7@192.168.200.49
    127.0.0.1 <- SIPfullcontact: sip:500@192.168.200.37:5068;transport=udp
    127.0.0.1 <- Server: 0

    127.0.0.1 <- Event: ChannelUpdate
    127.0.0.1 <- Privilege: system,all
    127.0.0.1 <- Channel: SIP/500-00000009
    127.0.0.1 <- Channeltype: SIP
    127.0.0.1 <- SIPcallid: 7fb80dba1efb090159448854183948a7@192.168.200.49
    127.0.0.1 <- SIPfullcontact: sip:500@192.168.200.37:5068;transport=udp
    127.0.0.1 <- Peername: 500
    127.0.0.1 <- Server: 0

    127.0.0.1 <- Event: ExtensionStatus
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Exten: 500
    127.0.0.1 <- Context: ext-local
    127.0.0.1 <- Hint: SIP/500&Custom:DND500
    127.0.0.1 <- Status: 8
    127.0.0.1 <- Server: 0

    Further on we see the reason for the CID, i.e.

    Static:

    127.0.0.1 <- Event: Newstate
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Channel: SIP/500-00000006
    127.0.0.1 <- ChannelState: 5
    127.0.0.1 <- ChannelStateDesc: Ringing
    127.0.0.1 <- CallerIDNum: 500
    127.0.0.1 <- CallerIDName:
    127.0.0.1 <- Uniqueid: 1290532841.10
    127.0.0.1 <- Server: 0

    127.0.0.1 <- Event: Newstate
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Channel: SIP/501-00000007
    127.0.0.1 <- ChannelState: 5
    127.0.0.1 <- ChannelStateDesc: Ringing
    127.0.0.1 <- CallerIDNum: 501
    127.0.0.1 <- CallerIDName:
    127.0.0.1 <- Uniqueid: 1290532841.11
    127.0.0.1 <- Server: 0

    Dynamic:

    127.0.0.1 <- Event: Newstate
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Channel: SIP/500-00000009
    127.0.0.1 <- ChannelState: 5
    127.0.0.1 <- ChannelStateDesc: Ringing
    127.0.0.1 <- CallerIDNum: 07866676869
    127.0.0.1 <- CallerIDName: Trial: Stem Carl Marshall
    127.0.0.1 <- Uniqueid: 1290532944.13
    127.0.0.1 <- Server: 0

    127.0.0.1 <- Event: Newstate
    127.0.0.1 <- Privilege: call,all
    127.0.0.1 <- Channel: SIP/501-0000000a
    127.0.0.1 <- ChannelState: 5
    127.0.0.1 <- ChannelStateDesc: Ringing
    127.0.0.1 <- CallerIDNum: 07866676869
    127.0.0.1 <- CallerIDName: Trial: Stem Carl Marshall
    127.0.0.1 <- Uniqueid: 1290532944.14
    127.0.0.1 <- Server: 0

    It looks as though Asterisk is passing the CallerIDNum as the called extension! Any idea as to where to look in FreePBX to find where this may be generated?

    Carlos
  • Hi Carlos,

    I am not sure where to look, but you might want to traverse the dialplan priority by priority in both cases from the asterisk full log.. quite difficult to do, but I do not see any other way to spot differences? When you refer to static vs dynamic, it is always with Local/XXX@YYY/n queue members?
  • Hi Nicolas,

    No, the static queue agents show as Local/xxx@yyy/n either when added into the queue via Trixbox queues (same as FreePBX queues) or when added as dynamic using 803* to join queue 803. Both show this when looking at -X 15 output, i.e.:

    Static:

    127.0.0.1 <- Event: QueueMember
    127.0.0.1 <- Queue: 803
    127.0.0.1 <- Name: Local/500@from-internal/n
    127.0.0.1 <- Location: Local/500@from-internal/n
    127.0.0.1 <- Membership: static
    127.0.0.1 <- Penalty: 0
    127.0.0.1 <- CallsTaken: 0
    127.0.0.1 <- LastCall: 0
    127.0.0.1 <- CallAnswered: 0
    127.0.0.1 <- TalkTime: 0
    127.0.0.1 <- Status: 1
    127.0.0.1 <- Paused: 0
    127.0.0.1 <- Server: 0

    Or when added via 803* :

    127.0.0.1 <- Event: QueueMember
    127.0.0.1 <- Queue: 803
    127.0.0.1 <- Name: Local/500@from-internal/n
    127.0.0.1 <- Location: Local/500@from-internal/n
    127.0.0.1 <- Membership: dynamic
    127.0.0.1 <- Penalty: 0
    127.0.0.1 <- CallsTaken: 0
    127.0.0.1 <- LastCall: 0
    127.0.0.1 <- CallAnswered: 0
    127.0.0.1 <- TalkTime: 0
    127.0.0.1 <- Status: 1
    127.0.0.1 <- Paused: 0
    127.0.0.1 <- Server: 0

    However when added as a queue agent using FOP2, we get:

    127.0.0.1 <- Event: QueueMember
    127.0.0.1 <- Queue: 803
    127.0.0.1 <- Name: SIP/500
    127.0.0.1 <- Location: SIP/500
    127.0.0.1 <- Membership: dynamic
    127.0.0.1 <- Penalty: 0
    127.0.0.1 <- CallsTaken: 0
    127.0.0.1 <- LastCall: 0
    127.0.0.1 <- CallAnswered: 0
    127.0.0.1 <- TalkTime: 0
    127.0.0.1 <- Status: 1
    127.0.0.1 <- Paused: 0
    127.0.0.1 <- Server: 0

    Carlos.
  • Nicolas,

    This issue looks similar to one posted earlier which I've just noticed:

    View Post 328

    Did you manage to find an answer to that one?

    Carlos.
  • Hi Carlos,

    I already said it before, if the AMI events says the calleris is "INCORRECTNUMBER", fop2 will display that as the callerid number. Regarding the queue members, you can configure fop2 to use the same type as FreePBX by setting the queuechannel for the button.

    So from what you say it seems that the problem is with Local channels, it is not static vs dynamic, but Local vs SIP.

    Please capture the output from fop2_server -X 1 while doing a call which shows the incorrect clid and send me the capture privately so I can review it here and see if I can find the issue.

    Best regards,
  • Nicolas,

    Thanks for all you help on this one. I'll add this section even though you sorted it out privately since there may be others with the same issues with Trixbox 2.8.x

    /etc/asterisk/manager.conf has the recommended lines of:

    read=system,call,log,verbose,command,agent,user,originate
    write=system,call,log,verbose,command,agent,user,originate

    Changing this to:

    read=all
    write=all

    solved the problem.

    Many thanks for all your hard work.

    Carlos.
Sign In or Register to comment.