Outbound calls connecting then hanging up when answered

As of this afternoon I have a problem whereby if I call out on line 1 or 2 (having worked out if I set the DAHDI Trunks to Group 1 Round Robin and making 3 calls I can get to my 2nd and 3rd analog line) the third party phone rings, but as soon as they answer, the call is hung up. This is from Snom deskphones and from Zoiper softphone on my mobile phone and is the same for dialed mobiles or landlines. When reaching the 3rd line (using round robin) the call goes out the same yet when answered the call remains connected… I’ve had a long day and I’m stumped now! I’m not sure what information to post so that might be a start if I can post the relevant information for someone to look at. I’m so close now to a fully working system!

This is on FreePBX 12.0.74 (upgraded to today) with up to date modules etc.

Could this be something to do with the Telephone Company? I’ve literally just connected the lines, and made sure the ports were in the group with the working line…

Watch the call with the asterisk CLI at max verbosity. From Linux CLI:
asterisk -Rvvvvvvvvvv

post the output here.

When I’ve seen this issue, it has been related to networking items like broken NAT.

Do you have MWI or anything provisioned differently on line 3 from lines 1 and 2?, some providers do such signalling (MWI,Call waiting,CallerID etc.) in a fashion likely to cause that behavior if you don’t match your dahdi config to the nature of the analog line. Quick check, connect an analog phone to the suspect line, pick up the handset and listen for clicks or tones other than a straight “dialtone”

Given your location I would check

http://www.voip-info.org/wiki/view/Asterisk+and+UK+Caller+ID

and

http://www.voip-info.org/wiki/view/UK+Asterisk+Details

On another point, if you have your inbound analog lines in “hunt ascending” then you should use a descending sequential group (Gn rather than gn) for outbound to reduce the chance of “glare”

Sorry @dicko and @Overkill I’ve been on holiday!

@Overkill I will try it later as I can’t test during the day and there are analogue phones connected at present to enable calls to be made / received. However, when you say broken NAT, do you mean internally or externally? My system doesn’t go beyond the router as the calls go out over analogue lines. Forgive my ignorance, I am very new to all this!

@dicko, I have call divert services available on the two lines I’m struggling with, and all have caller ID. They are from two different TELCO’s, the two lines in question with one, and the single (working line) with another. What questions do I need to be asking both TELCO’s?

Thanks in advance!

Regards
Adam

You need to find out excactly what is provisioned and how on each of the lines, and how, then use the guides to mach your dahdi config to suit.

Perhaps a local user can help you more specifically with your as yet unnamed providers.

Ok, I will get onto our providers this afternoon. I’m pretty sure the dual line is with a company called CHES and the other single line (which appears to be working fine) is with TalkTalk Business.

Finally got round to testing this:

