[Home]

Summary:ASTERISK-13104: IAX2 Channel queue members lose their extension number on queues in 1.6
Reporter:David O Reilly (trendboy)Labels:
Date Opened:2008-11-22 07:50:58.000-0600Date Closed:2008-12-17 15:27:49.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:If you create or add members on IAX2 channels to any queue the first call that comes in works perfectly and is sent to the IAX2 channel. Now ALL FUTURE CALLS in the queue will be queued forever :) as when Asterisk tries to connect to the IAX2 channel it uses the default s in the called number field (as seen by iax2 debug on).

I have tried all I know and I can't think of why it would act like this.

Here are the steps to reproduce:


Step 1: Set up a standard queue in the queues.conf
Step 2: Add an IAX2 channel as a member or do it dynamically in the extensions.ael
Step 3: Get your member to login and check to make sure they are actually logged in and ready to take calls with queue show
Step 4: Call your queue
Step 5: Ensure your call is connected and then end the call
Step 6: Call again in the exact same way

Effect: you will be on queue forever as Asterisk tries to call the default s extension instead of the members phone number!

In the additional information I have given some more debug information
Thanks for your time :)


****** ADDITIONAL INFORMATION ******

IAX2 debug for first call that works

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW
  Timestamp: 00017ms  SCall: 09315  DCall: 00000 [194.213.29.60:4569]
  VERSION         : 2
  CALLED NUMBER   : 0112345678  <bug info: I changed number for security :-)
  CODEC_PREFS     : ()
  CALLING NUMBER  : tarot
  CALLING PRESNTN : 0
  CALLING TYPEOFN : 0
  CALLING TRANSIT : 0
  CALLING NAME    : David
  LANGUAGE        : en
  USERNAME        : <my username removed from bug for security>
  FORMAT          : 4
  CAPABILITY      : 65535
  ADSICPE         : 2
  DATE TIME       : 2008-11-22  13:28:54


And the call connects fine.

Next all future calls go with the s context!! Very strange!! and of course my voip phone company has to drop the call as has no idea how to handle s as that would mean everybody :-) and so all future calls fail.


  VERSION         : 2
  CALLED NUMBER   : s
  CODEC_PREFS     : ()
  CALLING NUMBER  : <removed for this bug report>
  CALLING PRESNTN : 0
  CALLING TYPEOFN : 0
  CALLING TRANSIT : 0
  CALLING NAME    : David
  LANGUAGE        : en
  USERNAME        : <removed for this bug report>
  FORMAT          : 4
  CAPABILITY      : 65535
  ADSICPE         : 2
  DATE TIME       : 2008-11-22  13:29:30

And of course this is rejected by the phone company.

My queues.conf snippet is:

   [general]
   persistentmembers = yes




   [radio]
   music=default
   context=radio
   strategy=roundrobin


Now my extensions.ael has:

       1234 => {
                       Answer();
                       Read(AGENT_NUMBER,agent-enternum);
                       VMAuthenticate(${AGENT_NUMBER}@default,s);
                       Set(queue-announce-success=1);
                       AddQueueMember(radio,iax2/bluefaceout/0112345678,10);
               }

This just logs me in directly with my phone number which is have hidden for safety here as 0112345678. This login works perfectly and after being logged in you can see the login with queue show

eg (this is after the first one worked now won't work for future calls until asterisk is restarted) (phone number changed again for security here):

radio        has 0 calls (max unlimited) in 'rrmemory' strategy (2s holdtime), W:0, C:1, A:1, SL:0.0% within 0s
  Members:
     iax2/bluefaceout/0112345678 (iax2/bluefaceout) with penalty 10 (dynamic) (Not in use) has taken 1 calls (last was 707 secs ago)
  No Callers


Point to mention:

My phone company is set up via iax2 and works perfectly with my set up so there is no problem there - I can make and receive calls without issues through IAX2 normally.

Comments:By: David O Reilly (trendboy) 2008-11-24 09:52:26.000-0600

The problem doesn't happen with SIP channels as I set up the same queue with SIP extensions/channels and it worked fine (the config being completely the same except sip in place of iax2) - so the problem seems to be restricted to IAX2 channels only.

If there is anything I can add to help with this investigation please let me know and I will be delighted to help. Asterisk is a great product! you guys are fantastic!!!

By: Leif Madsen (lmadsen) 2008-11-24 12:56:09.000-0600

After you make the first call to the queue, does the status of the agent member go back to "Not In Use"?

I just tried it here, and when I do "queue show" from the Asterisk CLI, I get the member going back to "Unavailable".

Can you please show us your iax.conf, queue.conf, and extensions.conf (the appropriate pieces?)

By: Leif Madsen (lmadsen) 2008-11-24 12:59:50.000-0600

Disregard that. I just was testing with the same softphone, and it was causing me to not actually hang up the channel. It seems to be working fine for me when I call in using IAX2 and delivering it to an IAX2 peer.

By: Leif Madsen (lmadsen) 2008-11-24 13:00:33.000-0600

And I meant just disregard that I was showing "Unavailable" -- I still want to see your configuration :)

