• Idefisk
  • Tools
  • Tutorials
  • Reviews
  • VoIP Providers
  • Archives
ZOIPER softphone
Back to Tutorials

6.1.2.3. AgentCallbackLogin (dialplan application)

1. AgentCallBackLogin - this application allows you to log in an agent, to the system, with callback.

NOTE: This application is valid for Asterisk version 1.0.9 and above.

 


Syntax:

AgentCallbackLogin([AgentNumber][|[options][exten]@context])

 


List of the possible options

Agentnumber - this is an optional argument. If you set the agent number here, during the login process you won’t be asked to enter agent number, just the password for this agent. The agent number has to be created in the agents.conf file.
options - There is only one possible option. If you set the letter s, the system won’t play an announce file that the login is successful. If you leave this space blank, the Asterisk, will play the announce file after the entering of a the agent’s password and extension.
exten - The option allows you to set the extension, to which the agent has to be connected. If you skip this option, during the login process you will be asked to enter a new extension. Usually this is an extension, which contains the Dial application. This application will connect the agent with an registered user.
@context - this is the context in extensions.conf, where the extension takes place.

 


Purpose and usage

The purpose of this application is to allow you to log in an agent into a queue. The application allows you to skip the entering of the agent number, during the login process, by setting it as argument of the application. You can also choose the extension to which the agent to be connected and the context, where this extension is situated.

The most important feature and the main difference between this application and the AgentLogin application is that with the AgentLogin you have to keep the phone receiver open. Otherwise, if you hang up the phone, the agent will be logged off from the queue. With the AgentCallbackLogin application, you are allowed to hang up the phone when the login process is finished and the user won’t be removed from the queue.

Below, we will give you an example.

 


Prerequisites

To use this application you need a working Asterisk PBX with registered users in iax.conf, sip.conf or mgcp.conf(It depends on which protocol you would like to use) and made extensions. Also, you need to create an context in the queues.conf and another one in the agents.conf file.

To see how the application works we recommend to use our IAX softphone Idefisk. You can download it from here. Please also read our tutorial to learn how to configure it to work with Asterisk PBX.

 


Asterisk PBX configurations

NOTE: This is only an example of one of the uses of this application. Of course you can use it and for other things.


iax.conf and sip.conf Configurations

We need one registered user in the iax.conf file and also another one in the sip.conf file. This is because we are going to use the IAX2 and the SIP channels. If you want to use other protocol such as MGCP, you have to do the configurations below respectively in mgcp.conf.

1) iax.conf
iaxoneuser.jpg

2)sip.conf
siponeuser.jpg

So, we have registered the user user1 in the iax.conf file and the user operator in the sip.conf file.

Type=friend means that this user can make and receive calls. Host=dynamic means that the IP is not static but dynamic through a DHCP server. Allow=all means that the line which this user will use, could support all audio codecs. Context=test - this shows that this user is working with the extensions in this context of the configuration file extensions.conf.

In the sip.conf file you can see the following option: disallow=all. This means that the line will not support any codecs. However, below this option we have allow=ulaw, allow=alaw and allow=gsm. This means that the line will support these three codecs - ulaw, alaw and gsm. It is important to write the options exactly in this order. First you write the disallow=all option and then the allow options. Otherwise, if you write the disallow option after the allow options, no codecs will be supported by the line.


queues.conf Configurations

In this file you have to say which users or agents will participate in your queue. In other words, which users or agents will be responsible for the answer of an incoming call. More about the features of this configuration file, you can learn in our tutorial about the queues.conf file.

There are two possible ways to configure the settings in this file.

The first one, is the so called "static" way. For this configuration you do not need the agents.conf file.

You will say directly, which users to answer the incoming call. In our example, we have created a context with the name [test]. In this context we have written the following: member => SIP/operator. This means that this user(operator) will be responsible for the answering of the incoming calls in the queue test. In the same way you can add even more than one user, which you would like to answer in this queue. However in our case we will have only one user. The advantage of this method, is that you do not have to use the AgentLogin or the AgentCallbackLogin applications in order to log the user in the queue. It will be logged in automatically, when it turns on its phone. The disadvantage is that this user can use, only the phone, on which it is registered. That is why the method is called "static". You can see a screenshot below

queue.confqueue.jpg

The other way is the so called "dynamic" way. For this configuration you will need the agents.conf file.

In the section agents.conf Configurations we will show you the configurations in it and here we will explain you the configurations in queue.conf file.
Unlike the static method, here we have to write not the name of the user, but the number of the agent, as written in the agents.conf file. In our example we have written the following: member => Agent/8888. This means that we want the agent with number 8888, to answer the incoming calls in the queue test. If you decide to use this method you have to add in your dial plan either the AgentLogin or the AgentCallbackLogin application. This is necessary, because unlike the "static" method, here is not enough just to turn on your phone. The user has to log in itself in the queue, manually. The advantage of this method is that the user could log in from any place and phone, which is connected with the Asterisk PBX.You can see a screenshot below.

queue.confqueue1.jpg

agents.conf Configurations

As we have mentioned above, we have to use this configuration file, if we decide to use the "dynamic" method. In this file, we have to create one or more agents. We will use them to answer the incoming calls in our queue.

