* You are viewing Posts Tagged ‘call’

AMI Originate double call

Hi, probably is a problem already solved, but I cannot find a solution
anywhere.
so:
I tried to connect to Asterisk AMI using php and telnet, but the problem
is there anyway.

1. I call just 18 and a playback start.
2. then open a telnet connection and authenticate
3. originate one new call
4. two calls are originated ???

you could see it in the 4th and 5th line of asterisk cli:

Run AGI while agent ringing instead of only when connected

What I am trying to accomplish is to run an AGI script each time an agent’s
line starts ringing. I currently have the AGI firing when the agent answers
the call using the Queue command, something like
queue(MyQueue,,,,,MyAgi.php). Works great but I need the AGI to run when
the agent’s phone starts ringing.

Strangely, I can’t find anything real useful on this after searching
Google, this list, various Asterisk forums etc.

Is this supported? If not, is there some other maybe not so supported way
to accomplish this?

I get how I can just fire an AGI from the dial plan but once I leave
control to the queue, I can’t really do that, I don’t think.

Thanks in advance for any help!

unable to set utime ??

On Sat, 7 Apr 2012, sean darcy wrote:

> I’m trying to run asterisk as “asterisk”. Which is harder than I
> thought.
>
> 10.3.0. When I put a callfile into /var/spool/asterisk/outgoing, I get
> this warning:
>
> Unable to set utime on /var/spool/asterisk/outgoing/callfile.call:
> Operation not permitted
>
> ls -l /var/spool
> ………
> drwxr-x—. 9 asterisk asterisk 4096 Apr 7 21:41 asterisk
>
> ls -l /var/spool/asterisk
> ………..
> drwxrwx—. 2 asterisk asterisk 4096 Apr 7 21:14 outgoing

Do ‘ps -U asterisk’ or ‘ls -l /var/spool/asterisk/outgoing/callfile.call’
yield any clues?

Also, just in case you’re unaware, creating the call file in the
/outgoing/ directory is an invitation for a race condition. A ‘better
practice’ is to create the file in a temporary directory on the same
device, write to it, close it and ‘mv’ it. ‘mv’ is an ‘atomic’ operation.

AGI Variables Being Wrong

Greetings!

I have the following line in features.conf:

parse => *9,peer/both,AGI,/etc/asterisk/agi/map.pl

What that script does is parsing AGI variables and doing some things based on them, nothing special.

During outgoing call, those variables get messed up. Let’s look at an example: number 404 calls 2010000, it is being routed over PRI line. When ‘agi debug’ is active, one can see what parameters are being fed to script:

AGI Tx >> agi_request:/etc/asterisk/agi/map.pl
AGI Tx >> agi_channel: Zap/63-1
AGI Tx >>agi_language: en
AGI Tx >> agi_type: Zap
AGI Tx >> agi_uniqueid: 1322049810.4307
AGI Tx >> agi_callerid: 0442010000
AGI Tx >>agi_calleridname: unknown
AGI Tx >>agi_callingpres: 3
AGI Tx >>agi_callingani2: 0
AGI Tx >>agi_callington: 0
AGI Tx >>agi_callingtns: 0
AGI Tx >> agi_dnid: 481
AGI Tx >>agi_rdnis: unknown
AGI Tx >>agi_context: from_pstn
AGI Tx >> agi_extension:
AGI Tx >>agi_priority:1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:

Looking at the callerid and dnid being swapped, one can say that for some reason Asterisk sees this call as incoming from PRI (context kind of approves this). I gave it lots of thinking, and the only conclusion I could come to was – it’s because I run my application on ‘peer’. But it’s not a problem, as I could just swap them back in my script. The problem is, as you can see, our dnid is 481, however we are calling from 404. And moreover – each time I try to call, I get different dnid, like 401, 408 and so on. I thought that it could be last called number on PRI – but it is not.

If the call is really incoming (comes from PSTN) – all variables  get passed correctly, and my script is happy. When I issue ‘show channel’ command during active call, I see that variables  are incorrect in Asterisk on A-leg (i.e. SIP/404-someid), and variables are correct on B-leg (i.e. ZAP/63-1 in our example).

Is that some bug, or misconfiguration, or maybe wrong programming?

Cdr Logs modify Disposition on Unsuccessful call

Hi Team,

I would like capture SS7 Error Code in CDRs, Specifically of outbound call
from the asterisk. calls generated using .call file.

In extension.conf extens gets excuted on successful call only , So that on
h extension reason of hangup is captured. But i am not aware of any
provision that capture on Unsuccessful call.

please guide on this or suggest any patch.

Thanks
Vinod d