PJSIP/anonymous asked to send alaw frame when native formats are (g723) - Error

I’m using FreePBX 14.0.4.1 with PJSIP and incoming calls from 3 different SIP providers that were working before and only use alaw and ulaw show the following error:

[2018-10-30 12:14:34] WARNING[9942][C-0000002b]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000063 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
– Executing [[email protected]:3] MacroExit(“PJSIP/6001-00000064”, “”) in new stack

I don’t have g723 set anywhere, I’ve grepped all day long and I’m using Sangoma handsets so not sure why it doesn’t just stick to ulaw/alaw?

core show translation shows no mention of g723 any pointer in where to look would be much appreciated

Thanks in advance

Josh

You need to show the full call. Snippets are not informative enough.

Hi Tom,

Thanks for the reply, I don’t know if this call trace will help, but if it sheds any lights on the problem or at least a pointer that would be amazing.

== Setting global variable ‘SIPDOMAIN’ to ‘81.16.18.100’
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000073”, “Received incoming SIP connection from unknown peer to 44330330330”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/anonymous-00000073”, “DID=44330330330”) in new stack
– Executing [[email protected]:3] Goto(“PJSIP/anonymous-00000073”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000073”, “1?setlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [[email protected]:2] Set(“PJSIP/anonymous-00000073”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/anonymous-00000073”, “0?noanonymous”) in new stack
– Executing [[email protected]:4] Goto(“PJSIP/anonymous-00000073”, “from-trunk,44330330330,1”) in new stack
– Goto (from-trunk,44330330330,1)
– Executing [[email protected]:1] Set(“PJSIP/anonymous-00000073”, “__DIRECTION=INBOUND”) in new stack
– Executing [[email protected]:2] Gosub(“PJSIP/anonymous-00000073”, “sub-record-check,s,1(in,44330330330,never)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000073”, “0?initialized”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/anonymous-00000073”, “__REC_STATUS=INITIALIZED”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/anonymous-00000073”, “NOW=1540903992”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/anonymous-00000073”, “__DAY=30”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/anonymous-00000073”, “__MONTH=10”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/anonymous-00000073”, “__YEAR=2018”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/anonymous-00000073”, “__TIMESTR=20181030-125312”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/anonymous-00000073”, “__FROMEXTEN=unknown”) in new stack
– Executing [[email protected]:9] Set(“PJSIP/anonymous-00000073”, “__MON_FMT=wav”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/anonymous-00000073”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/anonymous-00000073”, “REC_POLICY_MODE_SAVE=”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/anonymous-00000073”, “2?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/anonymous-00000073”, “1?sub-record-check,in,1”) in new stack
– Goto (sub-record-check,in,1)
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000073”, “Inbound Recording Check to 44330330330”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/anonymous-00000073”, “FROMEXTEN=unknown”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000073”, “11?Set(FROMEXTEN=07777711711)”) in new stack
– Executing [[email protected]:4] Gosub(“PJSIP/anonymous-00000073”, “recordcheck,1(never,in,44330330330)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000073”, “Starting recording check against never”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/anonymous-00000073”, “never”) in new stack
– Goto (sub-record-check,recordcheck,14)
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “__REC_POLICY_MODE=NEVER”) in new stack
– Executing [[email protected]:15] Goto(“PJSIP/anonymous-00000073”, “stoprec”) in new stack
– Goto (sub-record-check,recordcheck,25)
– Executing [[email protected]:25] NoOp(“PJSIP/anonymous-00000073”, “Stopping recording: in, 44330330330”) in new stack
– Executing [[email protected]:26] Set(“PJSIP/anonymous-00000073”, “__REC_STATUS=STOPPED”) in new stack
– Executing [[email protected]:27] System(“PJSIP/anonymous-00000073”, "/var/lib/asterisk/bin/stoprecording.php “PJSIP/anonymous-00000073"”) in new stack
– Executing [[email protected]:28] Return(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:5] Return(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:3] Set(“PJSIP/anonymous-00000073”, “CHANNEL(tonezone)=uk”) in new stack
– Executing [[email protected]:4] Set(“PJSIP/anonymous-00000073”, “__FROM_DID=44330330330”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/anonymous-00000073”, “CDR(did)=44330330330”) in new stack
– Executing [[email protected]:6] ExecIf(“PJSIP/anonymous-00000073”, “1 ?Set(CALLERID(name)=07777711711)”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/anonymous-00000073”, “__MOHCLASS=”) in new stack
– Executing [[email protected]:8] Set(“PJSIP/anonymous-00000073”, “__REVERSAL_REJECT=FALSE”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/anonymous-00000073”, “1?post-reverse-charge”) in new stack
– Goto (from-trunk,44330330330,11)
– Executing [[email protected]:11] NoOp(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/anonymous-00000073”, “__CALLINGNAMEPRES_SV=allowed_not_screened”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/anonymous-00000073”, “__CALLINGNUMPRES_SV=allowed_not_screened”) in new stack
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “CALLERID(name-pres)=allowed_not_screened”) in new stack
– Executing [[email protected]:15] Set(“PJSIP/anonymous-00000073”, “CALLERID(num-pres)=allowed_not_screened”) in new stack
– Executing [[email protected]:16] NoOp(“PJSIP/anonymous-00000073”, “CallerID Entry Point”) in new stack
– Executing [[email protected]:17] Goto(“PJSIP/anonymous-00000073”, “ext-group,601,1”) in new stack
– Goto (ext-group,601,1)
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000073”, “0?cid”) in new stack
– Executing [[email protected]:2] PlayTones(“PJSIP/anonymous-00000073”, “ring”) in new stack
– Executing [[email protected]:3] Progress(“PJSIP/anonymous-00000073”, “”) in new stack
> 0xadaf9718 – Strict RTP learning after remote address set to: 87.238.73.161:21856
– Executing [[email protected]:4] Macro(“PJSIP/anonymous-00000073”, “user-callerid,”) in new stack
[2018-10-30 12:53:16] WARNING[3940]: channel.c:5740 set_format: Unable to find a codec translation path: (slin) -> (g723)
– Executing [[email protected]:1] Set(“PJSIP/anonymous-00000073”, “TOUCH_MONITOR=1540903992.123”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/anonymous-00000073”, “AMPUSER=07777711711”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/anonymous-00000073”, “0?report”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/anonymous-00000073”, “1?Set(REALCALLERIDNUM=07777711711)”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/anonymous-00000073”, “AMPUSER=”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/anonymous-00000073”, “0?limit”) in new stack
– Executing [[email protected]:7] Set(“PJSIP/anonymous-00000073”, “AMPUSERCIDNAME=”) in new stack
– Executing [[email protected]:8] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
– Executing [[email protected]:9] GotoIf(“PJSIP/anonymous-00000073”, “1?report”) in new stack
– Goto (macro-user-callerid,s,15)
– Executing [[email protected]:15] NoOp(“PJSIP/anonymous-00000073”, “Macro Depth is 1”) in new stack
– Executing [[email protected]:16] GotoIf(“PJSIP/anonymous-00000073”, “1?report2:macroerror”) in new stack
– Goto (macro-user-callerid,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/anonymous-00000073”, “0?continue”) in new stack
– Executing [[email protected]:18] Set(“PJSIP/anonymous-00000073”, “__TTL=64”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/anonymous-00000073”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,35)
– Executing [[email protected]:35] Set(“PJSIP/anonymous-00000073”, “CALLERID(number)=07777711711”) in new stack
– Executing [[email protected]:36] Set(“PJSIP/anonymous-00000073”, “CALLERID(name)=07777711711”) in new stack
– Executing [[email protected]:37] GotoIf(“PJSIP/anonymous-00000073”, “0?cnum”) in new stack
– Executing [[email protected]:38] Set(“PJSIP/anonymous-00000073”, “CDR(cnam)=07777711711”) in new stack
– Executing [[email protected]:39] Set(“PJSIP/anonymous-00000073”, “CDR(cnum)=07777711711”) in new stack
– Executing [[email protected]:40] Set(“PJSIP/anonymous-00000073”, “CHANNEL(language)=en”) in new stack
– Executing [[email protected]:5] Macro(“PJSIP/anonymous-00000073”, “blkvm-setifempty,”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000073”, “1?init”) in new stack
– Goto (macro-blkvm-setifempty,s,4)
– Executing [[email protected]:4] Set(“PJSIP/anonymous-00000073”, “__BLKVM_CHANNEL=PJSIP/anonymous-00000073”) in new stack
– Executing [[email protected]:5] Set(“PJSIP/anonymous-00000073”, “SHARED(BLKVM,PJSIP/anonymous-00000073)=TRUE”) in new stack
– Executing [[email protected]:6] Set(“PJSIP/anonymous-00000073”, “GOSUB_RETVAL=TRUE”) in new stack
– Executing [[email protected]:7] MacroExit(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:6] GotoIf(“PJSIP/anonymous-00000073”, “1?skipov”) in new stack
– Goto (ext-group,601,9)
– Executing [[email protected]:9] Set(“PJSIP/anonymous-00000073”, “RRNODEST=”) in new stack
– Executing [[email protected]:10] Set(“PJSIP/anonymous-00000073”, “__NODEST=601”) in new stack
– Executing [[email protected]:11] GosubIf(“PJSIP/anonymous-00000073”, “0?sub-rgsetcid,s,1()”) in new stack
– Executing [[email protected]:12] Gosub(“PJSIP/anonymous-00000073”, “sub-record-check,s,1(rg,601,dontcare)”) in new stack
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000073”, “11?initialized”) in new stack
– Goto (sub-record-check,s,10)
– Executing [[email protected]:10] NoOp(“PJSIP/anonymous-00000073”, “Recordings initialized”) in new stack
– Executing [[email protected]:11] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(ARG3=dontcare)”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/anonymous-00000073”, “REC_POLICY_MODE_SAVE=NEVER”) in new stack
– Executing [[email protected]:13] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(REC_STATUS=NO)”) in new stack
– Executing [[email protected]:14] GotoIf(“PJSIP/anonymous-00000073”, “2?checkaction”) in new stack
– Goto (sub-record-check,s,17)
– Executing [[email protected]:17] GotoIf(“PJSIP/anonymous-00000073”, “0?sub-record-check,rg,1”) in new stack
– Executing [[email protected]:18] NoOp(“PJSIP/anonymous-00000073”, “Generic rg Recording Check - 07777711711 601”) in new stack
– Executing [[email protected]:19] Gosub(“PJSIP/anonymous-00000073”, “recordcheck,1(dontcare,rg,601)”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000073”, “Starting recording check against dontcare”) in new stack
– Executing [[email protected]:2] Goto(“PJSIP/anonymous-00000073”, “dontcare”) in new stack
– Goto (sub-record-check,recordcheck,3)
– Executing [[email protected]:3] Return(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:20] Return(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/anonymous-00000073”, “RingGroupMethod=ringall”) in new stack
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “__ALT_CONFIRM_MSG=”) in new stack
– Executing [[email protected]:15] GotoIf(“PJSIP/anonymous-00000073”, “0?RGVQANNOUNCE:NORGVQANNOUNCE”) in new stack
– Goto (ext-group,601,18)
– Executing [[email protected]:18] Macro(“PJSIP/anonymous-00000073”, “dial,20,Ttrc,6001-6002-6003-6004-6005”) in new stack
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000073”, "Blind Transfer: , Attended Transfer: , User: , Alert Info: ") in new stack
– Executing [[email protected]:2] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:4] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(ALERT_INFO=)”) in new stack
– Executing [[email protected]:5] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(CHANNEL(musicclass)=)”) in new stack
– Executing [[email protected]:6] AGI(“PJSIP/anonymous-00000073”, “dialparties.agi”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send ulaw frame when native formats are (g723) (rd:g723->g723; wr:slin->ulaw;([email protected])->([email protected]))
> 0xadaf9718 – Strict RTP switching to RTP target address 87.238.73.161:21856 as source
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (starting codec is not valid)
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:17] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:18] WARNING[10614][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
dialparties.agi: Starting New Dialparties.agi
dialparties.agi: Caller ID name is ‘07777711711’ number is ‘07777711711’
dialparties.agi: CW Ignore is:
dialparties.agi: CF Ignore is:
dialparties.agi: CW IN_USE/BUSY is: 1
> dialparties.agi: USE_CONFIRMATION: ‘FALSE’
> dialparties.agi: RINGGROUP_INDEX: ‘’
dialparties.agi: Methodology of ring is ‘ringall’
– dialparties.agi: Added extension 6001 to extension map
– dialparties.agi: Added extension 6002 to extension map
– dialparties.agi: Added extension 6003 to extension map
– dialparties.agi: Added extension 6004 to extension map
– dialparties.agi: Added extension 6005 to extension map
– dialparties.agi: Extension 6001 cf is disabled
– dialparties.agi: Extension 6002 cf is disabled
– dialparties.agi: Extension 6003 cf is disabled
– dialparties.agi: Extension 6004 cf is disabled
– dialparties.agi: Extension 6005 cf is disabled
– dialparties.agi: Extension 6001 do not disturb is disabled
– dialparties.agi: Extension 6002 do not disturb is disabled
– dialparties.agi: Extension 6003 do not disturb is disabled
– dialparties.agi: Extension 6004 do not disturb is disabled
– dialparties.agi: Extension 6005 do not disturb is disabled
> dialparties.agi: extnum 6001 has: cw: 1; hascfb: 0 [] hascfu: 0 []
== dialparties.agi: Discovered PJSIP Endpoint PJSIP/6001
– dialparties.agi: Ended up with real PJSIP Dial string PJSIP/6001/sip:[email protected]:5060
– dialparties.agi: dbset CALLTRACE/6001 to 07777711711
> dialparties.agi: extnum 6002 has: cw: 1; hascfb: 0 [] hascfu: 0 []
== dialparties.agi: Discovered PJSIP Endpoint PJSIP/6002
– dialparties.agi: Ended up with real PJSIP Dial string PJSIP/6002/sip:[email protected]:49160;line=vg95w5s5
– dialparties.agi: dbset CALLTRACE/6002 to 07777711711
> dialparties.agi: extnum 6003 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 6003 has ExtensionState: 4
– dialparties.agi: Checking CW and CFB status for extension 6003
dialparties.agi: Extension 6003 is not available to be called
> dialparties.agi: extnum 6004 has: cw: 0; hascfb: 0 [] hascfu: 0 []
dialparties.agi: EXTENSION_STATE: 4 (UNKNOWN)
dialparties.agi: Extension 6004 has ExtensionState: 4
– dialparties.agi: Checking CW and CFB status for extension 6004
dialparties.agi: Extension 6004 is not available to be called
> dialparties.agi: extnum 6005 has: cw: 1; hascfb: 0 [] hascfu: 0 []
== dialparties.agi: Discovered PJSIP Endpoint PJSIP/6005
– dialparties.agi: Ended up with real PJSIP Dial string PJSIP/6005/sip:[email protected]:5060
– dialparties.agi: dbset CALLTRACE/6005 to 07777711711
– dialparties.agi: Filtered ARG3: 6001-6002-6005
– dialparties.agi: dbset CALLTRACE/6005 to 07777711711
– dialparties.agi: Filtered ARG3: 6001-6002-6005
> dialparties.agi: NODEST: 601 adding M(auto-blkvm) to dialopts: TtrcM(auto-blkvm)
> dialparties.agi: NODEST: 601 blkvm enabled macro already in dialopts: TtrcM(auto-blkvm)
dialparties.agi: RVOL_MODE ‘’
dialparties.agi: RVOL is:
dialparties.agi: RVOLPARENT is:
– <PJSIP/anonymous-00000073>AGI Script dialparties.agi completed, returning 0
– Executing [[email protected]:9] NoOp(“PJSIP/anonymous-00000073”, “Returned from dialparties with groups to dial”) in new stack
– Executing [[email protected]:10] NoOp(“PJSIP/anonymous-00000073”, "ringall array ") in new stack
– Executing [[email protected]:11] Set(“PJSIP/anonymous-00000073”, “__FMGL_DIAL=”) in new stack
– Executing [[email protected]:12] Set(“PJSIP/anonymous-00000073”, “LOOPCNT=3”) in new stack
– Executing [[email protected]:13] Set(“PJSIP/anonymous-00000073”, “ITER=1”) in new stack
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “__EXTTOCALL=6001”) in new stack
– Executing [[email protected]:15] NoOp(“PJSIP/anonymous-00000073”, “Working with 6001”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]:18] Set(“PJSIP/anonymous-00000073”, “ITER=2”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/anonymous-00000073”, “1?ndloopbegin”) in new stack
– Goto (macro-dial,s,14)
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “__EXTTOCALL=6002”) in new stack
– Executing [[email protected]:15] NoOp(“PJSIP/anonymous-00000073”, “Working with 6002”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]acro-dial:17] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]:18] Set(“PJSIP/anonymous-00000073”, “ITER=3”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/anonymous-00000073”, “1?ndloopbegin”) in new stack
– Goto (macro-dial,s,14)
– Executing [[email protected]:14] Set(“PJSIP/anonymous-00000073”, “__EXTTOCALL=6005”) in new stack
– Executing [[email protected]:15] NoOp(“PJSIP/anonymous-00000073”, “Working with 6005”) in new stack
– Executing [[email protected]:16] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]:17] ExecIf(“PJSIP/anonymous-00000073”, “0?Set(HASH(__SIPHEADERS,Alert-Info)=Normal;volume=)”) in new stack
– Executing [[email protected]:18] Set(“PJSIP/anonymous-00000073”, “ITER=4”) in new stack
– Executing [[email protected]:19] GotoIf(“PJSIP/anonymous-00000073”, “0?ndloopbegin”) in new stack
– Executing [[email protected]:20] Macro(“PJSIP/anonymous-00000073”, “dial-ringall-predial-hook,”) in new stack
– Executing [[email protected]:1] MacroExit(“PJSIP/anonymous-00000073”, “”) in new stack
– Executing [[email protected]:21] Dial(“PJSIP/anonymous-00000073”, “PJSIP/6001/sip:[email protected]:5060&PJSIP/6002/sip:[email protected]:49160;line=vg95w5s5&PJSIP/6005/sip:[email protected]:5060,20,trcM(auto-blkvm)b(func-apply-sipheaders^s^1),”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– PJSIP/6001-00000074 Internal Gosub(func-apply-sipheaders,s,1) start
– Executing [[email protected]:1] NoOp(“PJSIP/6001-00000074”, “Applying SIP Headers to channel”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:2] Set(“PJSIP/6001-00000074”, “SIPHEADERKEYS=”) in new stack
– Executing [[email protected]:3] ExecIf(“PJSIP/6001-00000074”, “0?Set(Rheader=1)”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:4] While(“PJSIP/6001-00000074”, “0”) in new stack
– Jumping to priority 8
– Executing [[email protected]:9] ExecIf(“PJSIP/6001-00000074”, “0?SIPRemoveHeader(Alert-Info:)”) in new stack
– Executing [[email protected]:10] ExecIf(“PJSIP/6001-00000074”, “0?Set(PJSIP_HEADER(remove,Alert-Info)=)”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:11] Return(“PJSIP/6001-00000074”, “”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
== Spawn extension (from-internal, 601, 1) exited non-zero on ‘PJSIP/6001-00000074’
– PJSIP/6001-00000074 Internal Gosub(func-apply-sipheaders,s,1) complete GOSUB_RETVAL=
– PJSIP/6002-00000075 Internal Gosub(func-apply-sipheaders,s,1) start
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:1] NoOp(“PJSIP/6002-00000075”, “Applying SIP Headers to channel”) in new stack
– Executing [[email protected]:2] Set(“PJSIP/6002-00000075”, “SIPHEADERKEYS=”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:3] ExecIf(“PJSIP/6002-00000075”, “0?Set(Rheader=1)”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
– Executing [[email protected]:4] While(“PJSIP/6002-00000075”, “0”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723)
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: translate.c:488 ast_translator_build_path: No translator path: (ending codec is not valid)
– Executing [[email protected]:4] While(“PJSIP/6005-00000076”, “0”) in new stack
[2018-10-30 12:53:19] WARNING[9942][C-0000002f]: chan_pjsip.c:856 chan_pjsip_write: Channel PJSIP/anonymous-00000073 asked to send alaw frame when native formats are (g723) (rd:g723->g723; wr:slin->alaw;([email protected])->([email protected]))

-- Executing [[email protected]:1] GotoIf("PJSIP/anonymous-00000073", "1?theend") in new stack
-- Goto (macro-hangupcall,s,3)
-- Executing [[email protected]:3] ExecIf("PJSIP/anonymous-00000073", "0?Set(CDR(recordingfile)=)") in new stack
-- Executing [[email protected]:4] NoOp("PJSIP/anonymous-00000073", "PJSIP/6005-00000076 monior file= ") in new stack
-- Executing [[email protected]:5] AGI("PJSIP/anonymous-00000073", "attendedtransfer-rec-restart.php,PJSIP/6005-00000076,") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/attendedtransfer-rec-restart.php
-- <PJSIP/anonymous-00000073>AGI Script attendedtransfer-rec-restart.php completed, returning 0
-- Executing [[email protected]:6] Hangup("PJSIP/anonymous-00000073", "") in new stack

== Spawn extension (macro-hangupcall, s, 6) exited non-zero on ‘PJSIP/anonymous-00000073’ in macro ‘hangupcall’
== Spawn extension (ext-group, h, 1) exited non-zero on ‘PJSIP/anonymous-00000073’

Is there are reason you are using an “anonymous” peer for this? That is just opening your PBX to anyone being able to send calls to it.

You don’t have a proper trunk to your providers.

Your provider is sending the g723. So you need to find out why they are doing that all of sudden.

1 Like

I am not sure they changed the codec, I have upgraded from version 2 to 14 of FreePBX (on a new system) and everything works apart from inbound calls (outbound is OK), so maybe my my old system had g723 enabled, I’m trying to compile it at the moment as I’m on a Pi, it’s a little bit tricky. I’ll go down this route. I have blocked IP access on the firewall to stop other people dialing in, however I take your point that it’s best to set the IPs/Hosts in the trunk settings.

I did check with the provider and they do state ulaw and alaw only. But if the logs show g723, then surely negotiation should say I can do ulaw/alaw and they should too?

Josh

IMO, getting g723 to work is not the best approach – it’s an ancient codec that sounds pretty bad, especially when there are other compression codecs in the path, e.g. with mobile phones.

I could not make sense of the value of SIPDOMAIN (not currently routable). The media server is Magrathea – if you are dealing with them directly or through a non-facilities-based reseller, see https://www.magrathea-telecom.co.uk/assets/Client-Downloads/Client-Handbook.pdf , which includes a list of the IP addresses from which they send calls. Just put them in the Match field for the trunk. Otherwise, get the appropriate list from your provider.

The codec list for the trunk should have only alaw and ulaw enabled, in that order. Likewise in General SIP Settings. For all the extensions in the Ring Group, Disallowed Codecs and Allowed Codecs should be blank, i.e. the codecs listed in General SIP Settings will be used.

Your extension 6005 appears to have g729, ulaw, alaw, g723 and g726 enabled (in the device). IMO all the devices in the group should enable only alaw and ulaw.

Some of the above settings don’t take effect until Asterisk is restarted. After saving and applying the config, do an fwconsole restart (or reboot the server), then test.

If no luck, it may be related to playing ringback tone in the early media. Temporarily route the DID to one extension to determine if the trouble is related to the ring group.

If you still have trouble, post another call trace that includes a SIP trace for both the trunk and extensions. To get that, at the Asterisk command prompt, type
pjsip set logger on
then call in for the test. The SIP will appear in the Asterisk log, mixed in with the dial plan trace. If it fails without the ring group, post the log for that, as it will be much shorter and easier to interpret.

1 Like

Hi Stewart,

Many thanks for taking the time for a detailed reply. It gave me a lot to work on and as you and Tom suggested that I should remove the anonymous calls.

I have used the following in pjsip.endpoint_custom.conf

[my_provider]
type=friend
host=sipgw.magrathea.net
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
fromdomain=sipgw.magrathea.net
context=incoming

This didn’t work, however as a work around, I noticed this section at the end of my pjsip.endpoint.conf

[anonymous]
type=endpoint
context=from-sip-external
allow=all

Which I manually changed to

[anonymous]
type=endpoint
context=from-sip-external
disallow=all
allow=alaw

And now anonymous calls use the correct codec! Hooray!

This file can’t be edited as it will be overridden, so I am working on a permanent solution and why anonymous is set to using the same codecs as the ones specified in the PJsip settings is strange, maybe a patch needs to be made to correct this?

Secondly, why the settings at the top don’t work is strange, these are also the setting that Magrathea sent me, so it’s not matching for some reason. I’m going to try and add a host entry for each and every IP they have as you suggested to see if that works, just means many many entries in the config file.

Josh

Finally got this working after 2 days of work :confused: thanks to Tom and Stuart for pointers into why this wasn’t working.

First problem is FreePBX seems to use pjsip by default but doesn’t enable the correct codecs in the anonymous endpoint.

Second thing, I couldn’t work out how to add IP match rules on the interface for my Trunk (magrathea), I’ve done this manually in the file pjsip_custom.conf The identifier matches the IP and then sends the matches to the incomingcall endpoint. The following might help someone else having issues with codecs or anonymous calls.

I was overzealous in the match rules just to make sure I could catch any IP. Maybe this can be narrowed down but not sure it was working for me so will leave it as it is.

[incomingcall]
type=endpoint
context=from-pstn
disallow=all
allow=alaw
allow=ulaw

[MAGRA]
type=identify
match=87.238.74.0/255.255.255.0
match=87.238.73.0/255.255.255.0
match=87.238.72.0/255.255.255.0
match=213.166.3.0/255.255.255.0
endpoint=incomingcall

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.