The way of creating an agent is the following: agent => agentnumber,agentpassword,agentname. In our case we have written the following: agent => 8888,8888,operator. This means that we have registered an agent with number 8888, password 8888 and username operator. The agent is set in the [agents] context. The agent number will be used in the queues.conf file. Please, take a look at section queues.conf Configurations above, to learn how to do this.

agents.confqueue.jpg

extensions.conf Configurations

Now lets take a look at the extensions.conf file.

extagentcallbacklogin.jpg

On the picture above you can see our extensions.conf file.

We have one extension with the number 112. It contains the Queue application. Due to it the incoming call will be attached to the queue [test], created in the queues.conf file.

However, in order to be answered the incoming call, we need an logged in agent. For the purpose we will use the AgentCallbackLogin application.

We have to create a new extension with this application. In our case this will be the extension with number 110. As arguments in its brackets we have written the following: 8888,,@test. 8888 is the agent’s number as it is written in agents.conf file. If you skip this argument, during the login process the system will ask you to enter an agent number. Because we have set the number, as an argument of the application, the system won’t ask us for it. The Asterisk will ask us directly to enter the password for this agent(8888). Then we have a blank space, because we did not want any options. Also we have skipped the argument for extension. So after entering the password, we will be asked to enter a new extension. In our case we will enter the number 111. If you take a look at the screen shot, you will see that this extension contains the Dial application. This is necessary in order to connect the agent with an existing and registered user. In our case this is the user operator which is reachable through the SIP channel. In other words the user operator will become responsible for the answering of the incoming calls into the queue. @test is the context in extensions.conf file, where the extension with the Dial application is situated.

So in conclusion - AgentCallbackLogin is an application through which we could log in our agents into the queue. In our case when somebody dials the extension with this application, it will be considered as agent 8888, it will be asked for password and then for a new extension. The caller has to enter the extension 111 in order to connect the agent number with the user operator. Then the caller can hang up the phone. Now the agent is in the queue. The queue in our case is [test].

When there is an incoming call in the queue [test], the phone of the user operator will ring.

To log off an agent from the queue, you have to dial again the number with the AgentCAllbackLogin application. In our case 110. Then when the system ask you to enter a new extension - just press the pound key(#). This will cause the logging off of the agent.

NOTE: The difference between the AgentLogin application and the AgentCallbackLogin application is that with the first one you have to keep the phone receiver open. If you hang up the phone, the agent will be logged off from the queue. With the second application, you are allowed to hang up the phone after the login process is finished.

 


2. Screenshots of what you can see on the CLI of the Asterisk PBX

1) Agent login
cliagentcalllogin1.jpg

2) Call queue
cliagentcalllogin3.jpg

3) Agent log off
cliagentcalllogin2.jpg


 


3. Additional information

For more information about extensions.conf you can check here.
For more information about iax.conf you can check here.

This application is tested with our IAX softphone Idefisk. You can download it from here. For more information about this softphone please read our tutorial.

If you would like to test this application with the SIP channel you can read our tutorials about the SIP Softphones to learn how to configure them to work with Asterisk PBX

 


4. Uploaded files


extensions.conf
iax.conf
sip.conf
agents.conf
queues.conf

 


5. Similar dialplan applications

