Outgoing call with sip account like sip from provider

  1. I have sip account that create by Grandstream UCM6302
    sip server from my office.

  2. My sip account can be registered on my iphone via 4G.

  3. I want to set up a FreePbx server at home and want to set up a sip account from my office. [Grandstream UCM6302]

  4. I register my sip account on trunk. [Connectivity >>> Add Trunk >>> Add sip Chan_Sip Trunk]

  5. I have registered my sip account on the trunk of FreePbx server. On outgoing PEER Details is below

Trunk Name : OutSIP
host=sip.xxx.xx.xx
context=from-trunk
qualify=yes
type=peer
insecure=port,invite
trustrpid=yes
transport=UDP
dtmf=auto
disallow=all
canreinvite=no
caninvite=no
allow=ulaw&alaw

Incoming USER Context : InSIP
host=sip.xxx.xx.xx
username=5959
[email protected]
insecure=no
type=friend
context=from-trunk

Register String : 5959:[email protected]@sip.xxx.xx.xx/5959

  1. I set the incoming call to ringing on my FreePbx extension 4545 and it works fine normally able to call from outside .

  2. I set outgoing calls to prefix 55 before dialing outside FreePbx server numbers. But it can’t make calls. There is a sound indicating that the circuit is busy.

And that’s the problem. that I can’t make outgoing calls to numbers outside of the Pbx server.I don’t know how to solve the problem. So have to try to post to find people to guide. or an example that can make a call in an outgoing call

logs ?

221 = extension from FreePbx
4428 = sip account regis number in FreePbx
4449 = Out side number

