Dial Pattern Challenges

Hi Nick,

Once again thank you for the assistance,

I did the PJSIP history please see attached image. I blurred out the IP of our provider as well as our username.

We are using a Huawei HG659 which was provided by the service provider and they also control it. I am not getting much help from them. They say nothing is blocked. Their argument is if the SIP account can work if put on the phone directly then there is nothing wrong on the firewall and it not blocking anything.

I am going to try and setup a Chan_SIP trunk and see what happens. In the meantime you can check the PJSIP history and see what could be happening.

Thank you.

Hi Gregory!

I was tempted to suggest that but didn’t want to until it seemed we had exhausted everything on the PJSIP side…

Personally

In your case it might be some PJSIP incompatibility or maybe some additional parameters which need to be setted up on PJSIP…

It’s no longer fully true that I run Chan_SIP only though as I converted one of my trunks to PJSIP to have a better idea of how it works in order to try to help you…

It’s a minor trunk though, not the main one…

I have trunks I use for outbound only with a few different providers and only three which are also used for inbound…

And this is what your PJSIP trunk is connecting to?

Looks like the entries with 404 and 486 might be the most interesting ones… If you still want to get things working with PJSIP it would be interesting to do a pjsip show history entry x (where x it the line number on which those are).

Let us know how things turn out once you switch to Chan_SIP…

Good luck and have a nice day!

Nick

Nick,

Hope you day is going great

I set up a Chan_SIP trunk. I can see that it is up but however calls can’t come in, it reports that my number is not available. below are the setting on the trunk

username=*************
type=peer
secret=*************
qualify=yes
nat=yes
insecure=invite,port
host=****.***********.za
fromuser=***********
fromdomain=****.***********.za
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=g729

When I dial-out I get DECLINED on the screen of the phone. (Should I also setup the phones as Chan_SIP extensions- they are currently PJSIP)

To check if the trunk is up I checked under Reports on GUI, see images below

Asterisk Summary:

Chan_SIP Info:

When I dialout on the extension screen i get DECLINED and the CLI i get what is below

Connected to Asterisk 13.12.1 currently running on localhost (pid = 2071)
    -- Executing [0812641154@from-internal:1] Macro("PJSIP/2004-0000000a", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/2004-0000000a", "TOUCH_MONITOR=1488974882.12") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/2004-0000000a", "AMPUSER=2004") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/2004-0000000a", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/2004-0000000a", "1?Set(REALCALLERIDNUM=2004)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/2004-0000000a", "AMPUSER=2004") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/2004-0000000a", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/2004-0000000a", "AMPUSERCIDNAME=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/2004-0000000a", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/2004-0000000a", "AMPUSERCID=2004") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/2004-0000000a", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/2004-0000000a", "CALLERID(all)="Thokozani" <2004>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/2004-0000000a", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/2004-0000000a", "1?Set(GROUP(concurrency_limit)=2004)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/2004-0000000a", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/2004-0000000a", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/2004-0000000a", "CALLERID(number)=2004") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/2004-0000000a", "CALLERID(name)=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/2004-0000000a", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/2004-0000000a", "CDR(cnam)=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/2004-0000000a", "CDR(cnum)=2004") in new stack
    -- Executing [s@macro-user-callerid:34] Set("PJSIP/2004-0000000a", "CHANNEL(language)=en_GB") in new stack
    -- Executing [0812641154@from-internal:2] Gosub("PJSIP/2004-0000000a", "sub-record-check,s,1(out,0812641154,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/2004-0000000a", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/2004-0000000a", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/2004-0000000a", "NOW=1488974882") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/2004-0000000a", "__DAY=08") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/2004-0000000a", "__MONTH=03") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/2004-0000000a", "__YEAR=2017") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/2004-0000000a", "__TIMESTR=20170308-120802") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/2004-0000000a", "__FROMEXTEN=2004") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/2004-0000000a", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/2004-0000000a", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/2004-0000000a", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/2004-0000000a", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/2004-0000000a", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/2004-0000000a", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/2004-0000000a", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/2004-0000000a", "Outbound Recording Check from 2004 to 0812641154") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/2004-0000000a", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/2004-0000000a", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/2004-0000000a", "recordcheck,1(dontcare,out,0812641154)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/2004-0000000a", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/2004-0000000a", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/2004-0000000a", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/2004-0000000a", "") in new stack
    -- Executing [0812641154@from-internal:3] ExecIf("PJSIP/2004-0000000a", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0812641154@from-internal:4] Set("PJSIP/2004-0000000a", "MOHCLASS=default") in new stack
    -- Executing [0812641154@from-internal:5] ExecIf("PJSIP/2004-0000000a", "1?Set(TRUNKCIDOVERRIDE=0116753130)") in new stack
    -- Executing [0812641154@from-internal:6] Set("PJSIP/2004-0000000a", "_NODEST=") in new stack
    -- Executing [0812641154@from-internal:7] Macro("PJSIP/2004-0000000a", "dialout-trunk,2,0812641154,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/2004-0000000a", "DIAL_TRUNK=2") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/2004-0000000a", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/2004-0000000a", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/2004-0000000a", "DIAL_NUMBER=0812641154") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/2004-0000000a", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/2004-0000000a", "OUTBOUND_GROUP=OUT_2") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/2004-0000000a", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/2004-0000000a", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/2004-0000000a", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/2004-0000000a", "outbound-callerid,2") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/2004-0000000a", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/2004-0000000a", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/2004-0000000a", "0?Set(REALCALLERIDNUM=2004)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/2004-0000000a", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/2004-0000000a", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/2004-0000000a", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/2004-0000000a", "TRUNKOUTCID=0116753130") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/2004-0000000a", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/2004-0000000a", "1?Set(CALLERID(all)=0116753130)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/2004-0000000a", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/2004-0000000a", "1?Set(CALLERID(all)=0116753130)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/2004-0000000a", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/2004-0000000a", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/2004-0000000a", "CDR(outbound_cnum)=0116753130") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/2004-0000000a", "CDR(outbound_cnam)=") in new stack