AddQueueMember
Queue
AgentLogin
AgentMonitorOutgoing
PauseQueueMember
RemoveQueueMember
UnpauseQueueMember

 

 
User Comments
Parveen (fh0xsgmf328 at gmail dot com)
09 October 2015 09:32:03
No <a href="http://cfjolhtrih.com">copnmailts</a> on this end, simply a good piece.
Marlon (ch3l3nmgj at mail dot com)
25 September 2015 12:12:59
其實 å‰é€” 呢樣野無一個好肯定既定義 原因係好ç‡å¤©æ™‚地利åŒå€‹äººèˆˆè¶£ 我而家覺得我自己åšç·Šå‘¢ä»½å·¥å¥½æœ‰å‰é€”å’© 俾你åšä½ å¯èƒ½æœƒè¦ºå¾—一片黑暗 就好似ä¿éšªå’丫 有 d 人覺得åªä¿‚頭個幾年辛苦 åšå¤šå¹¾å¹´æœ‰æ‰¹å®¢oä¿‚æ‰‹å°±é–‹å§‹èˆ’æœ å†ä¿¾å¿ƒæ©Ÿåšå¤šå¹¾å¹´å°±å¯ä»¥å¾—é–’åŒ d 客 high tea 個個月袋å幾皮 好有å‰é€”å’å–Ž 但係有 d äººåˆæœƒå¯èƒ½è¦ºå¾—æ—¥æ—¥å¦‚æ˜¯åŒ d 師奶傾湊仔經 大 firm åˆå””åˆ°ä½ åš ç´° firm åˆå¾—個åšå­— 朋å‹è½å€’ä½ åšä¿éšªåˆæœƒé¿ä¹‹å‰‡å‰å’ å¥½åŽ­æƒ¡è€…å’ æ‰€ä»¥å…¶å¯¦æ€ä»½æœ‰ å‰é€” 既工åŒè®€æ›¸æ€ç§‘一樣 切忌邊科 hit 就讀邊科 或者人åšä¹œä½ åšä¹œ 為錢æ€äººå·¥é«˜æ—¢å’© 世界變得太快 幾年之後個行飽和唔通你åˆè½‰ è€Œä¸”ç‚ºéŒ¢è€Œåšæ—¢å·¥ å¦‚æžœä½ å””é˜æ„ 就正如施永é’先生所講 工作ä¸å¿«æ¨‚ 生活ä¸å¿«æ¨‚ 唔開心既工 ä½ ä¸€å®šç„¡å¿ƒæ©Ÿåš è‡ªç„¶åšå¾—出色åŒè¢«äººæ¬£è³žæ—¢æ©Ÿæœƒäº¦æœƒæ·¢å°‘ ç›¸åæˆ‘相信行行出狀元 比心機åšå¥½ä¸€ä»½ä½ çœŸä¿‚好有興趣既工 打工åˆå¥½åšç”Ÿæ„åˆå¥½ 商機處處 åƒé‡Œé¦¬åˆä½•懼æµå””倒伯樂 (伯樂都æµç·Šä½ æž¶ )至於大公å¸åŒä¸­å°ä¼å‘¢æ–¹é¢ å°å¼Ÿäº¦æœ‰ d 心得 如果你係 d ç©ç©é™£é™£æ±‚安定既人 æµé–“大 firm 啦 大 firm 通常個 hierarchy åŒåŸ‹ binfiet 都比細公å¸ç©å®š 而且公å¸å¤§ 學好 d çƒæŠ€éƒ½å””é§›æ“”å¿ƒæœƒä¿¾äººç‚’ 如果你係 d 雄心壯志è¦å‡ºäººé ­åœ°æ—¢äºº å’æµé–“ 10-20 人既中å°ä¼éƒ½å””錯 因為人少 乜都è¦ä½ åš 自然學野既機會多 而且è€é—†äº¦æœƒæœ‰å¤š d 機會知é“你係乜水 å’å°å°‡ä¾†é€²å‡æ—¢æ©Ÿæœƒåˆå¤§ d ä¸éŽç´°å…¬å¸æœ‰æ™‚真係有個種食å›ä¹‹ç¥¿æ“”å›ä¹‹ä¼‘既感覺 見è€é—†å¹¾å€‹æœˆéƒ½ç„¡ç”Ÿæ„個陣都咪話唔擔心 至於想創業既人事 一於學 CK å…„å’跳啦(我覺得係好事黎架) 由渣估兄所講既 2-4 人既èŒä¼åšåˆ° 26-50 人中å°ä¼å°±æœ€å¥½ 因為一間得幾ä¸å‹æ—¢å…¨å ´æ¸…é“夫(啊四)ç®¡ç†æ¨¡å¼ 到 10 幾人份 team åŒ 30 å¹¾ 40 人份 department æ—¢ç®¡ç† æ€Žè‡³æ”¿æ²»ç’°å¢ƒéƒ½æœ‰ç ´å¤§å·®åˆ¥ 打工時如果å¯ä»¥éŸ¿è€é—†åˆ°æœ‰æ‰€é ˜æ‚Ÿçµ¶å°æ¯”自己創業時先 大開眼介 著數
fahad (sfali at itimsystems dot com)
28 November 2007 06:32:59
hello thxx for greate help i want to knw one more thing that as if i provide all the parameter agent number extention the agentcallbacklogin will just ask for pwd if i want that pwd also provided as a defult parameter.. how this can be achive
 
Add Comment
Name:
Email:
Comment:
In order to prevent automatic posting on our website, we kindly request you to type in the number you see in the picture below.
Image Verification:
 

Latest Headlines:

  • T.38 faxing with Zoiper 2.15 is now easier than ever
    section: voip software
  • Asterisk 1.4.21 Released
    section: Asterisk
  • Asterisk 1.4.20 Released
    section: Asterisk
  • Asterisk 1.4.20-rc2 Released
    section: Asterisk
  • Asterisk 1.4.20-rc1 Now Available
    section: Asterisk
  • News Archives (older news)

Latest Tutorials:

  • Sending Fax from Zoiper to Zoiper using T.38
    added 08/Dec/2008 18:16
  • VMAuthenticate (dialplan application)
    added 01/Mar/2008 15:57
  • Siptronic ST-530
    added 06/Nov/2007 17:57
  • Siemens C455 IP hardphone
    added 05/Nov/2007 10:24
  • Zoiper
    added 22/Oct/2007 17:53

Latest Comments:

  • https://www.scoop.it/topic/here-s-way-to...
    tutorial: asterisk.conf
  • https://www.scoop.it/topic/get-direct-ps...
    tutorial: asterisk.conf
  • https://dare-you-to-death-eps1.readme.io...
    tutorial: Read (dialplan application)
  • https://registry.scalar.com/@avatarfirea...
    tutorial: SIP with NAT or Firewalls
  • https://www.civicgov4.com/md_montgomery/...
    tutorial: SIP with NAT or Firewalls
 
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™