Failed to originate two separate calls via CLI


#1

Hi,
I would like to originate two separate calls (at almost the same time).

The 1st call will be via DAHDI/1, and the 2nd call will be via DAHDI/2

The result is:
If I originate each one call and not overlap to the other, the call works fine.
But if I make the 1st call and the call is in ringing stage, then 2 secs later I start the 2nd call.
The 1st call will be automatically hangup and the 2nd call not work at all.

Can anybody tell me how can I originate two separate calls at almost the same time?

Here is my extension.conf:

==============
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Set(soundpath=/home/advrobot/robocall/sounds)
same = n,Set(soundpath_en=/home/advrobot/robocall/sounds_en)
;
same = n,WaitExten(1)
;
same = n,Background(${soundpath}/tts0)
same = n,Background(${soundpath}/tts1)
same = n,Background(${soundpath}/tts2)
;
same = n,Hangup()
; 
exten = i,1,Answer()
same = n,Playback(pbx-invalid)
same = n,Hangup()
;


exten = 101,1,Answer()
same = n,Wait(1)
same = n,Set(soundpath=/home/advrobot/robocall/sounds)
same = n,Set(soundpath_en=/home/advrobot/robocall/sounds_en)
;
same = n,WaitExten(1)
;
same = n,Background(${soundpath}/tts0)
same = n,Background(${soundpath}/tts1)
same = n,Background(${soundpath}/tts2)
;
same = n,Hangup()
; 
==============

And here is my 1st CLI:

*CLI> channel originate DAHDI/1/32 extension 100@from-internal
-- Executing [100@from-internal:1] Answer("DAHDI/1-1", "") in new stack
-- Executing [100@from-internal:2] Wait("DAHDI/1-1", "1") in new stack
-- Executing [100@from-internal:3] Set("DAHDI/1-1", "soundpath=/home/advrobot/robocall/sounds") in new stack
-- Executing [100@from-internal:4] Set("DAHDI/1-1", "soundpath_en=/home/advrobot/robocall/sounds_en") in new stack
-- Executing [100@from-internal:5] WaitExten("DAHDI/1-1", "1") in new stack
-- Timeout on DAHDI/1-1, continuing...
-- Executing [100@from-internal:6] BackGround("DAHDI/1-1", "/home/advrobot/robocall/sounds/tts0") in new stack
-- <DAHDI/1-1> Playing '/home/advrobot/robocall/sounds/tts0.gsm' (language 'en')
-- Invalid extension '2' in context 'from-internal' on DAHDI/1-1
== CDR updated on DAHDI/1-1
-- Executing [i@from-internal:1] Answer("DAHDI/1-1", "") in new stack
-- Executing [i@from-internal:2] Playback("DAHDI/1-1", "pbx-invalid") in new stack
-- <DAHDI/1-1> Playing 'pbx-invalid.gsm' (language 'en')
-- Executing [100@from-internal:1] Answer("DAHDI/2-1", "") in new stack
-- Executing [100@from-internal:2] Wait("DAHDI/2-1", "1") in new stack
-- Executing [100@from-internal:3] Set("DAHDI/2-1", "soundpath=/home/advrobot/robocall/sounds") in new stack
-- Executing [100@from-internal:4] Set("DAHDI/2-1", "soundpath_en=/home/advrobot/robocall/sounds_en") in new stack
-- Executing [100@from-internal:5] WaitExten("DAHDI/2-1", "1") in new stack
-- Timeout on DAHDI/2-1, continuing...
-- Executing [100@from-internal:6] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts0") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts0.gsm' (language 'en')
-- Executing [i@from-internal:3] Hangup("DAHDI/1-1", "") in new stack
== Spawn extension (from-internal, i, 3) exited non-zero on 'DAHDI/1-1'
-- Hanging up on 'DAHDI/1-1'
-- Hungup 'DAHDI/1-1'
-- Executing [100@from-internal:7] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts1") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts1.gsm' (language 'en')
-- Executing [100@from-internal:8] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts2") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts2.gsm' (language 'en')
-- Executing [100@from-internal:9] Hangup("DAHDI/2-1", "") in new stack
== Spawn extension (from-internal, 100, 9) exited non-zero on 'DAHDI/2-1'
-- Hanging up on 'DAHDI/2-1'
-- Hungup 'DAHDI/2-1'
*CLI>

And here is my 2nd CLI:
(Note, the start time of the 2nd call is 2 seconds later than the 1st call begins)