[2017-03-08 12:08:02] WARNING[2099]: func_cdr.c:383 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/2004-0000000a", "0?sub-flp-2,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/2004-0000000a", "OUTNUM=0812641154") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/2004-0000000a", "custom=SIP/Chan_SIP_Trunk") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/2004-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/2004-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/2004-0000000a", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/2004-0000000a", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/2004-0000000a", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/2004-0000000a", "1?Set(CONNECTEDLINE(num,i)=0812641154)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/2004-0000000a", "1?Set(CONNECTEDLINE(name,i)=CID:0116753130)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/2004-0000000a", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)0116753130)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/2004-0000000a", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/2004-0000000a", "SIP/Chan_SIP_Trunk/0812641154,300,T") in new stack
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
    -- Called SIP/Chan_SIP_Trunk/0812641154
[2017-03-08 12:08:02] WARNING[28406][C-00000006]: channel.c:6440 ast_channel_make_compatible_helper: No path to translate from SIP/Chan_SIP_Trunk-00000002 to PJSIP/2004-0000000a
  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/2004-0000000a' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0812641154, 7) exited non-zero on 'PJSIP/2004-0000000a'
    -- Executing [h@from-internal:1] Macro("PJSIP/2004-0000000a", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/2004-0000000a", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/2004-0000000a", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/2004-0000000a", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/2004-0000000a' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/2004-0000000a'
[2017-03-08 12:08:02] WARNING[2404][C-00000006]: chan_sip.c:23862 handle_response_invite: Received response: "Forbidden" from '<sip:[email protected]:5160>;tag=as7ba74b55'

Have you bought enough g729 licenses ?

Wanted to ensure that the link works first before getting licenses

From your post

context=from-trunk
canreinvite=no
allow=g729

Make that

alllow=all

Thanks,

Done that, I am now getting “All circuits are busy” but I am the only one on dialing out and the trunk looks up. And calls can’t come in

I replied to your ‘dialing in’ problem, you will need to use an acceptable codec end to end, and yoy will need an inbound route that matches the DID that was called, and the port used by the VSP must match your trunk signaling

I set the INBOUND route to match any DID, on the trunk settings can I add a line port=**** to indicate the port provided by the VSP?

port=xxxxx

lets the trunk know to use a differemt port to signal and/or listen on, it must match what the VSP is using, but you will lukely have a cpnflict if any other service is bound to ihat port

I have added Port=5060, which is the port VSP is using, there is no other services using that port 5060. But still getting circuits busy error. Is there any other way I can confirm that the trunk is up beside checking on the GUI on the reports sections

You have both chan-sip and chan-pjsip, listenning by default in FreePBX pjsip on 5060, this is changeable in the gui, from bash

lsof -i :5060

Does PJSIP listen even if there is no PJSIP trunk setup

Yes

(Some padding here)

:slight_smile: I have checked on the GUI, can’t see where to change listening port for PJSIP, please can you guide

Sip settings then chan-pjsip maybe?

Thank you for all the assistance, I am at another interesting stage. When I dial out, the hand set shows DECLINED and drops the call, but the call actually goes through and will be ringing on the other end. the moment the the person on the other end picks the call it goes dead

Hi Gregory!

(I am still around I just thought it was better not to hammer you with tests and questions coming both from dicko and me…)

What are your phones set to accept as far as codec are concerned?

Are you only allowing G.729?

For now allow alaw/ulaw (G.711) as well… If the codec negotiation is the problem you will be able to take care of it once you have the appropriate licenses…)

