I want to set up a parallel calling dialplan in asterisk.I have searched a bit and found that we can call parallel in asterisk with the below command.
exten => _X.,1,Dial(DAHDI/g0/${NUMBER1}&DAHDI/g0/${NUMBER2})
So what i understood that asterisk server calls both number paralelly which one picks first the call is connected to that person and other hangup.
My problem in that how do i get the number which picks the call.Is there any variable to get the dialled number?
Thanks.
You can use on-answer-macro - M option of dial command to put any info into cdr.
Also you probably re-inventing queue with queue_log.
Related
I am quit new in asterisk.
My problem is: I have to implement call hold and pick up in asterisk.
Let's say we have an incoming call called incomingCallA.
As an operator I want to hold incomingCallA for a while to deal with other works, then come back soon, If i am not come back, others operator will pick up my held call.
I have done some researches that told me:
Call hold is sip client function, dont need to changes at asterisk server.
I can use call parking to dial to others operator if i am not come back.
Please help me to about the solution to deal with above problem.
Many thanks.
Simplest for begginer is create 100 conference rooms using Meetme after that just send to first availible room and record room number.
You can forward call using Transfer AMI function.
I have this situation where I have 2 numbers say A and B which is forwarded to same DID number so the issue is that I want to identify if the call is forwarded from A or B when the caller calls in to specific number.
I have researched a bit and found about ${CALLERID(rdnis)} in asterisk but when am trying to use it gives a blank output. I also tried the DumpChan() command it also gave a (N/A) for rdnis.
Is there any way I can get to know in my dialplan that call is forwarded from A or B ?
I dont have sip my line is normal PSTN. The problem is that the number mentioned in the question A and B are mobile number which are forwarded to DID number and I can only control the code after the DID is called but I cannot identify through which number A or B the call is forwarded on DID.
If your number is sip, you can do
asterisk -r
sip set debug on
After that call in. If you see forwarded number in packet, you can try get it using SIP_HEADER function.
If there is no any difference in two calls, you can't recognize did and better use cheap voip did for second number.
I am using Putty to simulate my phone's modem connected via serial. When my phone receives a call it outputs 'RING' into putty but when the caller cancel the call Putty doesn't out put any response or result.
How would the modem know that the caller disconnect/cancelled the call, but not output it in putty?
Thanks
To detect missed calls you can try three things.
Check if there is a suitable AT+CIND indicator you can turn on. I do not think call will do since I assume it only goes to 1 when the call is answered. If your phone supports callsetup or something similar that should be what you need (you will have to implement logic to detect when a call does not go to state active).
For an example of enabling AT+CIND indicators, see chapter "8.57 Informative examples" in 27.007 for more explanation, and pay close attention to The subparameter order in the command is defined by the query command order, e.g.
if AT+CIND=? returns
+CIND: ("abc",(0-1)),("xyz",(0,1)),("call",(0,1))
then call is index 3, and for
+CIND: ("abc",(0-1)),("call",(0,1)),("xyz",(0,1))
call is index 2. Do not hard code any assumptions here, this should be parsed and checked run-time (one check at the beginning is enough).
Alternatively you can upon RING start polling call status with AT+CLCC until the call is no longer listed.
Or you could poll the MC phonebook storage and detect changes.
Most modems show the incoming phone number and a RING when a call is received and an END when the call is cancelled. To view the missed calls, you may use the following AT Commands.
AT+CPBS="MC"
AT+CPBR=1,99
First command tells the modem to look in the missed call phone book and the second command loads entries from 1 to 99. Note that this behavior is not standard. I was able to replicate this on a GSM module but not on my 3G modem. Try it on your modem and check if this works. All the best.
When I have call request in AGI script, is it possible to get time since call was created? For example, if it was routed sequentially through several softswitches can I get whole time sinse first softswitch or since generation in remote softphone ?
SIP only is used.
I also use AMI, and in CDR event I see that (Duration - BillableSeconds) is sometimes longer (for 10-20 seconds) then time from AGI request to Up, so duration may be already includes some time before call passed to my Asterisk.
No, there are no way determine any history of call before it go your switch unless other switch inform you about by special headers.
No, CDR(duration) is counted from time when call arived to asterisk. CDR(billsec) always less or equal to duration.
I forward incoming calls to external numbers.
I do this with Follow me module for each number.
Sometimes I use one more external number in follow-me list, to call the second ona if the first one is busy. Bu it is calling the first one and ringing. First one is busy and it is still ringing. I does not call the second number.
What i am doing wrong?
Your provider or ATA not recognize busy signal. Unfortanly no way say what exactly happens, info provided not enought