*CLI> 
-- Executing [100@from-internal:1] Answer("DAHDI/1-1", "") in new stack
-- Executing [100@from-internal:2] Wait("DAHDI/1-1", "1") in new stack
-- Executing [100@from-internal:3] Set("DAHDI/1-1", "soundpath=/home/advrobot/robocall/sounds") in new stack
-- Executing [100@from-internal:4] Set("DAHDI/1-1", "soundpath_en=/home/advrobot/robocall/sounds_en") in new stack
-- Executing [100@from-internal:5] WaitExten("DAHDI/1-1", "1") in new stack
-- Timeout on DAHDI/1-1, continuing...
-- Executing [100@from-internal:6] BackGround("DAHDI/1-1", "/home/advrobot/robocall/sounds/tts0") in new stack
-- <DAHDI/1-1> Playing '/home/advrobot/robocall/sounds/tts0.gsm' (language 'en')
*CLI> channel originate DAHDI/2/26 extension 100@from-internal
-- Invalid extension '2' in context 'from-internal' on DAHDI/1-1
== CDR updated on DAHDI/1-1
-- Executing [i@from-internal:1] Answer("DAHDI/1-1", "") in new stack
-- Executing [i@from-internal:2] Playback("DAHDI/1-1", "pbx-invalid") in new stack
-- <DAHDI/1-1> Playing 'pbx-invalid.gsm' (language 'en')
-- Executing [100@from-internal:1] Answer("DAHDI/2-1", "") in new stack
-- Executing [100@from-internal:2] Wait("DAHDI/2-1", "1") in new stack
-- Executing [100@from-internal:3] Set("DAHDI/2-1", "soundpath=/home/advrobot/robocall/sounds") in new stack
-- Executing [100@from-internal:4] Set("DAHDI/2-1", "soundpath_en=/home/advrobot/robocall/sounds_en") in new stack
-- Executing [100@from-internal:5] WaitExten("DAHDI/2-1", "1") in new stack
-- Timeout on DAHDI/2-1, continuing...
-- Executing [100@from-internal:6] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts0") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts0.gsm' (language 'en')
-- Executing [i@from-internal:3] Hangup("DAHDI/1-1", "") in new stack
== Spawn extension (from-internal, i, 3) exited non-zero on 'DAHDI/1-1'
-- Hanging up on 'DAHDI/1-1'
-- Hungup 'DAHDI/1-1'
-- Executing [100@from-internal:7] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts1") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts1.gsm' (language 'en')
-- Executing [100@from-internal:8] BackGround("DAHDI/2-1", "/home/advrobot/robocall/sounds/tts2") in new stack
-- <DAHDI/2-1> Playing '/home/advrobot/robocall/sounds/tts2.gsm' (language 'en')
-- Executing [100@from-internal:9] Hangup("DAHDI/2-1", "") in new stack
== Spawn extension (from-internal, 100, 9) exited non-zero on 'DAHDI/2-1'
-- Hanging up on 'DAHDI/2-1'
-- Hungup 'DAHDI/2-1'
-- Remote UNIX connection
*CLI>

#2

This appears to be a continuation of AMI to originate two separate calls and the probable cause is either a DAHDI misconfiguration or a limitation of the DAHDI peer, for which the answer to that thread apply.

The logs show two successfully originated calls, in both cases. In one case no invalid DTMF is entered on both, and in the other invalid DTMF is entered on the first one, and nothing on the second.

My suspicion is that the underlying problem is the lack of working answer supervision, causing the call to be treated as answered immediately, but, as you screen scraped rather than using the log files, there is no timing information.

With many peers, there is no way of enabling answer supervision, and all you can do is introduce a time delay. The use of analogue lines for automated processes is inadvisable.


#3

Hi,

Let me describe my requirements first:
What I want is:

t1. CLI originate a call to endpoint 1 (via DAHDI/1/32), and endpoint 1 just keep it ringing
t2. wait for a few secs,
t3. CLI originate a call to endpoint 2 (via DAHDI/2/26), and the endpoint 2 rings, and then pickup the phone.

But the result is:
t1. CLI originate a call to endpoint 1 (via DAHDI/1/32), and endpoint 1 just keep it ringing
t2. wait for a few secs,
t3. CLI originate a call to endpoint 2 (via DAHDI/2/26), and I found the endpoint 1 stopped ringing.
And the endpoint 2 DID NOT ring at all.

I found the log shows,

[Dec  6 15:11:48] WARNING[2806][C-00000005]: pbx.c:6697 __ast_pbx_run: Invalid extension '26', but no rule 'i' or 'e' in context 'from-internal'
    -- Hanging up on 'DAHDI/1-1'
    -- Hungup 'DAHDI/1-1'

It looked like the DTMF “26” in port 2 was jumped to port 1 !!!