Good luck and have a nice day!

Nick

Hi Nick,

I thought you had gone on a holiday:slight_smile:
Thank you, you are right it was going to be too much getting test and questions from the both of you at the sane time.

I enabled G.729 on the phones and put as priority, the service provider has also told me to enable G.729 is enabled see image below

Also on Asterisks I have enabled alwaw/ulaw see image below

Now the when I dial the line just goes dead, and later a message will come saying “The number is not answering”

The log for when I call are below:

=========================================================================
Connected to Asterisk 13.12.1 currently running on localhost (pid = 2069)
    -- Executing [0812641154@from-internal:1] Macro("PJSIP/2004-0000000e", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/2004-0000000e", "TOUCH_MONITOR=1489393162.14") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/2004-0000000e", "AMPUSER=2004") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/2004-0000000e", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/2004-0000000e", "1?Set(REALCALLERIDNUM=2004)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/2004-0000000e", "AMPUSER=2004") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/2004-0000000e", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/2004-0000000e", "AMPUSERCIDNAME=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/2004-0000000e", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/2004-0000000e", "AMPUSERCID=2004") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/2004-0000000e", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/2004-0000000e", "CALLERID(all)="Thokozani" <2004>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/2004-0000000e", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/2004-0000000e", "1?Set(GROUP(concurrency_limit)=2004)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/2004-0000000e", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/2004-0000000e", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/2004-0000000e", "CALLERID(number)=2004") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/2004-0000000e", "CALLERID(name)=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:31] GotoIf("PJSIP/2004-0000000e", "0?cnum") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/2004-0000000e", "CDR(cnam)=Thokozani") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/2004-0000000e", "CDR(cnum)=2004") in new stack
    -- Executing [s@macro-user-callerid:34] Set("PJSIP/2004-0000000e", "CHANNEL(language)=en_GB") in new stack
    -- Executing [0812641154@from-internal:2] Gosub("PJSIP/2004-0000000e", "sub-record-check,s,1(out,0812641154,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/2004-0000000e", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/2004-0000000e", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/2004-0000000e", "NOW=1489393162") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/2004-0000000e", "__DAY=13") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/2004-0000000e", "__MONTH=03") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/2004-0000000e", "__YEAR=2017") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/2004-0000000e", "__TIMESTR=20170313-101922") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/2004-0000000e", "__FROMEXTEN=2004") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/2004-0000000e", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/2004-0000000e", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/2004-0000000e", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/2004-0000000e", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/2004-0000000e", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/2004-0000000e", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/2004-0000000e", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/2004-0000000e", "Outbound Recording Check from 2004 to 0812641154") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/2004-0000000e", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/2004-0000000e", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/2004-0000000e", "recordcheck,1(dontcare,out,0812641154)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/2004-0000000e", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/2004-0000000e", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/2004-0000000e", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/2004-0000000e", "") in new stack
    -- Executing [0812641154@from-internal:3] ExecIf("PJSIP/2004-0000000e", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0812641154@from-internal:4] Set("PJSIP/2004-0000000e", "MOHCLASS=default") in new stack
    -- Executing [0812641154@from-internal:5] ExecIf("PJSIP/2004-0000000e", "1?Set(TRUNKCIDOVERRIDE=27872884271)") in new stack
    -- Executing [0812641154@from-internal:6] Set("PJSIP/2004-0000000e", "_NODEST=") in new stack
    -- Executing [0812641154@from-internal:7] Macro("PJSIP/2004-0000000e", "dialout-trunk,1,0812641154,,off") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/2004-0000000e", "DIAL_TRUNK=1") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/2004-0000000e", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/2004-0000000e", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/2004-0000000e", "DIAL_NUMBER=0812641154") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/2004-0000000e", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/2004-0000000e", "OUTBOUND_GROUP=OUT_1") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/2004-0000000e", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/2004-0000000e", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/2004-0000000e", "DIAL_TRUNK_OPTIONS=T") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/2004-0000000e", "outbound-callerid,1") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/2004-0000000e", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/2004-0000000e", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/2004-0000000e", "0?Set(REALCALLERIDNUM=2004)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/2004-0000000e", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/2004-0000000e", "USEROUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/2004-0000000e", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/2004-0000000e", "TRUNKOUTCID=27872884271") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/2004-0000000e", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/2004-0000000e", "1?Set(CALLERID(all)=27872884271)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/2004-0000000e", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/2004-0000000e", "1?Set(CALLERID(all)=27872884271)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/2004-0000000e", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/2004-0000000e", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/2004-0000000e", "CDR(outbound_cnum)=27872884271") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/2004-0000000e", "CDR(outbound_cnam)=") in new stack