@Overkill here is the output:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
– Executing [[email protected]:1] Macro(“SIP/100-0000006b”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
– Executing [[email protected]:1] Set(“SIP/100-0000006b”, “TOUCH_MONITOR=1441907046.176”) in new stack
– Executing [[email protected]:2] Set(“SIP/100-0000006b”, “AMPUSER=100”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/100-0000006b”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“SIP/100-0000006b”, “1?Set(REALCALLERIDNUM=100)”) in new stack
– Executing [[email protected]:5] Set(“SIP/100-0000006b”, “AMPUSER=100”) in new stack
– Executing [[email protected]:6] GotoIf(“SIP/100-0000006b”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“SIP/100-0000006b”, “AMPUSERCIDNAME=Gemma”) in new stack
– Executing [[email protected]:8] GotoIf(“SIP/100-0000006b”, “0?report”) in new stack
– Executing [[email protected]:9] Set(“SIP/100-0000006b”, “AMPUSERCID=100”) in new stack
– Executing [[email protected]:10] Set(“SIP/100-0000006b”, “__DIAL_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:11] Set(“SIP/100-0000006b”, “CALLERID(all)=“Gemma” <100>”) in new stack
– Executing [[email protected]:12] GotoIf(“SIP/100-0000006b”, “0?limit”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/100-0000006b”, “1?Set(GROUP(concurrency_limit)=100)”) in new stack
– Executing [[email protected]:14] GosubIf(“SIP/100-0000006b”, “7?sub-ccss,s,1(from-internal,807974055990)”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/100-0000006b”, “0?Return()”) in new stack
– Executing [[email protected]:2] Set(“SIP/100-0000006b”, “CCSS_SETUP=TRUE”) in new stack
– Executing [[email protected]:3] GosubIf(“SIP/100-0000006b”, “0?monitor_config,1(from-internal,807974055990):monitor_default,1(from-internal,807974055990)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/100-0000006b”, “0?is_exten”) in new stack
– Executing [[email protected]:2] StackPop(“SIP/100-0000006b”, “”) in new stack
– Executing [[email protected]:3] Return(“SIP/100-0000006b”, “FALSE”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/100-0000006b”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [[email protected]:16] GotoIf(“SIP/100-0000006b”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,30)
– Executing [[email protected]:30] Set(“SIP/100-0000006b”, “CALLERID(number)=100”) in new stack
– Executing [[email protected]:31] Set(“SIP/100-0000006b”, “CALLERID(name)=Gemma”) in new stack
– Executing [[email protected]:32] Set(“SIP/100-0000006b”, “CDR(cnum)=100”) in new stack
– Executing [[email protected]:33] Set(“SIP/100-0000006b”, “CDR(cnam)=Gemma”) in new stack
– Executing [[email protected]:34] Set(“SIP/100-0000006b”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:2] Gosub(“SIP/100-0000006b”, “sub-record-check,s,1(out,807974055990,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“SIP/100-0000006b”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“SIP/100-0000006b”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“SIP/100-0000006b”, “NOW=1441907046”) in new stack
– Executing [[email protected]:4] Set(“SIP/100-0000006b”, “__DAY=10”) in new stack
– Executing [[email protected]:5] Set(“SIP/100-0000006b”, “__MONTH=09”) in new stack
– Executing [[email protected]:6] Set(“SIP/100-0000006b”, “__YEAR=2015”) in new stack
– Executing [[email protected]:7] Set(“SIP/100-0000006b”, “__TIMESTR=20150910-184406”) in new stack
– Executing [[email protected]:8] Set(“SIP/100-0000006b”, “__FROMEXTEN=100”) in new stack
– Executing [[email protected]:9] Set(“SIP/100-0000006b”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“SIP/100-0000006b”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“SIP/100-0000006b”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“SIP/100-0000006b”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“SIP/100-0000006b”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“SIP/100-0000006b”, “3?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“SIP/100-0000006b”, “1?sub-record-check,out,1”) in new stack
– Goto (sub-record-check,out,1)
– Executing [[email protected]:1] NoOp(“SIP/100-0000006b”, “Outbound Recording Check from 100 to 807974055990”) in new stack
– Executing [[email protected]:2] Set(“SIP/100-0000006b”, “RECMODE=dontcare”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/100-0000006b”, “1?Goto(routewins)”) in new stack
– Goto (sub-record-check,out,7)
– Executing [[email protected]:7] Gosub(“SIP/100-0000006b”, “recordcheck,1(dontcare,out,807974055990)”) in new stack
– Executing [[email protected]:1] NoOp(“SIP/100-0000006b”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“SIP/100-0000006b”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“SIP/100-0000006b”, “”) in new stack
– Executing [[email protected]:8] Return(“SIP/100-0000006b”, “”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/100-0000006b”, “0 ?Set(CDR(accountcode)=)”) in new stack
– Executing [[email protected]:4] Set(“SIP/100-0000006b”, “MOHCLASS=default”) in new stack
– Executing [[email protected]:5] Set(“SIP/100-0000006b”, “_NODEST=”) in new stack
– Executing [[email protected]:6] Macro(“SIP/100-0000006b”, “dialout-trunk,1,147007974055990,off”) in new stack
– Executing [[email protected]:1] Set(“SIP/100-0000006b”, “DIAL_TRUNK=1”) in new stack
– Executing [[email protected]:2] GosubIf(“SIP/100-0000006b”, “0?sub-pincheck,s,1()”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/100-0000006b”, “0?disabletrunk,1”) in new stack
– Executing [[email protected]:4] Set(“SIP/100-0000006b”, “DIAL_NUMBER=147007974055990”) in new stack
– Executing [[email protected]:5] Set(“SIP/100-0000006b”, “DIAL_TRUNK_OPTIONS=Ttr”) in new stack
– Executing [[email protected]:6] Set(“SIP/100-0000006b”, “OUTBOUND_GROUP=OUT_1”) in new stack
– Executing [[email protected]:7] GotoIf(“SIP/100-0000006b”, “1?nomax”) in new stack
– Goto (macro-dialout-trunk,s,9)
– Executing [[email protected]:9] GotoIf(“SIP/100-0000006b”, “0?skipoutcid”) in new stack
– Executing [[email protected]:10] Set(“SIP/100-0000006b”, “DIAL_TRUNK_OPTIONS=Tt”) in new stack
– Executing [[email protected]:11] Macro(“SIP/100-0000006b”, “outbound-callerid,1”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/100-0000006b”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [[email protected]:2] ExecIf(“SIP/100-0000006b”, “0?Set(REALCALLERIDNUM=100)”) in new stack
– Executing [[email protected]:3] GotoIf(“SIP/100-0000006b”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [[email protected]:6] Set(“SIP/100-0000006b”, “USEROUTCID=”) in new stack
– Executing [[email protected]:7] Set(“SIP/100-0000006b”, “EMERGENCYCID=”) in new stack
– Executing [[email protected]:8] Set(“SIP/100-0000006b”, “TRUNKOUTCID=01928897072”) in new stack
– Executing [[email protected]:9] GotoIf(“SIP/100-0000006b”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,14)
– Executing [[email protected]:14] ExecIf(“SIP/100-0000006b”, “1?Set(CALLERID(all)=01928897072)”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/100-0000006b”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/100-0000006b”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [[email protected]:17] ExecIf(“SIP/100-0000006b”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [[email protected]:18] Set(“SIP/100-0000006b”, “CDR(outbound_cnum)=01928897072”) in new stack
– Executing [[email protected]:19] Set(“SIP/100-0000006b”, “CDR(outbound_cnam)=”) in new stack
– Executing [[email protected]:12] GosubIf(“SIP/100-0000006b”, “1?sub-flp-1,s,1()”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/100-0000006b”, “0?Set(TARGET_FLP_1=47007974055990)”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/100-0000006b”, “0?match”) in new stack
– Executing [[email protected]:3] ExecIf(“SIP/100-0000006b”, “0?Set(TARGET_FLP_1=47007974055990)”) in new stack
– Executing [[email protected]:4] GotoIf(“SIP/100-0000006b”, “0?match”) in new stack
– Executing [[email protected]:5] Return(“SIP/100-0000006b”, “”) in new stack
– Executing [[email protected]:13] Set(“SIP/100-0000006b”, “OUTNUM=w147007974055990”) in new stack
– Executing [[email protected]:14] Set(“SIP/100-0000006b”, “custom=DAHDI/g1”) in new stack
– Executing [[email protected]:15] ExecIf(“SIP/100-0000006b”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)”) in new stack
– Executing [[email protected]:16] ExecIf(“SIP/100-0000006b”, “0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))”) in new stack
– Executing [[email protected]:17] Macro(“SIP/100-0000006b”, “dialout-trunk-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“SIP/100-0000006b”, “”) in new stack
– Executing [[email protected]:18] GotoIf(“SIP/100-0000006b”, “0?bypass,1”) in new stack
– Executing [[email protected]:19] ExecIf(“SIP/100-0000006b”, “1?Set(CONNECTEDLINE(num,i)=147007974055990)”) in new stack
– Executing [[email protected]:20] ExecIf(“SIP/100-0000006b”, “1?Set(CONNECTEDLINE(name,i)=CID:01928897072)”) in new stack
– Executing [[email protected]:21] GotoIf(“SIP/100-0000006b”, “0?customtrunk”) in new stack
– Executing [[email protected]:22] Dial(“SIP/100-0000006b”, “DAHDI/g1/w147007974055990,300,Tt”) in new stack
– Called DAHDI/g1/w147007974055990
– DAHDI/1-1 answered SIP/100-0000006b
> 0x2f49080 – Probation passed - setting RTP source address to 192.168.1.49:61074
– Executing [[email protected]:1] Macro(“SIP/100-0000006b”, “hangupcall,”) in new stack
– Executing [[email protected]:1] ExecIf(“SIP/100-0000006b”, “0?Set(CDR(recordingfile)=.wav)”) in new stack
– Executing [[email protected]:2] GotoIf(“SIP/100-0000006b”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [[email protected]:4] Hangup(“SIP/100-0000006b”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘SIP/100-0000006b’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/100-0000006b’
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’
== Spawn extension (macro-dialout-trunk, s, 22) exited non-zero on ‘SIP/100-0000006b’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 807974055990, 6) exited non-zero on ‘SIP/100-0000006b’
== Starting post polarity CID detection on channel 1
– Starting simple switch on ‘DAHDI/1-1’
[2015-09-10 18:44:37] WARNING[28007][C-00000050]: sig_analog.c:2512 __analog_ss_thread: CID timed out waiting for ring. Exiting simple switch
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’

I am hoping it is a silly mistake I’ve made!?

Thanks in advance!

I’ve read about problems with CID being sent too early in old versions of DAHDI, but I’m not experienced enough with this to make a conclusive analysis. I’m kinda a new kid on the block here, so I’d probably defer this one to @dicko

== Starting post polarity CID detection on channel 1
– Starting simple switch on ‘DAHDI/1-1’
[2015-09-10 18:44:37] WARNING[28007][C-00000050]: sig_analog.c:2512 _analogss_thread: CID timed out waiting for ring. Exiting simple switch
– Hanging up on ‘DAHDI/1-1’
– Hungup ‘DAHDI/1-1’

So apparently you are trying to use polarity switch detection and it is failing.

I’m sorry @dicko, I asked the questions and they didn’t seem to want to answer, kept asking why I wanted to know. They were told it was for a PBX and they wanted to know who was installing it etc.

I presume they provision caller ID differently to my other provider? My notes are at work, I will check tomorrow, then call them back. Maybe I’ll switch back to the other provider.

I appreciate your time!

Just as a quick test, I removed:

hanguponpolarityswitch=yes

And the other 2 lines are working, not sure how to test the third line now as I’ve set it up as a seperate trunk. I need to make this 3rd line accessible for outbound only when we need to use it, as opposed to being selected next in order. UK settings look like they are a pain in the backside :frowning: I keep reading quite old information and not sure if I’m using the correct set now!

Can anyone tell me the questions I need to ask the provider to get exactly the information we require?

Thanks for your support so far!