Answeronpolarityswitch and no ring back tone

Hi,

I have pabx in a flash box and installed with TDM800P fxo card. This forum helped me lot to make it up and running. Now I can make calls to PSTN numbers via digium card and i can hear ring back tone successfully. Any way When i mentioned answeronpolarityswitch=yes in chan_dahdi.conf file under {channel] it make small problem. Which is when i do it i can’t hear the ring back tone which is coming from pstn network to sip side. as soon as call get connect and asterisk receive the line reversal signal it set up the call path and i can hear the b party voice. As i observed, asterisk will not make the audio part until it get the answer signal from PSTN side.

I tried to search about this issue on the net. But couldn’t find a successful answer. It’s really critical me about accurate CDR logs.

Please advice.

Hei,

I found another clue. When the asterisk play different kind of recordings like “all circuits are busy now” also i cant hear from sip phone. At that moment i didn’t on answeronpolarityswitch. That mean normally also asterisk activate the voice path only call get success. So i think its not issue with answeronpolarityswitch option. It happen because asterisk will set the audio path only call get answer.

How can i fix this issue ???

Well - as usual you have to post the Asterisk log for such a call.

What I do not understand is the following issue: some days ago you have hear the “all circuit are busy now” prompt - and now you are not hearing. This is strange for me in case you do not modify nothing.

Also, please post if you hear something when you are calling the echo application (call *43). In case not - please tell what softphone are using and if you have some VPN services activated or not.

HTH,
Ioan

Hi loan,

Thx for the reply. It’s like this. I said you before that i’m getting all circuits are busy message because i saw that on the asterisk debug mode. I didn’t hear that message from when i first install PIAF. Still i cant hear that message. I’m using X-lite Sip phone and i tested with that phone with echo application. It worked fine. Because using that it take by server as a answered call.

The problem is like that. When i take a call to asterisk if that call get answer i can hear the voice path. As soon as call get answer asterisk set up the voice path and i can listen everything normally. But if call didn’t answer ( situation like All circuits are busy now or when i take a call to pstn number with answeronpolarity on ) I cant hear anything from asterisk. Server play the correct tone or recording according to asterisk debug. But i cant hear that because asterisk not seteup the audio path untill call get answer.

Please advice.