[2017-03-13 10:19:22] WARNING[2105]: func_cdr.c:383 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/2004-0000000e", "0?sub-flp-1,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/2004-0000000e", "OUTNUM=0812641154") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/2004-0000000e", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/2004-0000000e", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/2004-0000000e", "0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/2004-0000000e", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/2004-0000000e", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/2004-0000000e", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/2004-0000000e", "1?Set(CONNECTEDLINE(num,i)=0812641154)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/2004-0000000e", "1?Set(CONNECTEDLINE(name,i)=CID:27872884271)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/2004-0000000e", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)27872884271)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/2004-0000000e", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/2004-0000000e", "PJSIP/0812641154@PJ,300,T") in new stack
    -- Called PJSIP/0812641154@PJ
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dialout-trunk:24] NoOp("PJSIP/2004-0000000e", "Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 18") in new stack
    -- Executing [s@macro-dialout-trunk:25] GotoIf("PJSIP/2004-0000000e", "0?continue,1:s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:1] Set("PJSIP/2004-0000000e", "RC=18") in new stack
    -- Executing [s-CHANUNAVAIL@macro-dialout-trunk:2] Goto("PJSIP/2004-0000000e", "18,1") in new stack
    -- Goto (macro-dialout-trunk,18,1)
    -- Executing [18@macro-dialout-trunk:1] Goto("PJSIP/2004-0000000e", "s-NOANSWER,1") in new stack
    -- Goto (macro-dialout-trunk,s-NOANSWER,1)
    -- Executing [s-NOANSWER@macro-dialout-trunk:1] NoOp("PJSIP/2004-0000000e", "Dial failed due to trunk reporting NOANSWER - giving up") in new stack
    -- Executing [s-NOANSWER@macro-dialout-trunk:2] Progress("PJSIP/2004-0000000e", "") in new stack
    -- Executing [s-NOANSWER@macro-dialout-trunk:3] Playback("PJSIP/2004-0000000e", "number-not-answering,noanswer") in new stack
    -- <PJSIP/2004-0000000e> Playing 'number-not-answering.ulaw' (language 'en_GB')
       > 0x7fe38805cf20 -- Probation passed - setting RTP source address to 192.168.2.204:64042
    -- Executing [s-NOANSWER@macro-dialout-trunk:4] Congestion("PJSIP/2004-0000000e", "20") in new stack
[2017-03-13 10:19:56] WARNING[8079][C-00000007]: channel.c:4928 ast_prod: Prodding channel 'PJSIP/2004-0000000e' failed
  == Spawn extension (macro-dialout-trunk, s-NOANSWER, 4) exited non-zero on 'PJSIP/2004-0000000e' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0812641154, 7) exited non-zero on 'PJSIP/2004-0000000e'
    -- Executing [h@from-internal:1] Macro("PJSIP/2004-0000000e", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/2004-0000000e", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/2004-0000000e", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/2004-0000000e", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/2004-0000000e' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/2004-0000000e'

Hi Gregory!

Looks like you are back to using PJSIP only, am I wrong?

Using Chan_SIP was an interesting idea, maybe you are encountering a PJSIP compatibility issue…

If you are back to using PJSIP though can we please retry

Do a pjsip set history clear before (apparently this log is persistent, we don’t want the old entries…). Post the list it shows you here. Search for entries such as the 404 and 486 you had before and do a pjsip show history entry x (where x it the line number on which those are).

Hopefully these will contain the reason of the DECLINED…

Good luck and have a nice day!

Nick