asterisk playback starts before called side answers

General discussions about Asterisk.

Moderators: Moderator, Support

asterisk playback starts before called side answers

Postby blaze985 » Wed Sep 16, 2015 10:37 am

Hi,

Im tring to play sound to a dahdi channel, all goes ok till the point where the file it self is played before the called side answers. Any idea why would this happen?


Here is the cli output if I use the Playback application directly:

> Channel DAHDI/3-1 was answered.
> Launching Playback(xxxx) on DAHDI/3-1
-- <DAHDI/3-1> Playing 'xxxx.slin' (language 'en')
-- Hanging up on 'DAHDI/3-1'
-- Hungup 'DAHDI/3-1'

This all happens before the line is answered on the caller side. If person answering is fast it can hear some part of the message

I tried also with a call file and a play context, e.g:

Callfile:

Channel: dahdi/3/xxxxxx
CallerID: <3333>
Context: play_sound
Extension: 100
Priority: 1

Diallplan:

[play_with_timeout]
exten => 100,1,Dial(Local/100@play_sound,15,S(60))

[play_sound]
exten => 100,1,Set(repeatCount=5)
exten => 100,n(playback),Playback(xxxx)
exten => 100,n,Set(repeatCount=$[${repeatCount} - 1])
exten => 100,n,GotoIf(GotoIf($[${repeatCount} = 0]]?exit:playback)
exten => 100,n(exit)Hangup()

cli output
> Channel DAHDI/3-1 was answered
-- Executing [502@play_xxxx:1] Set("DAHDI/3-1", "repeatCount=2") in new stack
-- Executing [502@play_xxxx:2] Playback("DAHDI/3-1", "xxxx") in new stack
-- <DAHDI/3-1> Playing 'xxxx.slin' (language 'en')
-- Executing [502@play_xxxx:3] Set("DAHDI/3-1", "repeatCount=1") in new stack
-- Executing [502@play_xxxx:4] GotoIf("DAHDI/3-1", "GotoIf(0]?exit:playback") in new stack
-- Goto (play_vozilonalokacija,502,5)
== Spawn extension (play_xxxx, 502, 5) exited non-zero on 'DAHDI/3-1'
-- Hanging up on 'DAHDI/3-1'
-- Hungup 'DAHDI/3-1'



So looks like the same, file always played before answer on other side...
blaze985
Newsterisk
 
Posts: 7
Joined: Wed May 27, 2015 3:25 pm

Re: asterisk playback starts before called side answers

Postby jcolp » Wed Sep 16, 2015 1:48 pm

What is the underlying channel technology? An analog line?
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am

Re: asterisk playback starts before called side answers

Postby david55 » Wed Sep 16, 2015 2:22 pm

Specifically, unless you configure an analogue channel for answer supervision, it will be assumed to be answered when dialling is complete. If you configure answer supervision that doesn't match what the PTT provides, or they don't provide any, no outgoing calls will be answered.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: asterisk playback starts before called side answers

Postby blaze985 » Wed Sep 16, 2015 3:39 pm

@jcolp yes the underline technology is analog line

@david55 Im not sure if I catch it correct, but I need to try to set up un analog line answer supervision? Where I can do that? At least I can try if the provider can catch this...
blaze985
Newsterisk
 
Posts: 7
Joined: Wed May 27, 2015 3:25 pm

Re: asterisk playback starts before called side answers

Postby david55 » Thu Sep 17, 2015 2:35 pm

In chan_dahdi.conf. The most common answer supervision is line reversal.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: asterisk playback starts before called side answers

Postby blaze985 » Fri Sep 18, 2015 4:04 am

Hi,

just as info!

answeronpolarityswitch=yes
hanguponpolarityswitch=yes

in chan_dahdi, worked for me fine.


Tnx for the reply!
blaze985
Newsterisk
 
Posts: 7
Joined: Wed May 27, 2015 3:25 pm


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 1 guest