By: Leif Madsen (lmadsen) 2008-11-24 13:03:39.000-0600

Changing to feedback as I need more information about how to reproduce this issue. I have been unsuccessful in reproducing with an IAX2 peer. Works fine for me.

By: David O Reilly (trendboy) 2008-11-24 14:36:15.000-0600

Sure here is my conf:

Extensions.ael (the important bits) (I have no .conf as want to stick with AEL)
(The queue is set to place callers to my radio show on a queue where they go to the number when the line is clear - this works on SIP and not with IAX2)


// this is a snippet that logs me in and out

context queues-loginout
{
       6092 => {
                       Answer();
                       Read(AGENT_NUMBER,agent-enternum);
                       VMAuthenticate(${AGENT_NUMBER}@default,s);
                       Set(queue-announce-success=1);
                      // SIP VERSION THAT WORKS
                      // AddQueueMember(radio,SIP/0211234567@sipblueface,10);
                      // IAX version that I cant get working
                       AddQueueMember(radio,iax2/0211234567@bluefaceout,10);
               }

       6093 => {
                       Answer();
                       Read(AGENT_NUMBER,agent-enternum);
                       Set(queue-announce-success=1);
                       // I will fix this at some point when I can login hehe
                       // so ignore this for now
                       RemoveQueueMember(radio,sip/500);
               }
}

// the queue context - comes on when my show is being broadcast

context radio {


       s => {
               Ringing();
               Wait(2);

       ifTime(22:00-23:59|sun|*|*) {

               Background(thank-you-for-calling-radio-show);
               WaitExten(0.3);
       notracking:
               
               Queue(radio);
               
       }
               Playback(not-on-air);
               Hangup();
       }
};


============================
queues.conf

   [general]
   persistentmembers = yes




   [radio]
   music=default
   context=radio
   strategy=roundrobin
   ;joinempty=strict
   ;leavewhenempty=strict

   member => iax2/bluefaceout/02112345678


==================================

my iax.conf


bindport=4569;

register => <myusername>:<mypassword>@iax.blueface.ie


[bluefacein]
type=user
host=iax.blueface.ie
context=bluefacein

[bluefaceout]
type=friend
host=iax.blueface.ie
username=<my username>
secret=<my password>
auth=md5
qualify=yes
trunk=no


===============================================

By: David O Reilly (trendboy) 2008-11-24 14:40:15.000-0600

I hope the info above makes sense :) Hopefully it's just something simple that I have done wrong :) (very likely!) I am thinking it might have to do with the way I am adding to the queue with:

AddQueueMember(radio,iax2/0211234567@bluefaceout,10);

When I used the SIP version with AddQueueMember(radio,SIP/0211234567@sipblueface,10); then it worked but it gave an error on the console saying that it couldn't find hostname 0211234567 - but I assume you can only write it as SIP/0211234567@sipblueface as the at should locate the sipblueface context from the sip.conf, but either way I don't really care so much about the sip version as I have like 2 ports open to test it and iax2 is much better the way it can trunk calls in one and use firewall friendly ports etc...

Anyways, I thank you for you help :) and if there is anything else you need shout!!

Thanks David
Cork City, Ireland

By: David O Reilly (trendboy) 2008-11-25 12:51:00.000-0600

Hey blitzrage you said you got it working without problems when you tried to repro it, could I see a snippet from your extensions.ael (or conf) and queues.conf (removing passwords and the likes of course) as perhaps I've a problem in my logic.
D

By: Joshua C. Colp (jcolp) 2008-12-17 15:27:48.000-0600

This is a duplicate of issue 14014, I would suggest hopping over there and trying the patch which should solve the issue.