6243[2021-11-30 20:00:33] VERBOSE[2999][C-00000007] netsock2.c: Using SIP RTP TOS bits 184
6244[2021-11-30 20:00:33] VERBOSE[2999][C-00000007] netsock2.c: Using SIP RTP CoS mark 5
6245[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Macro(“SIP/221-00000003”, “user-callerid,LIMIT,EXTERNAL,”) in new stack
6246[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Set(“SIP/221-00000003”, “TOUCH_MONITOR=1638302433.3”) in new stack
6247[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Set(“SIP/221-00000003”, “CHANCONTEXT=”) in new stack
6248[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] Set(“SIP/221-00000003”, “CHANCONTEXT=”) in new stack
6249[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] Set(“SIP/221-00000003”, “CHANEXTENCONTEXT=221-00000003”) in new stack
6250[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] Set(“SIP/221-00000003”, “CHANEXTEN=221-00000003”) in new stack
6251[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “CALLERID(number)=221”) in new stack
6252[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Set(“SIP/221-00000003”, “AMPUSER=221”) in new stack
6253[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Set(“SIP/221-00000003”, “HOTDESCKCHAN=221-00000003”) in new stack
6254[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:9] Set(“SIP/221-00000003”, “HOTDESKEXTEN=221”) in new stack
6255[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:10] Set(“SIP/221-00000003”, “HOTDESKCALL=0”) in new stack
6256[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:11] ExecIf(“SIP/221-00000003”, “0?Set(HOTDESKCALL=1)”) in new stack
6257[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:12] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(name)=)”) in new stack
6258[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:13] GotoIf(“SIP/221-00000003”, “0?report”) in new stack
6259[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:14] ExecIf(“SIP/221-00000003”, “1?Set(REALCALLERIDNUM=221)”) in new stack
6260[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:15] Set(“SIP/221-00000003”, “AMPUSER=221”) in new stack
6261[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:16] GotoIf(“SIP/221-00000003”, “0?limit”) in new stack
6262[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:17] Set(“SIP/221-00000003”, “AMPUSERCIDNAME=221”) in new stack
6263[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:18] ExecIf(“SIP/221-00000003”, “0?Set(__CIDMASQUERADING=TRUE)”) in new stack
6264[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:19] GotoIf(“SIP/221-00000003”, “0?report”) in new stack
6265[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:20] Set(“SIP/221-00000003”, “AMPUSERCID=221”) in new stack
6266[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:21] Set(“SIP/221-00000003”, “__DIAL_OPTIONS=HhTtr”) in new stack
6267[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:22] Set(“SIP/221-00000003”, “CALLERID(all)=“221” <221>”) in new stack
6268[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:23] ExecIf(“SIP/221-00000003”, “0?Set(CUSDIAL=)”) in new stack
6269[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:24] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(all)=“221” <221>)”) in new stack
6270[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:25] GotoIf(“SIP/221-00000003”, “0?limit”) in new stack
6271[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:26] ExecIf(“SIP/221-00000003”, “1?Set(GROUP(concurrency_limit)=221)”) in new stack
6272[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:27] ExecIf(“SIP/221-00000003”, “0?Set(CHANNEL(language)=)”) in new stack
6273[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:28] NoOp(“SIP/221-00000003”, “Macro Depth is 1”) in new stack
6274[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:29] GotoIf(“SIP/221-00000003”, “1?report2:macroerror”) in new stack
6275[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-user-callerid,s,30)
6276[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:30] GotoIf(“SIP/221-00000003”, “1?continue”) in new stack
6277[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-user-callerid,s,49)
6278[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:49] Set(“SIP/221-00000003”, “CALLERID(number)=221”) in new stack
6279[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:50] Set(“SIP/221-00000003”, “CALLERID(name)=221”) in new stack
6280[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:51] GotoIf(“SIP/221-00000003”, “0?cnum”) in new stack
6281[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:52] Set(“SIP/221-00000003”, “CDR(cnam)=221”) in new stack
6282[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:53] Set(“SIP/221-00000003”, “CDR(cnum)=221”) in new stack
6283[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:54] Set(“SIP/221-00000003”, “CHANNEL(language)=en”) in new stack
6284[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Gosub(“SIP/221-00000003”, “sub-record-check,s,1(out,554449,dontcare)”) in new stack
6285[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/221-00000003”, “0?initialized”) in new stack
6286[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Set(“SIP/221-00000003”, “__REC_STATUS=INITIALIZED”) in new stack
6287[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] Set(“SIP/221-00000003”, “NOW=1638302433”) in new stack
6288[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] Set(“SIP/221-00000003”, “__DAY=30”) in new stack
6289[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] Set(“SIP/221-00000003”, “__MONTH=11”) in new stack
6290[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “__YEAR=2021”) in new stack
6291[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Set(“SIP/221-00000003”, “__TIMESTR=20211130-200033”) in new stack
6292[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Set(“SIP/221-00000003”, “__FROMEXTEN=221”) in new stack
6293[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:9] Set(“SIP/221-00000003”, “__MON_FMT=wav”) in new stack
6294[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:10] NoOp(“SIP/221-00000003”, “Recordings initialized”) in new stack
6295[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:11] ExecIf(“SIP/221-00000003”, “0?Set(ARG3=dontcare)”) in new stack
6296[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:12] Set(“SIP/221-00000003”, “REC_POLICY_MODE_SAVE=”) in new stack
6297[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:13] ExecIf(“SIP/221-00000003”, “0?Set(REC_STATUS=NO)”) in new stack
6298[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:14] GotoIf(“SIP/221-00000003”, “3?checkaction”) in new stack
6299[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (sub-record-check,s,17)
6300[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:17] GotoIf(“SIP/221-00000003”, “1?sub-record-check,out,1”) in new stack
6301[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (sub-record-check,out,1)
6302[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/221-00000003”, “Outbound Recording Check from 221 to 554449”) in new stack
6303[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Set(“SIP/221-00000003”, “RECMODE=dontcare”) in new stack
6304[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/221-00000003”, “1?Goto(routewins)”) in new stack
6305[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (sub-record-check,out,7)
6306[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Gosub(“SIP/221-00000003”, “recordcheck,1(dontcare,out,554449)”) in new stack
6307[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/221-00000003”, “Starting recording check against dontcare”) in new stack
6308[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Goto(“SIP/221-00000003”, “dontcare”) in new stack
6309[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
6310[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] Return(“SIP/221-00000003”, “”) in new stack
6311[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Return(“SIP/221-00000003”, “”) in new stack
6312[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/221-00000003”, “0 ?Set(CDR(accountcode)=)”) in new stack
6313[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] Set(“SIP/221-00000003”, “_ROUTEID=1”) in new stack
6314[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] Set(“SIP/221-00000003”, “_ROUTENAME=Out-4428”) in new stack
6315[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “MOHCLASS=default”) in new stack
6316[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Set(“SIP/221-00000003”, “_CALLERIDNAMEINTERNAL=221”) in new stack
6317[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Set(“SIP/221-00000003”, “_CALLERIDNUMINTERNAL=221”) in new stack
6318[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:9] Set(“SIP/221-00000003”, “_EMAILNOTIFICATION=FALSE”) in new stack
6319[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:10] Set(“SIP/221-00000003”, “_NODEST=”) in new stack
6320[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:11] Macro(“SIP/221-00000003”, “dialout-trunk,1,4449,off”) in new stack
6321[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Set(“SIP/221-00000003”, “DIAL_TRUNK=1”) in new stack
6322[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] ExecIf(“SIP/221-00000003”, “0?Set(DIAL_OPTIONS=Hhtr)”) in new stack
6323[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] GosubIf(“SIP/221-00000003”, “0?sub-pincheck,s,1()”) in new stack
6324[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(num)=221)”) in new stack
6325[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/221-00000003”, “0?disabletrunk,1”) in new stack
6326[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “DIAL_NUMBER=4449”) in new stack
6327[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Set(“SIP/221-00000003”, “DIAL_TRUNK_OPTIONS=HhTtr”) in new stack
6328[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Set(“SIP/221-00000003”, “OUTBOUND_GROUP=OUT_1”) in new stack
6329[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:9] Set(“SIP/221-00000003”, “DIAL_TRUNK_OPTIONS=T”) in new stack
6330[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:10] GotoIf(“SIP/221-00000003”, “0?nomax”) in new stack
6331[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:11] GotoIf(“SIP/221-00000003”, “0?chanfull”) in new stack
6332[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:12] GotoIf(“SIP/221-00000003”, “0?skipoutcid”) in new stack
6333[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:13] Macro(“SIP/221-00000003”, “outbound-callerid,1”) in new stack
6334[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/221-00000003”, “221”) in new stack
6335[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] NoOp(“SIP/221-00000003”, “”) in new stack
6336[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] NoOp(“SIP/221-00000003”, “off”) in new stack
6337[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(name-pres)=)”) in new stack
6338[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(num-pres)=)”) in new stack
6339[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “HOTDESCKCHAN=221-00000003”) in new stack
6340[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Set(“SIP/221-00000003”, “HOTDESKEXTEN=221”) in new stack
6341[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Set(“SIP/221-00000003”, “HOTDESKCALL=0”) in new stack
6342[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:9] ExecIf(“SIP/221-00000003”, “0?Set(HOTDESKCALL=1)”) in new stack
6343[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:10] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(name)=)”) in new stack
6344[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:11] Set(“SIP/221-00000003”, “ALLOWTHISROUTE=NO”) in new stack
6345[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:12] ExecIf(“SIP/221-00000003”, “0?Set(ALLOWTHISROUTE=YES)”) in new stack
6346[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:13] ExecIf(“SIP/221-00000003”, “0?Hangup()”) in new stack
6347[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:14] ExecIf(“SIP/221-00000003”, “0?Set(REALCALLERIDNUM=221)”) in new stack
6348[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:15] ExecIf(“SIP/221-00000003”, “0?Set(AMPUSER=221)”) in new stack
6349[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:16] GotoIf(“SIP/221-00000003”, “1?normcid”) in new stack
6350[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)
6351[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:20] Set(“SIP/221-00000003”, “USEROUTCID=221”) in new stack
6352[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:21] Set(“SIP/221-00000003”, “EMERGENCYCID=”) in new stack
6353[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:22] ExecIf(“SIP/221-00000003”, “0?Set(EMERGENCYCID=)”) in new stack
6354[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:23] Set(“SIP/221-00000003”, “TRUNKOUTCID=4428”) in new stack
6355[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:24] GotoIf(“SIP/221-00000003”, “1?trunkcid”) in new stack
6356[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-outbound-callerid,s,30)
6357[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:30] ExecIf(“SIP/221-00000003”, “1?Set(CALLERID(all)=4428)”) in new stack
6358[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:31] ExecIf(“SIP/221-00000003”, “1?Set(CALLERID(all)=221)”) in new stack
6359[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:32] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(all)=)”) in new stack
6360[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:33] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(all)=221)”) in new stack
6361[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:34] ExecIf(“SIP/221-00000003”, “0?Set(CALLERID(all)=221)”) in new stack
6362[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:35] Set(“SIP/221-00000003”, “TIOHIDE=no”) in new stack
6363[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:36] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
6364[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:37] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
6365[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:38] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(name-pres)=prohib_passed_screen)”) in new stack
6366[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:39] ExecIf(“SIP/221-00000003”, “0?Set(CALLERPRES(num-pres)=prohib_passed_screen)”) in new stack
6367[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:40] Set(“SIP/221-00000003”, “CDR(outbound_cnum)=221”) in new stack
6368[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:41] Set(“SIP/221-00000003”, “CDR(outbound_cnam)=”) in new stack
6369[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:14] GosubIf(“SIP/221-00000003”, “1?sub-flp-1,s,1()”) in new stack
6370[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] ExecIf(“SIP/221-00000003”, “1?Return()”) in new stack
6371[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:15] Set(“SIP/221-00000003”, “OUTNUM=4449”) in new stack
6372[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:16] Set(“SIP/221-00000003”, “custom=SIP/Out4428”) in new stack
6373[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:17] ExecIf(“SIP/221-00000003”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)T)”) in new stack
6374[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:18] ExecIf(“SIP/221-00000003”, “0?Set(DIAL_TRUNK_OPTIONS=TM(confirm))”) in new stack
6375[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:19] Macro(“SIP/221-00000003”, “dialout-trunk-predial-hook,”) in new stack
6376[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] MacroExit(“SIP/221-00000003”, “”) in new stack
6377[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:20] GotoIf(“SIP/221-00000003”, “0?skipcrm”) in new stack
6378[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:21] Set(“SIP/221-00000003”, “__CRM_DIRECTION=OUTBOUND”) in new stack
6379[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:22] Set(“SIP/221-00000003”, “__CRM_DESTINATION=4449”) in new stack
6380[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:23] Set(“SIP/221-00000003”, “__CRM_SOURCE=221”) in new stack
6381[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:24] AGI(“SIP/221-00000003”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
6382[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] res_agi.c: <SIP/221-00000003>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
6383[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:25] Set(“SIP/221-00000003”, “CHANNEL(hangup_handler_push)=crm-hangup,s,1”) in new stack
6384[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:26] NoOp(“SIP/221-00000003”, “CRM Finished”) in new stack
6385[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:27] GotoIf(“SIP/221-00000003”, “0?bypass,1”) in new stack
6386[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:28] ExecIf(“SIP/221-00000003”, “1?Set(CONNECTEDLINE(num,i)=4449)”) in new stack
6387[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:29] ExecIf(“SIP/221-00000003”, “1?Set(CONNECTEDLINE(name,i)=CID:221)”) in new stack
6388[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:30] ExecIf(“SIP/221-00000003”, “0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)221)”) in new stack
6389[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:31] GotoIf(“SIP/221-00000003”, “0?customtrunk”) in new stack
6390[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:32] ExecIf(“SIP/221-00000003”, “0?Set(DIAL_TRUNK_OPTIONS=)”) in new stack
6391[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:33] Set(“SIP/221-00000003”, “HASH(__SIPHEADERS,Alert-Info)=unset”) in new stack
6392[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:34] Dial(“SIP/221-00000003”, “SIP/Out4428/4449,300,Tb(func-apply-sipheaders^s^1,(1))U(sub-send-obroute-email^4449^554449^1^1638302433^^221)”) in new stack
6393[2021-11-30 20:00:33] WARNING[9571][C-00000007] app_dial.c: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)
6394[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] app_dial.c: No devices or endpoints to dial (technology/resource)
6395[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:35] NoOp(“SIP/221-00000003”, “Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE = 20”) in new stack
6396[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:36] GotoIf(“SIP/221-00000003”, “0?continue,1:s-CHANUNAVAIL,1”) in new stack
6397[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
6398[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Set(“SIP/221-00000003”, “RC=20”) in new stack
6399[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] Goto(“SIP/221-00000003”, “20,1”) in new stack
6400[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-dialout-trunk,20,1)
6401[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Goto(“SIP/221-00000003”, “continue,1”) in new stack
6402[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-dialout-trunk,continue,1)
6403[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/221-00000003”, “TRUNK Dial failed due to CHANUNAVAIL HANGUPCAUSE: 20 - failing through to other trunks”) in new stack
6404[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] ExecIf(“SIP/221-00000003”, “1?Set(CALLERID(number)=221)”) in new stack
6405[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:12] Macro(“SIP/221-00000003”, “outisbusy,”) in new stack
6406[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Progress(“SIP/221-00000003”, “”) in new stack
6407[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] GotoIf(“SIP/221-00000003”, “0?emergency,1”) in new stack
6408[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] GotoIf(“SIP/221-00000003”, “0?intracompany,1”) in new stack
6409[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] Playback(“SIP/221-00000003”, “all-circuits-busy-now&please-try-call-later, noanswer”) in new stack
6410[2021-11-30 20:00:33] VERBOSE[9571][C-00000007] file.c: <SIP/221-00000003> Playing ‘all-circuits-busy-now.ulaw’ (language ‘en’)
6411[2021-11-30 20:00:35] VERBOSE[9571][C-00000007] file.c: <SIP/221-00000003> Playing ‘please-try-call-later.ulaw’ (language ‘en’)
6412[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] Congestion(“SIP/221-00000003”, “20”) in new stack
6413[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] app_macro.c: Spawn extension (macro-outisbusy, s, 5) exited non-zero on ‘SIP/221-00000003’ in macro ‘outisbusy’
6414[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Spawn extension (from-internal, 554449, 12) exited non-zero on ‘SIP/221-00000003’
6415[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] Macro(“SIP/221-00000003”, “hangupcall”) in new stack
6416[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] GotoIf(“SIP/221-00000003”, “1?theend”) in new stack
6417[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-hangupcall,s,3)
6418[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/221-00000003”, “0?Set(CDR(recordingfile)=)”) in new stack
6419[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] NoOp(“SIP/221-00000003”, " montior file= ") in new stack
6420[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/221-00000003”, “1?skipagi”) in new stack
6421[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx_builtins.c: Goto (macro-hangupcall,s,7)
6422[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] Hangup(“SIP/221-00000003”, “”) in new stack
6423[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘SIP/221-00000003’ in macro ‘hangupcall’
6424[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/221-00000003’
6425[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] app_stack.c: SIP/221-00000003 Internal Gosub(crm-hangup,s,1) start
6426[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:1] NoOp(“SIP/221-00000003”, “Sending Hangup to CRM”) in new stack
6427[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:2] NoOp(“SIP/221-00000003”, “HANGUP CAUSE: 34”) in new stack
6428[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:3] ExecIf(“SIP/221-00000003”, “0?Set(__CRM_VOICEMAIL=)”) in new stack
6429[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:4] NoOp(“SIP/221-00000003”, “MASTER CHANNEL: 1638302433.3 = 1638302433.3”) in new stack
6430[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:5] GotoIf(“SIP/221-00000003”, “0?return”) in new stack
6431[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:6] Set(“SIP/221-00000003”, “__CRM_HANGUP=1”) in new stack
6432[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:7] AGI(“SIP/221-00000003”, “agi://127.0.0.1/sangomacrm.agi”) in new stack
6433[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] res_agi.c: <SIP/221-00000003>AGI Script agi://127.0.0.1/sangomacrm.agi completed, returning 0
6434[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] pbx.c: Executing [[email protected]:8] Return(“SIP/221-00000003”, “”) in new stack
6435[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] app_stack.c: Spawn extension (from-internal, h, 1) exited non-zero on ‘SIP/221-00000003’
6436[2021-11-30 20:00:37] VERBOSE[9571][C-00000007] app_stack.c: SIP/221-00000003 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

Good start, now please do the same using pastebin so it easier on all of us.

Could I suggest you start over with chan_pjsip, from first principles.

I can’t see why you need in and out sections, but insecure is useful in neither an out only section nor, for insecure=invite, in a section with no secret. defaultuser (your username) is not meaningful in an in only section, and probably should be fromuser. trustrpid is more for in sections, but if you have both it should really be the same in both. transport, dtmf, directmedia (your canreinvite) and [dis]allow should be the same in both. type=friend should be type=peer, except in special cases, and I don’t think any apply here - I can’t imagine the UCM6302 is ever going to address you as InSIP. caninvite is undefined.

It looks like you are mimicking a phone to the UCM, so it is unlikely to be prepared to authenticate to you, so if it really uses the in section, the insecure will probably break it. (It should only need the insecure=invite, not the insecure=port.

Again, rather than trying to fix this, start again with chan_pjsip, and try to understand what the options do.

https://pastebin.freepbx.org/view/31e1ea41

Well, line 151, but I would redo as per @david55 's suggestion, Sip ‘trunks’ are a conceit that tries to map PSTN ‘channels’ to a SIP inbound and an associated SIP outbound route. Rarely will your provider use the same server for both. Use separate routes for in and out, it just makes sense

ok
I had registered with pjsip.
Incoming call is ok but still have a problem with outbound route.

this is my log
https://pastebin.freepbx.org/view/37a2f7c1

At line 150 or so on both your logs neither chan_sip nor chan_pjsip can negotiate a connection

ok
I got it.
Now I can call outgoing.

Thanks

1 Like

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