Connected to Asterisk 1.6.2.6 currently running on pbx (pid = 1816)
Verbosity is at least 3
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [0772328091@from-internal:1] Macro(“SIP/100-00000000”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/100-00000000”, “AMPUSER=100”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/100-00000000”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/100-00000000”, “1?Set(REALCALLERIDNUM=100)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/100-00000000”, “AMPUSER=100”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/100-00000000”, “AMPUSERCIDNAME=sam”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/100-00000000”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/100-00000000”, “AMPUSERCID=100”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/100-00000000”, “CALLERID(all)=“sam” <100>”) in new stack
– Executing [s@macro-user-callerid:9] GotoIf(“SIP/100-00000000”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,18)
– Executing [s@macro-user-callerid:18] NoOp(“SIP/100-00000000”, “Using CallerID “sam” <100>”) in new stack
– Executing [0772328091@from-internal:2] Set(“SIP/100-00000000”, “_NODEST=”) in new stack
– Executing [0772328091@from-internal:3] Macro(“SIP/100-00000000”, “record-enable,100,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/100-00000000”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/100-00000000”, “recordingcheck,20100416-234007,1271441407.0”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100416-234007,1271441407.0: Outbound recording not enabled
– <SIP/100-00000000>AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:5] MacroExit(“SIP/100-00000000”, “”) in new stack
– Executing [0772328091@from-internal:4] Macro(“SIP/100-00000000”, “dialout-trunk,1,0772328091,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/100-00000000”, “DIAL_TRUNK=1”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/100-00000000”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/100-00000000”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/100-00000000”, “DIAL_NUMBER=0772328091”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/100-00000000”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/100-00000000”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/100-00000000”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/100-00000000”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/100-00000000”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/100-00000000”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/100-00000000”, “outbound-callerid,1”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/100-00000000”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/100-00000000”, “0?Set(REALCALLERIDNUM=100)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/100-00000000”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/100-00000000”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/100-00000000”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/100-00000000”, “TRUNKOUTCID=0812222240”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/100-00000000”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/100-00000000”, “1?Set(CALLERID(all)=0812222240)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/100-00000000”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/100-00000000”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/100-00000000”, “1?AGI(fixlocalprefix)”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
== fixlocalprefix: Dialpattern XXXXXXXXXX matched. 0772328091 -> 0772328091
– <SIP/100-00000000>AGI Script fixlocalprefix completed, returning 0
– Executing [s@macro-dialout-trunk:13] Set(“SIP/100-00000000”, “OUTNUM=0772328091”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/100-00000000”, “custom=DAHDI/g0”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/100-00000000”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/100-00000000”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/100-00000000”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/100-00000000”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/100-00000000”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/100-00000000”, “DAHDI/g0/0772328091,300,”) in new stack
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [s@macro-dialout-trunk:20] Goto(“SIP/100-00000000”, “s-CONGESTION,1”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,1)
– Executing [s-CONGESTION@macro-dialout-trunk:1] GotoIf(“SIP/100-00000000”, “1?noreport”) in new stack
– Goto (macro-dialout-trunk,s-CONGESTION,3)
– Executing [s-CONGESTION@macro-dialout-trunk:3] NoOp(“SIP/100-00000000”, “TRUNK Dial failed due to CONGESTION - failing through to other trunks”) in new stack
– Executing [0772328091@from-internal:5] Macro(“SIP/100-00000000”, “outisbusy,”) in new stack
– Executing [s@macro-outisbusy:1] Playback(“SIP/100-00000000”, “all-circuits-busy-now,noanswer”) in new stack
– <SIP/100-00000000> Playing ‘all-circuits-busy-now.gsm’ (language ‘en’)
– Executing [s@macro-outisbusy:2] Playback(“SIP/100-00000000”, “pls-try-call-later,noanswer”) in new stack
– <SIP/100-00000000> Playing ‘pls-try-call-later.gsm’ (language ‘en’)
– Executing [s@macro-outisbusy:3] Macro(“SIP/100-00000000”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/100-00000000”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/100-00000000”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/100-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/100-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/100-00000000’ in macro ‘hangupcall’
== Spawn extension (macro-outisbusy, s, 3) exited non-zero on ‘SIP/100-00000000’ in macro ‘outisbusy’
== Spawn extension (from-internal, 0772328091, 5) exited non-zero on ‘SIP/100-00000000’
– Executing [h@from-internal:1] Macro(“SIP/100-00000000”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/100-00000000”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/100-00000000”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/100-00000000”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/100-00000000”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/100-00000000’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/100-00000000’
pbx*CLI>

I cant hear this all circuits are busy now recording. What can be the wrong.

ok - let’s perform a simple test.

locate extensions-custom.conf file and check if there is a [from-internal-custom] context inside.

If no please add the following lines. If yes, skip the context definition

[from-internal-custom] exten => 112233,1,NoOp exten => 112233,n,Playback(hello-world)

after this change please issue the following command

and dial 112233 - did you hear the “hello world” prompt?

i also have the same problem. I thank this is similar for pabx in a flash.

[quote=“indreias”]ok - let’s perform a simple test.

locate extensions-custom.conf file and check if there is a [from-internal-custom] context inside.

If no please add the following lines. If yes, skip the context definition

[from-internal-custom] exten => 112233,1,NoOp exten => 112233,n,Playback(hello-world)

after this change please issue the following command

and dial 112233 - did you hear the “hello world” prompt?[/quote]

Thank you for your reply. i modified my extensions-custom.conf file according to your instruction.
When i dial 112233 from my sip phone i can hear hello world recording. After that recording i can hear All circuits are busy recording. Below is the Debug log details.

pbxCLI>
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [112233@from-internal:1] NoOp(“SIP/100-00000003”, “”) in new stack
– Executing [112233@from-internal:2] Playback(“SIP/100-00000003”, “hello-world”) in new stack
– <SIP/100-00000003> Playing ‘hello-world.gsm’ (language ‘en’)
– Executing [112233@from-internal:3] Wait(“SIP/100-00000003”, “1”) in new stack
– Executing [112233@from-internal:4] Playback(“SIP/100-00000003”, “silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer”) in new stack
– <SIP/100-00000003> Playing ‘silence/1.gsm’ (language ‘en’)
– <SIP/100-00000003> Playing ‘cannot-complete-as-dialed.gsm’ (language ‘en’)
== Spawn extension (from-internal, 112233, 4) exited non-zero on ‘SIP/100-00000003’
– Executing [h@from-internal:1] Macro(“SIP/100-00000003”, “hangupcall”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/100-00000003”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/100-00000003”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/100-00000003”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/100-00000003”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/100-00000003’ in macro ‘hangupcall’
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/100-00000003’
pbx
CLI>

root@pbx:~ $ cat /etc/asterisk/extensions_custom.conf
; This file contains example extensions_custom.conf entries.
; extensions_custom.conf should be used to include customizations
; to AMP’s Asterisk dialplan.

; Extensions in AMP have access to the ‘from-internal’ context.
; The context ‘from-internal-custom’ is included in ‘from-internal’ by default

[from-internal-custom]

exten => 112233,1,NoOp
exten => 112233,n,Playback(hello-world)

@ the moment answeronpolarityswitc=yes. But the problem when i dial normal pstn number i cant hear that far end recording or any other recording.

What can be the wrong ?

What type of codec you are using in your softphone?

Please configure it only with g711 (alaw or ulaw) and register it again to Asterisk

After this:

  1. Try *43 - just to confirm it is still working
  2. run the following command (in order to start a new log file)asterisk -rx "logger rotate"
  3. Try to dial out and provide the full log (usually in /var/log/asterisk/full)

HTH,
Ioan.

[quote=“indreias”]What type of codec you are using in your softphone?

Please configure it only with g711 (alaw or ulaw) and register it again to Asterisk

After this:

  1. Try *43 - just to confirm it is still working
  2. run the following command (in order to start a new log file)asterisk -rx "logger rotate"
  3. Try to dial out and provide the full log (usually in /var/log/asterisk/full)

HTH,
Ioan.[/quote]

thx for your reply. extremely sorry i didn’t see your reply. Hear is the full log. I dialed normal pstn number

mobile phone rang. But i didnt hear the dialtone.

you probably forget to add the log - please try again

Ohhh sorry. i quickly did the reply. So i miss to past the log.

Hear is the full logs.

I dialed the number from my sip extension 100 to 0772328091. Phone get rang. But i didnt hear the ring back from my sip phone. Si i disconnect the call from sip phone side.

root@pbx:~ asterisk -rx "logger rotate" root@pbx:~ cat /var/log/asterisk/full
[2010-04-23 13:52:33] VERBOSE[3679] config.c: == Parsing ‘/etc/asterisk/logger.conf’: [2010-04-23 13:52:33] VERBOSE[3679] config.c: == Found
[2010-04-23 13:52:33] VERBOSE[3679] logger.c: Asterisk Event Logger restarted
[2010-04-23 13:52:33] VERBOSE[3679] logger.c: Asterisk Queue Logger restarted
[2010-04-23 13:52:33] VERBOSE[3679] asterisk.c: – Remote UNIX connection disconnected
[2010-04-23 13:52:40] VERBOSE[3589] netsock.c: == Using SIP RTP TOS bits 184
[2010-04-23 13:52:40] VERBOSE[3589] netsock.c: == Using SIP RTP CoS mark 5
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [0772328091@from-internal:1] Macro(“SIP/100-00000003”, “user-callerid,SKIPTTL,”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:1] Set(“SIP/100-00000003”, “AMPUSER=100”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:2] GotoIf(“SIP/100-00000003”, “0?report”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:3] ExecIf(“SIP/100-00000003”, “1?Set(REALCALLERIDNUM=100)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:4] Set(“SIP/100-00000003”, “AMPUSER=100”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:5] Set(“SIP/100-00000003”, “AMPUSERCIDNAME=sam”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:6] GotoIf(“SIP/100-00000003”, “0?report”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:7] Set(“SIP/100-00000003”, “AMPUSERCID=100”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:8] Set(“SIP/100-00000003”, “CALLERID(all)=“sam” <100>”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:9] GotoIf(“SIP/100-00000003”, “1?continue”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Goto (macro-user-callerid,s,18)
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-user-callerid:18] NoOp(“SIP/100-00000003”, “Using CallerID “sam” <100>”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [0772328091@from-internal:2] Set(“SIP/100-00000003”, “_NODEST=”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [0772328091@from-internal:3] Macro(“SIP/100-00000003”, “record-enable,100,OUT,”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-record-enable:1] GotoIf(“SIP/100-00000003”, “1?check”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Goto (macro-record-enable,s,4)
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-record-enable:4] AGI(“SIP/100-00000003”, “recordingcheck,20100423-135240,1272010960.5”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: – Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: recordingcheck,20100423-135240,1272010960.5: Outbound recording not enabled
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: – <SIP/100-00000003>AGI Script recordingcheck completed, returning 0
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-record-enable:5] MacroExit(“SIP/100-00000003”, “”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [0772328091@from-internal:4] Macro(“SIP/100-00000003”, “dialout-trunk,1,0772328091,”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:1] Set(“SIP/100-00000003”, “DIAL_TRUNK=1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/100-00000003”, “0?sub-pincheck,s,1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/100-00000003”, “0?disabletrunk,1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:4] Set(“SIP/100-00000003”, “DIAL_NUMBER=0772328091”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:5] Set(“SIP/100-00000003”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:6] Set(“SIP/100-00000003”, “OUTBOUND_GROUP=OUT_1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/100-00000003”, “0?nomax”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/100-00000003”, “0?chanfull”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/100-00000003”, “0?skipoutcid”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:10] Set(“SIP/100-00000003”, “DIAL_TRUNK_OPTIONS=”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:11] Macro(“SIP/100-00000003”, “outbound-callerid,1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/100-00000003”, “0?Set(CALLERPRES()=)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/100-00000003”, “0?Set(REALCALLERIDNUM=100)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/100-00000003”, “1?normcid”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Goto (macro-outbound-callerid,s,6)
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:6] Set(“SIP/100-00000003”, “USEROUTCID=”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:7] Set(“SIP/100-00000003”, “EMERGENCYCID=”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:8] Set(“SIP/100-00000003”, “TRUNKOUTCID=0112222248”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/100-00000003”, “1?trunkcid”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Goto (macro-outbound-callerid,s,12)
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/100-00000003”, “1?Set(CALLERID(all)=0112222248)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/100-00000003”, “0?Set(CALLERID(all)=)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/100-00000003”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/100-00000003”, “1?AGI(fixlocalprefix)”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: – Launched AGI Script /var/lib/asterisk/agi-bin/fixlocalprefix
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: == fixlocalprefix: Dialpattern XXXXXXXXXX matched. 0772328091 -> 0772328091
[2010-04-23 13:52:40] VERBOSE[3680] res_agi.c: – <SIP/100-00000003>AGI Script fixlocalprefix completed, returning 0
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:13] Set(“SIP/100-00000003”, “OUTNUM=0772328091”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:14] Set(“SIP/100-00000003”, “custom=DAHDI/g0”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/100-00000003”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:16] Macro(“SIP/100-00000003”, “dialout-trunk-predial-hook,”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/100-00000003”, “”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/100-00000003”, “0?bypass,1”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/100-00000003”, “0?customtrunk”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] pbx.c: – Executing [s@macro-dialout-trunk:19] Dial(“SIP/100-00000003”, “DAHDI/g0/0772328091,300,”) in new stack
[2010-04-23 13:52:40] VERBOSE[3680] app_dial.c: – Called g0/0772328091
[2010-04-23 13:52:43] WARNING[3680] chan_dahdi.c: Unable to enable echo cancellation on channel 2 (No such device)
[2010-04-23 13:52:59] VERBOSE[3680] chan_dahdi.c: – Hungup ‘DAHDI/2-1’
[2010-04-23 13:52:59] VERBOSE[3680] app_macro.c: == Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/100-00000003’ in macro ‘dialout-trunk’
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: == Spawn extension (from-internal, 0772328091, 4) exited non-zero on ‘SIP/100-00000003’
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Executing [h@from-internal:1] Macro(“SIP/100-00000003”, “hangupcall”) in new stack
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/100-00000003”, “1?skiprg”) in new stack
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Goto (macro-hangupcall,s,4)
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Executing [s@macro-hangupcall:4] GotoIf(“SIP/100-00000003”, “1?skipblkvm”) in new stack
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Goto (macro-hangupcall,s,7)
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Executing [s@macro-hangupcall:7] GotoIf(“SIP/100-00000003”, “1?theend”) in new stack
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Goto (macro-hangupcall,s,9)
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: – Executing [s@macro-hangupcall:9] Hangup(“SIP/100-00000003”, “”) in new stack
[2010-04-23 13:52:59] VERBOSE[3680] app_macro.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/100-00000003’ in macro ‘hangupcall’
[2010-04-23 13:52:59] VERBOSE[3680] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/100-00000003’
root@pbx:~ $

Thx.

[quote][2010-04-23 13:52:40] VERBOSE[3680] app_dial.c: – Called g0/0772328091
[2010-04-23 13:52:43] WARNING[3680] chan_dahdi.c: Unable to enable echo cancellation on channel 2 (No such device)
[2010-04-23 13:52:59] VERBOSE[3680] chan_dahdi.c: – Hungup ‘DAHDI/2-1’[/quote]

  1. This call was a succesfull call or not? Meaning 0772328091 start to ring or not?
  2. Have you or not a line into DAHDI/2 port?

[quote=“indreias”][quote][2010-04-23 13:52:40] VERBOSE[3680] app_dial.c: – Called g0/0772328091
[2010-04-23 13:52:43] WARNING[3680] chan_dahdi.c: Unable to enable echo cancellation on channel 2 (No such device)
[2010-04-23 13:52:59] VERBOSE[3680] chan_dahdi.c: – Hungup ‘DAHDI/2-1’[/quote]

  1. This call was a succesfull call or not? Meaning 0772328091 start to ring or not?
  2. Have you or not a line into DAHDI/2 port?[/quote]

1: call successfully ring my mobile. But i didn’t answer it. And i didn’t hear the ring back tone ftom my sip phone,
2. Line is pluged in to DAHDI/2 port.

ok - please repost you dahdi config file in order to have a fresh view.

basically we have to be sure callprogress is set to no.

HTH,
Ioan.

root@pbx:~ $ cat /etc/asterisk/chan_dahdi.conf

[channels]
language=en

; analog common settings
musiconhold=default
usecallerid=yes
callerid=asreceived
relaxdtmf=yes
immediate=no
answeronpolarityswitch=yes

busydetect=yes
busycount=5

rxgain=0.0
txgain=0.0

context=from-pstn
signalling=fxs_ks
group=0
channel => 1-8

root@pbx:~ $

Is this what you asked ? If i set this answeronpolarityswitch to NO. Then i dialed the number i can hear the far end ringing.

As i feel when i on answeronpolarityswitch option untill call get connect asterisk not set up the audio path. Can we enable to set up audio path as soon as i dialed the number from sip extention.

Hi,

i retested the scenario with below configuration too. But the result is same. I still can’t hear the ring back tone.
root@pbx:~ $ cat /etc/asterisk/chan_dahdi.conf

[channels]
language=en

; analog common settings
musiconhold=default
usecallerid=yes
callerid=asreceived
relaxdtmf=yes
immediate=no
answeronpolarityswitch=yes
callprogress=no

busydetect=yes
busycount=5

rxgain=0.0
txgain=0.0

context=from-pstn
signalling=fxs_ks
group=0
channel => 1-8

Thx.

[quote]
answeronpolarityswitch=yes
Use a polarity reversal to mark when a outgoing call is answered by the remote party.[/quote]

you have to decide if you need answeronpolarityswitch set to yes or no (the default case).

I assume that in case you put yes the channel will not be opened till the B party Answer - and this is why you do not hear the ring back tones. This could be faked by using an option into the Dial command but I do not advice to go on this way (asterisk will play the ring back tones).

When you use the default configuration (no) you will probably hear the normal ring back tones played by your PSTN provider.

Attn: In order to have you DAHDI config taken into consideration you have to restart it (use “dahdi restart” in Astrisk CLI).

HTH,
Ioan.

Hi frnd,

Thx for your grate help about my issue. But i think its hard to correct. And i need to fix my system very soon. So i have decided to move from pabx in a flash to Asterisknow. In asterisk now its working fine for me. Again i need to thank you for your kind help.

But in asterisk now i have a small issue about report data. What is in the report mentions time durations for calls are not the correct. because that time is for whole call. From dialing to call hangup. But i need to start time count from when the call get answer. In report show time = Call progress time + Talking time. But i need only talking time.

I’m already on the answeronpolarityswitch=yes.

Report correctly display answered and unanswered calls too. But why it dosen’t show the real talking time for calls.

?

I do not know Asterisk Now report facility but I supposed is the one it cames with FreePBX. If this is the case you are rigth: the time is the call duration and it will include the call setup time.

you have to check the billsec field (details: http://www.voip-info.org/wiki/view/Asterisk+billing) which is not displayed into the default report interface which came with FreePBX.

in my system the Reports are managed by /var/www/html/admin/cdr/call-log.php and this file could be modified to display Billsec field as well.

you have to identify your file and modify like this:

$FG_TABLE_COL[]=array ("Duration", "duration", "6%", "center", "SORT", "30", "", "", "", "", "", "$minute_function"); $FG_TABLE_COL[]=array ("Billsec", "billsec", "6%", "center", "SORT", "30", "", "", "", "", "", "$minute_function"); <- THIS is new

HTH,
Ioan

Hi,

I updated the mentioned file as below. In gui it changed to Billsec. But it still include the call setup time to Billsec field.

Below is the modified file. I modified 4 lines as follows.

If anything wrong please let me know.

//$FG_TABLE_COL[]=array (“Serverid”, “serverid”, “7%”, “center”, “”, “30”);
$FG_TABLE_COL[]=array (“Disposition”, “disposition”, “9%”, “center”, “”, “30”);
if ((!isset($resulttype)) || ($resulttype==“min”)) $minute_function= “display_minute”;
$FG_TABLE_COL[]=array (“Billsec”, “billsec”, “6%”, “center”, “SORT”, “30”, “”, “”, “”, “”, “”, “$minute_function”);

$FG_TABLE_COL[]=array (“Userfield”, “userfield”, “8%”, “center”, “”, “20”);
$FG_TABLE_COL[]=array (“Accountcode”, “accountcode”, “8%”, “center”, “”, “20”);

$FG_TABLE_DEFAULT_ORDER = “calldate”;
$FG_TABLE_DEFAULT_SENS = “DESC”;

// This Variable store the argument for the SQL query
$FG_COL_QUERY=‘calldate, channel, src, clid, lastapp, lastdata, dst, dst, serverid, disposition, duration, billsec’;

*/

/* --AMP Begin-- */

$FG_TABLE_COL[]=array (“Calldate”, “calldate”, “18%”, “center”, “SORT”, “19”);
$FG_TABLE_COL[]=array (“Channel”, “channel”, “13%”, “center”, “”, “30”, “”, “”, “”, “”, “”, “display_acronym”);
$FG_TABLE_COL[]=array (“Source”, “src”, “14%”, “center”, “”, “30”);
$FG_TABLE_COL[]=array (“Clid”, “clid”, “26%”, “center”, “”, “80”);

$FG_TABLE_COL[]=array (“Dst”, “dst”, “14%”, “center”, “SORT”, “30”);

$FG_TABLE_COL[]=array (“Disposition”, “disposition”, “9%”, “center”, “”, “30”);
if ((!isset($resulttype)) || ($resulttype==“min”)) $minute_function= “display_minute”;
$FG_TABLE_COL[]=array (“Billsec”, “billsec” , “6%”, “center”, “SORT”, “30”, “”, “”, “”, “”, “”, “$minute_function”);

$FG_TABLE_DEFAULT_ORDER = “calldate”;
$FG_TABLE_DEFAULT_SENS = “DESC”;

// This Variable store the argument for the SQL query
//$FG_COL_QUERY=‘calldate, channel, src, clid, lastapp, lastdata, dst, dst, serverid, disposition, duration’;

$FG_COL_QUERY=‘calldate, channel, src, clid, dst, disposition, duration, billsec’;

/* --AMP End – */

What can be the wrong …