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>