0
votes

I would like to make e.g. 10 simultaneous calls via AMI. My sip.conf looks like this:

;
[multi_auto_dial_origin]
exten => _09XX0,1,NoOp()
same => n,Answer()
same => n,Wait(30)
;
[multi_auto_dial_destination]
exten => _00XXXXX,1,NoOp()
same => n,Dial(SIP/${EXTEN:2})
;

and my telnet data is e.g. as follows:

ACTION: Originate
Channel: Local/09000@multi_auto_dial_origin
Callerid: 3125551212
Exten: 0016371
Priority: 1
Context: internal
Async: true

So, when the AMI receives it it will first dial on Local/09000 and if it answers the number 0016371 will be ringing.

This works fine but...

...when I want to make a second call I have to wait 1s and then start the AMI session. If I start it earlier e.g. after 500ms from the first call or immediately the Asterisk will not dial to the second number.

I noticed in the Asterisk's log that the value ${EXTEN:2} is empty. But I saw in the Wireshark that my application sends proper value, so there is no problem at this layer.
I believe that it is something in SIP Server which has a problem with accepting immediate calls or maybe I did something wrong.

Do you have any idea how to 'fix' it?

1
Hi, Could you add the wireshark trace? Which exact Asterisk version are you running?junky
Currently I do not have the Wireshark traces, maybe I will put them later. But I saw that the Telnet sends full proper data and Asterisk responds with the Success message. I assume that the problem is after it receive the message and performs dialing. My Asterisk is 1.8.21.0kamh
Are you opening and closing the AMI session, or leaving it open and issuing each Originate in sequence?MichelV69

1 Answers

0
votes

Close the AMI session after originating the call. Here the example to close session

Action: Logoff Parameters: None