[Problem] Extensions Outbound CID

Ok, habe gerade mal nachgeschaut und FreePBX bietet das tatsächlich (für Trunks) nicht in der GUI an. Dann bietet sich in der Tat die Variante von rentier-s an, nur ein wenig abgewandelt:

Code:
[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Asserted-Identity)="${CALLERID(num)}" <sip:${CALLERID(num)}@sipconnect.sipgate.de>)  
same => n,Return()

Voraussetzung ist, dass CALLERID(num) an der Stelle im E164-Format vorliegt, was aber bei Deiner Variante mit P-Orefered-Identity schon der Fall war.
 
Vielen vielen Dank für eure Hilfestellungen und mit der Zeit bin ich schon viel verständlicher geworden, was das Debuggen von Asteriks betrifft! Leider gibt es aber immer noch keine Lösung für mich.

Ich haba nun zwei Varianten ausprobiert, die von Rentier und die erste aus meinen Post.

Ich möchte euch gleich die Logfiles zeigen, aber was mir aufgefallen ist:

[macro-dialout-trunk-predial-hook]
Code:
# Diese Log wurde mit geschnitten:
# CallerID: 496***9
# Trunkoptions: system
#
# [macro-dialout-trunk-predial-hook]
# exten => s,1,Set(CLIP=${CALLERID(num)})
# exten => s,n,Set(CLIP=${IF($["${CLIP:0:2}"="00"]?${CLIP:2}:${CLIP})}) ; 00 abschneiden
# exten => s,n,Set(CLIP=${IF($["${CLIP:0:1}"="0"]?49${CLIP:1}:${CLIP})}) ; 0 durch 49 ersetzen
# exten => s,n,Set(CALLERID(name)=${CLIP})
# exten => s,n,Set(CALLERID(num)=${CLIP})
# exten => s,n,SipAddHeader(P-Preferred-Identity:<sip:${CLIP}@sipconnect.sipgate.de>)
# exten => s,n,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CLIP}@sipconnect.sipgate.de>)
#
#
    -- Executing [0034XXXXXX970@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1453541379.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034XXXXXX970@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034XXXXXX970,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1453541379") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=23") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160123-102939") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034XXXXXX970") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034XXXXXX970)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034XXXXXX970@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034XXXXXX970@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034XXXXXX970@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034XXXXXX970@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034XXXXXX970,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034XXXXXX970") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID=4961XXXXXX829") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)=4961XXXXXX829)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=4961XXXXXX829") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=") in new stack
[2016-01-23 10:29:39] WARNING[10458]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034XXXXXX970") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/29-00000000", "CLIP=4961XXXXXX829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:2] Set("PJSIP/29-00000000", "CLIP=4961XXXXXX829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:3] Set("PJSIP/29-00000000", "CLIP=4961XXXXXX829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:4] Set("PJSIP/29-00000000", "CALLERID(name)=4961XXXXXX829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:5] Set("PJSIP/29-00000000", "CALLERID(num)=4961XXXXXX829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:6] SIPAddHeader("[B]PJSIP/29-00000000[/B]", "P-Preferred-Identity:<sip:[email protected]>") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:7] Set("[B]PJSIP/29-00000000[/B]", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:[email protected]>") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034XXXXXX970)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:4961XXXXXX829)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4961XXXXXX829)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034XXXXXX970@2113905t0,300,Tt") in new stack
    -- Called PJSIP/0034XXXXXX970@2113905t0
    -- PJSIP/2113905t0-00000001 is making progress passing it to PJSIP/29-00000000
       > 0x762113f0 -- Probation passed - setting RTP source address to 217.10.77.240:20192
       > 0x76309ad8 -- Probation passed - setting RTP source address to 192.168.50.170:55420
    -- PJSIP/2113905t0-00000001 is ringing
    -- PJSIP/2113905t0-00000001 answered PJSIP/29-00000000
    -- Channel PJSIP/2113905t0-00000001 joined 'simple_bridge' basic-bridge <ba33dbfc-a763-4672-bd18-b7928640ec56>
    -- Channel PJSIP/29-00000000 joined 'simple_bridge' basic-bridge <ba33dbfc-a763-4672-bd18-b7928640ec56>
    -- Channel PJSIP/29-00000000 left 'simple_bridge' basic-bridge <ba33dbfc-a763-4672-bd18-b7928640ec56>
    -- Channel PJSIP/2113905t0-00000001 left 'simple_bridge' basic-bridge <ba33dbfc-a763-4672-bd18-b7928640ec56>
  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034XXXXXX970, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'

Bemerkung: Set PJSIP Header wird in Macro-doul-out-hook gesetzt. Dabei wird die P-Preffered aber nur der Extensions zu gewiesen. Siehe zum Vergleich bei Dial-Out Trunk p-Headder!

Executing [s@macro-dialout-trunk-predial-hook:7] Set("PJSIP/29-00000000", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:[email protected]>") in new stack



Code:
# Diese Log wurde mit geschnitten:
# CallerID: 4961XXXXXX829
# Trunkoptions: b(p-header,sipgate,1)
#
# [p-header]
# exten => sipgate,1,Set(PJSIP_HEADER(add,P-Asserted-Identity)="${CALLERID(num)}" <sip:${CALLERID(num)}@sipconnect.sipgate.de>)
# same => n,Return()
#
    -- Executing [0034XXXXXX970@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1453539764.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034XXXXXX970@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034XXXXXX970,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1453539764") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=23") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160123-100244") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034XXXXXX970") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034XXXXXX970)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034XXXXXX970@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034XXXXXX970@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034XXXXXX970@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034XXXXXX970@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034XXXXXX970,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034XXXXXX970") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID=4961XXXXXX829") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)=4961XXXXXX829)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=4961XXXXXX829") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=") in new stack
[2016-01-23 10:02:44] WARNING[8405]: func_cdr.c:352 cdr_write_callback: CDR requires a value (CDR(variable)=value)
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034XXXXXX970") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)b(p-header,sipgate,1))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034XXXXXX970)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:4961XXXXXX829)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4961XXXXXX829)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034XXXXXX970@2113905t0,300,b(p-header,sipgate,1)") in new stack
    -- [B]PJSIP/2113905t0-00000001 Internal Gosub(p-header,sipgate,1) start
    -- Executing [sipgate@p-header:1] Set("PJSIP/2113905t0-00000001", "PJSIP_HEADER(add,P-Asserted-Identity)="0034XXXXXX970" <sip:[email protected]>") in new stack
    -- Executing [sipgate@p-header:2] Return("PJSIP/2113905t0-00000001", "") in new stack[/B]
  == Spawn extension (from-pstn, 0034XXXXXX970, 1) exited non-zero on 'PJSIP/2113905t0-00000001'
    -- PJSIP/2113905t0-00000001 Internal Gosub(p-header,sipgate,1) complete GOSUB_RETVAL=
    -- Called PJSIP/0034XXXXXX970@2113905t0
    -- PJSIP/2113905t0-00000001 is making progress passing it to PJSIP/29-00000000
       > 0x7620efd8 -- Probation passed - setting RTP source address to 217.10.77.244:17968
       > 0x764109d0 -- Probation passed - setting RTP source address to 192.168.50.170:52994
  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034XXXXXX970, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
PBX001*CLI>

Bemerkung: Set PJSIP Header wird nach Macro-doul-out-hook gesetzt. Dabei ist allerdings die Zielrufnummer gesetzt!

Executing [sipgate@p-header:1] Set("PJSIP/2113905t0-00000001", "PJSIP_HEADER(add,P-Asserted-Identity)="0034XXXXXX970" <sip:[email protected]>") in new stack



Leider weiss ich nun nicht mehr weiter. Logfile eins sieht mir nach wie vor funktionshaft aus. Aber leider sagt Sipgate, dass die p-preffered-id absolut nicht bei denen ankommt.

Logfile zwei könnte vielleicht funktionieren, aber ich denke mal, dass Sipgate sich nicht die Call-ID einer spanischen Rufnummer setzen lässt. Abgesehen davon dass die call-id ja nicht die ziel id sein soll :(

Für weitere Lösungen bin ich offen :)
 
Zuletzt bearbeitet:
Hallo Leidensgenosse,

gleiches Problem, ähnliche Umgebung:

Asterisk Version:13.5.0
Freepbx Version: 13.0.54
Anzahl der Extension: 100 (davon aktuell 15 in Betrieb)
Anzahl der Routes: 15 inbound, 1 outbound
Sip-Provider: sipgate trunk

Code:
-- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/200-0000002a", "1?Set(CONNECTEDLINE(num,i)=017516xxxx4)") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/200-0000002a", "1?Set(CONNECTEDLINE(name,i)=CID:4922897xxx10)") in new stack
-- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/200-0000002a", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4922897xxx10)") in new stack
-- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/200-0000002a", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/200-0000002a", "SIP/sipgate/017516xxxx4,300,Tt") in new stack

Auch wenn ich zugegebenermaßen den Thread nur überflogen habe - denn warum soll ich mich mit Lösungsvorschlägen welche nicht zum Ziel führen beschäftigen - kann ich nur sagen, dass ich nach unzählichen Fehlversuchen und Sackgassen keinen Rat mehr weiß.
Be mir ist die Situation natürlich nicht ganz identisch. Anstatt die komplette Extension mit der default Rufnummer zu ersetzen, fliegt bei mir halt nur die Durchwahl raus und wird durch die "0" ersetzt.
Die Ursache und somit eine mögliche Lösung dürfte aber die Selbe sein.

Jede Idee ist willkommen - mir fällt nichts mehr ein!:confused:
 
Könnt Ihr beide mal das Debugging einschalten, bei PJSIP geht das soweit ich weiß mit 'pjsip set logger on'. Dann könnte man zumindest sehen, ob der P-Header im INVITE überhaupt vorhanden ist.
 
here we go...

pjsip set logger on
wurde mit:
PJSIP Logging enabled
quittiert

Das Log eines ausgehenden Anrufes an ein Mobiltelefon

Code:
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:1] Macro("PJSIP/200-00000032", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:1] Set("PJSIP/200-00000032", "TOUCH_MONITOR=1454147710.91") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:2] Set("PJSIP/200-00000032", "AMPUSER=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:3] GotoIf("PJSIP/200-00000032", "0?report") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:4] ExecIf("PJSIP/200-00000032", "1?Set(REALCALLERIDNUM=200)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:5] Set("PJSIP/200-00000032", "AMPUSER=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:6] GotoIf("PJSIP/200-00000032", "0?limit") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:7] Set("PJSIP/200-00000032", "AMPUSERCIDNAME=Robert (Snom 360)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:8] GotoIf("PJSIP/200-00000032", "0?report") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:9] Set("PJSIP/200-00000032", "AMPUSERCID=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:10] Set("PJSIP/200-00000032", "__DIAL_OPTIONS=Ttr") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:11] Set("PJSIP/200-00000032", "CALLERID(all)="Robert (Snom 360)" <200>") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:12] GotoIf("PJSIP/200-00000032", "0?limit") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:13] ExecIf("PJSIP/200-00000032", "1?Set(GROUP(concurrency_limit)=200)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:14] ExecIf("PJSIP/200-00000032", "0?Set(CHANNEL(language)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:15] GotoIf("PJSIP/200-00000032", "1?continue") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (macro-user-callerid,s,29)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:29] Set("PJSIP/200-00000032", "CALLERID(number)=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:30] Set("PJSIP/200-00000032", "CALLERID(name)=Robert (Snom 360)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:31] Set("PJSIP/200-00000032", "CDR(cnum)=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:32] Set("PJSIP/200-00000032", "CDR(cnam)=Robert (Snom 360)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-user-callerid:33] Set("PJSIP/200-00000032", "CHANNEL(language)=en") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:2] Gosub("PJSIP/200-00000032", "sub-record-check,s,1(out,0017516xxxx4,force)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/200-00000032", "0?initialized") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/200-00000032", "__REC_STATUS=INITIALIZED") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/200-00000032", "NOW=1454147710") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/200-00000032", "__DAY=30") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/200-00000032", "__MONTH=01") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/200-00000032", "__YEAR=2016") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/200-00000032", "__TIMESTR=20160130-105510") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/200-00000032", "__FROMEXTEN=200") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/200-00000032", "__MON_FMT=wav") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/200-00000032", "Recordings initialized") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/200-00000032", "0?Set(ARG3=dontcare)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/200-00000032", "REC_POLICY_MODE_SAVE=") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/200-00000032", "0?Set(REC_STATUS=NO)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/200-00000032", "3?checkaction") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (sub-record-check,s,17)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/200-00000032", "1?sub-record-check,out,1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (sub-record-check,out,1)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [out@sub-record-check:1] NoOp("PJSIP/200-00000032", "Outbound Recording Check from 200 to 0017516xxxx4") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [out@sub-record-check:2] Set("PJSIP/200-00000032", "RECMODE=dontcare") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [out@sub-record-check:3] ExecIf("PJSIP/200-00000032", "1?Goto(routewins)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (sub-record-check,out,7)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [out@sub-record-check:7] Gosub("PJSIP/200-00000032", "recordcheck,1(force,out,0017516xxxx4)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/200-00000032", "Starting recording check against force") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/200-00000032", "force") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (sub-record-check,recordcheck,5)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:5] Set("PJSIP/200-00000032", "__REC_POLICY_MODE=FORCE") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:6] GotoIf("PJSIP/200-00000032", "1?startrec") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (sub-record-check,recordcheck,16)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:16] NoOp("PJSIP/200-00000032", "Starting recording: out, 0017516xxxx4") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:17] Set("PJSIP/200-00000032", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:18] Set("PJSIP/200-00000032", "__CALLFILENAME=out-0017516xxxx4-200-20160130-105510-1454147710.91") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:19] MixMonitor("PJSIP/200-00000032", "2016/01/30/out-0017516xxxx4-200-20160130-105510-1454147710.91.wav,ai(LOCAL_MIXMON_ID),") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:20] Set("PJSIP/200-00000032", "__MIXMON_ID=0x7f80a00fe290") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:21] Set("PJSIP/200-00000032", "__RECORD_ID=PJSIP/200-00000032") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:22] Set("PJSIP/200-00000032", "__REC_STATUS=RECORDING") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:23] Set("PJSIP/200-00000032", "CDR(recordingfile)=out-0017516xxxx4-200-20160130-105510-1454147710.91.wav") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [recordcheck@sub-record-check:24] Return("PJSIP/200-00000032", "") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/200-00000032", "") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:3] ExecIf("PJSIP/200-00000032", "0 ?Set(CDR(accountcode)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:4] Set("PJSIP/200-00000032", "MOHCLASS=default") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:5] Set("PJSIP/200-00000032", "_NODEST=") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [0017516xxxx4@from-internal:6] Macro("PJSIP/200-00000032", "dialout-trunk,1,017516xxxx4,,off") in new stack
[2016-01-30 10:55:10] VERBOSE[21095][C-00000029] app_mixmonitor.c: Begin MixMonitor Recording PJSIP/200-00000032
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-00000032", "DIAL_TRUNK=1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/200-00000032", "0?sub-pincheck,s,1()") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/200-00000032", "0?disabletrunk,1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:4] Set("PJSIP/200-00000032", "DIAL_NUMBER=017516xxxx4") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:5] Set("PJSIP/200-00000032", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-00000032", "OUTBOUND_GROUP=OUT_1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/200-00000032", "0?nomax") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:8] GotoIf("PJSIP/200-00000032", "0?chanfull") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/200-00000032", "0?skipoutcid") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/200-00000032", "DIAL_TRUNK_OPTIONS=Tt") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:11] Macro("PJSIP/200-00000032", "outbound-callerid,1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/200-00000032", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/200-00000032", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/200-00000032", "0?Set(REALCALLERIDNUM=200)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/200-00000032", "1?normcid") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (macro-outbound-callerid,s,7)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:7] Set("PJSIP/200-00000032", "USEROUTCID=Robert Schuster <4922897xxx10>") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:8] Set("PJSIP/200-00000032", "EMERGENCYCID=") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:9] Set("PJSIP/200-00000032", "TRUNKOUTCID=") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/200-00000032", "1?trunkcid") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Goto (macro-outbound-callerid,s,15)
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/200-00000032", "0?Set(CALLERID(all)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/200-00000032", "1?Set(CALLERID(all)=Robert Schuster <4922897xxx10>)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/200-00000032", "0?Set(CALLERID(all)=)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/200-00000032", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/200-00000032", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:20] Set("PJSIP/200-00000032", "CDR(outbound_cnum)=4922897xxx10") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-outbound-callerid:21] Set("PJSIP/200-00000032", "CDR(outbound_cnam)=Robert Schuster") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/200-00000032", "0?sub-flp-1,s,1()") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:13] Set("PJSIP/200-00000032", "OUTNUM=017516xxxx4") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:14] Set("PJSIP/200-00000032", "custom=SIP/sipgate") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/200-00000032", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/200-00000032", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:17] Macro("PJSIP/200-00000032", "dialout-trunk-predial-hook,") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/200-00000032", "") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/200-00000032", "0?bypass,1") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/200-00000032", "1?Set(CONNECTEDLINE(num,i)=017516xxxx4)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/200-00000032", "1?Set(CONNECTEDLINE(name,i)=CID:4922897xxx10)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/200-00000032", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4922897xxx10)") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/200-00000032", "0?customtrunk") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] pbx.c: Executing [s@macro-dialout-trunk:23] Dial("PJSIP/200-00000032", "SIP/sipgate/017516xxxx4,300,Tt") in new stack
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] netsock2.c: Using SIP RTP TOS bits 184
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] netsock2.c: Using SIP RTP CoS mark 5
[2016-01-30 10:55:10] VERBOSE[21094][C-00000029] app_dial.c: Called SIP/sipgate/017516xxxx4
[2016-01-30 10:55:16] VERBOSE[21094][C-00000029] app_dial.c: SIP/sipgate-00000029 is ringing
 
Ok, ich habe jetzt mehrere Varianten durch getestest und die Logs gespeichert. Eins Vorweg: Funktioniert hat letztendlich nur Variante 6 mit manuellem setzen, als Test-Zweck. Es ist also immer noch keine Lösung gefunden worden.

Folgende Varianten habe ich getestet:

1. Variante: Dial-Out-Predial-Hook: Setzen der CallerID(num) mit $(CLIP)
2. Variante: Dial-Out-Predial-Hook: Setzen der CallerID(num) mit Klartext Nummer
3. Variante: Dial-Options: p-header: Nutzen der CallerID(num) aus extensions
4. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit $(CLIP) aus macro "..Predial-Hook"
5. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit $(CLIP)

6. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit einer Klartext-Nummer Erfolgreich

Code:
# 1.Variante: Dial-Out-Predial-Hook: Setzen der CallerID(num) mit $(CLIP)
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: system
# /etc/asterisk/extensions_custom.conf:

[macro-dialout-trunk-predial-hook]
exten => s,1,Set(CLIP=${CALLERID(num)})
exten => s,n,Set(CLIP=${IF($["${CLIP:0:2}"="00"]?${CLIP:2}:${CLIP})}) ; 00 abschneiden
exten => s,n,Set(CLIP=${IF($["${CLIP:0:1}"="0"]?49${CLIP:1}:${CLIP})}) ; 0 durch 49 ersetzen
exten => s,n,Set(CALLERID(name)=${CLIP})
exten => s,n,Set(CALLERID(num)=${CLIP})
exten => s,n,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CLIP}@sipconnect.sipgate.de>)

# Log

<--- Transmitting SIP request (461 bytes) to UDP:217.10.68.150:5060 --->
OPTIONS sip:21***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj0eea0656-49c4-473d-ac26-0c836c2b2faa
From: <sip:[email protected]>;tag=bc8cbd42-4f62-464f-abd0-f644ba2c74da
To: <sip:21***[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: d0d194d2-1bfb-4bdb-a642-4bc1e60597ca
CSeq: 32234 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (392 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 151.182.55.227:5060;rport=64893;branch=z9hG4bKPj0eea0656-49c4-473d-ac26-0c836c2b2faa;received=79.145.192.13
From: <sip:[email protected]>;tag=bc8cbd42-4f62-464f-abd0-f644ba2c74da
To: <sip:21***[email protected]>;tag=912805fe4f8193ac6ebdbdd6077ba2ce.539a
Call-ID: d0d194d2-1bfb-4bdb-a642-4bc1e60597ca
CSeq: 32234 OPTIONS
Content-Length: 0


 Contact 21***t0/sip:21***[email protected]:5060 is now Reachable.  RTT: 66.405 msec
<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---46b7dc6104666330;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=41a20b2a
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098644870148317 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 50614 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---46b7dc6104666330
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
From: "29" <sip:[email protected]>;tag=41a20b2a
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---46b7dc6104666330
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454171265/4b45bae40fc3f7ac14f60a13ba344b5e",opaque="300a50c202440a23",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---46b7dc6104666330;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---46b7dc6104666330
From: "29"<sip:[email protected]>;tag=41a20b2a
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---f27df5274e994837;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=41a20b2a
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454171265/4b45bae40fc3f7ac14f60a13ba344b5e",uri="sip:0034722***[email protected]",response="032bdefd4156b8408a196aa1ee9ce20a",cnonce="e4c65b9e16fac84814ad4e4b246937ab",nc=00000001,qop=auth,algorithm=md5,opaque="300a50c202440a23"
Content-Length: 336

v=0
o=- 13098644870148317 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 50614 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---f27df5274e994837
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
From: "29" <sip:[email protected]>;tag=41a20b2a
To: <sip:0034722***[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034722***70@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1454171265.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034722***70@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034722***70,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1454171265") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160130-172745") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034722***70") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034722***70)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034722***70@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034722***70@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034722***70@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034722***70@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034722***70,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID="Chris" <496***29>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)="Chris" <496***29>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=496***29") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/29-00000000", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:2] Set("PJSIP/29-00000000", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:3] Set("PJSIP/29-00000000", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:4] Set("PJSIP/29-00000000", "CALLERID(name)=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:5] Set("PJSIP/29-00000000", "CALLERID(num)=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:6] Set("PJSIP/29-00000000", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034722***70)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034722***70@21***t0,300,Tt") in new stack
    -- Called PJSIP/0034722***70@21***t0
<--- Transmitting SIP request (1021 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjaa9fe8b1-8db4-44f0-813c-71f6d6fe6e68
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11195 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   315

v=0
o=- 366105734 366105734 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 26226 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (532 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjaa9fe8b1-8db4-44f0-813c-71f6d6fe6e68
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f7be
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11195 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="Vqzlrlas5IK8KmkH5xAUxjtCyYBMspJh"
Content-Length: 0


<--- Transmitting SIP request (468 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjaa9fe8b1-8db4-44f0-813c-71f6d6fe6e68
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f7be
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11195 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1241 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="21***t0", realm="sipconnect.sipgate.de", nonce="Vqzlrlas5IK8KmkH5xAUxjtCyYBMspJh", uri="sip:0034722***[email protected]:5060", response="9c5823d17cabac7175710f5dac156a5b"
Content-Type: application/sdp
Content-Length:   315

v=0
o=- 366105734 366105734 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 26226 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (399 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 INVITE
Content-Length: 0


<--- Received SIP response (1043 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=c3054e45-e296-4647-9892-09e5fa3a712e>
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=as3ce7fd87
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:270034722***[email protected]:5060>
Content-Type: application/sdp
Content-Length: 348

v=0
o=root 716103775 716103775 IN IP4 217.10.77.57
s=sipgate VoIP GW
c=IN IP4 212.9.44.245
t=0 0
m=audio 17598 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:17599

    -- PJSIP/21***t0-00000001 is making progress passing it to PJSIP/29-00000000
<--- Transmitting SIP response (907 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---f27df5274e994837
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
From: "29" <sip:[email protected]>;tag=41a20b2a
To: <sip:0034722***[email protected]>;tag=31a5fc6e-88de-40a8-9ff1-dfdc4fd6246a
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Type: application/sdp
Content-Length:   252

v=0
o=- 3934662877 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 22652 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x76511d50 -- Probation passed - setting RTP source address to 212.9.44.245:17598
       > 0xe15880 -- Probation passed - setting RTP source address to 192.168.50.170:50614
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---f27df5274e994837;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=41a20b2a
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454171265/4b45bae40fc3f7ac14f60a13ba344b5e",uri="sip:0034722***[email protected]",response="2817e77b3186ed6a54a37205fc43bd55",cnonce="51693a1af4e0b13201585fbc9ea95205",nc=00000002,qop=auth,algorithm=md5,opaque="300a50c202440a23"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---f27df5274e994837
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
From: "29" <sip:[email protected]>;tag=41a20b2a
To: <sip:0034722***[email protected]>;tag=31a5fc6e-88de-40a8-9ff1-dfdc4fd6246a
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---f27df5274e994837
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
From: "29" <sip:[email protected]>;tag=41a20b2a
To: <sip:0034722***[email protected]>;tag=31a5fc6e-88de-40a8-9ff1-dfdc4fd6246a
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Length:  0


<--- Transmitting SIP request (455 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034722***70, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---f27df5274e994837;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=31a5fc6e-88de-40a8-9ff1-dfdc4fd6246a
From: "29"<sip:[email protected]>;tag=41a20b2a
Call-ID: 79048OGU1NjVmOTgxNTlmNTVhYzFiYTAwMjNmZTk2YzhmZDQ
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (412 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-9079
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 CANCEL
Content-Length: 0


<--- Received SIP response (498 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=as3ce7fd87
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (441 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjf9568d3f-afba-4b65-bfbf-09ff1a034e5d
From: <sip:21***[email protected]>;tag=c3054e45-e296-4647-9892-09e5fa3a712e
To: <sip:0034722***[email protected]>;tag=as3ce7fd87
Call-ID: aca685b2-a08b-4466-b1f0-ca60441bae1b
CSeq: 11196 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0

Code:
# 2.Variante: Dial-Out-Predial-Hook: Setzen der CallerID(num) mit Klartext Nummer
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: system
# /etc/asterisk/extensions_custom.conf:

[macro-dialout-trunk-predial-hook]
exten => s,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>)

# Log
<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---5887ea03557d960d;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=5a570361
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098645155732202 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 50180 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---5887ea03557d960d
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
From: "29" <sip:[email protected]>;tag=5a570361
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---5887ea03557d960d
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454171551/209bb8c5c9891648c5a55febf1501460",opaque="1c1139330db8006e",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---5887ea03557d960d;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---5887ea03557d960d
From: "29"<sip:[email protected]>;tag=5a570361
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---ba0270737036f929;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=5a570361
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454171551/209bb8c5c9891648c5a55febf1501460",uri="sip:0034722***[email protected]",response="2029312bd4eccc3767e4482f4d670fd7",cnonce="1c0e5b8809ec5dc5caef0da1a076fd47",nc=00000001,qop=auth,algorithm=md5,opaque="1c1139330db8006e"
Content-Length: 336

v=0
o=- 13098645155732202 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 50180 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---ba0270737036f929
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
From: "29" <sip:[email protected]>;tag=5a570361
To: <sip:0034722***[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034722***70@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1454171551.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034722***70@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034722***70,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1454171551") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160130-173231") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034722***70") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034722***70)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034722***70@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034722***70@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034722***70@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034722***70@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034722***70,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Tt") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID="Chris" <496***29>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)="Chris" <496***29>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=496***29") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/29-00000000", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034722***70)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034722***70@21***t0,300,Tt") in new stack
    -- Called PJSIP/0034722***70@21***t0
<--- Transmitting SIP request (1022 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj2f818555-1c4a-49bd-a016-c4d2ed7d88ab
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5926 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1837464733 1837464733 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 19616 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (531 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj2f818555-1c4a-49bd-a016-c4d2ed7d88ab
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.ee97
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5926 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="Vqzmy1as5Z/tE1xreJcaOHmhimZy5noy"
Content-Length: 0


<--- Transmitting SIP request (467 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj2f818555-1c4a-49bd-a016-c4d2ed7d88ab
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.ee97
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5926 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1242 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="21***t0", realm="sipconnect.sipgate.de", nonce="Vqzmy1as5Z/tE1xreJcaOHmhimZy5noy", uri="sip:0034722***[email protected]:5060", response="219b2cac2063636676bcedd698c28ddb"
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1837464733 1837464733 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 19616 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (398 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 INVITE
Content-Length: 0


<--- Received SIP response (1042 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9>
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=as21cb111d
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:270034722***[email protected]:5060>
Content-Type: application/sdp
Content-Length: 348

v=0
o=root 715872922 715872922 IN IP4 217.10.77.63
s=sipgate VoIP GW
c=IN IP4 212.9.44.249
t=0 0
m=audio 25794 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:25795

    -- PJSIP/21***t0-00000001 is making progress passing it to PJSIP/29-00000000
<--- Transmitting SIP response (907 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---ba0270737036f929
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
From: "29" <sip:[email protected]>;tag=5a570361
To: <sip:0034722***[email protected]>;tag=0c8ba43f-b1b7-411a-b5c2-984a55ab7d55
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Type: application/sdp
Content-Length:   252

v=0
o=- 4220246762 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 17206 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x7630d3b0 -- Probation passed - setting RTP source address to 212.9.44.249:25794
       > 0x765097e8 -- Probation passed - setting RTP source address to 192.168.50.170:50180
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---ba0270737036f929;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=5a570361
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454171551/209bb8c5c9891648c5a55febf1501460",uri="sip:0034722***[email protected]",response="1914662193db11b71ad92f3e7afe587a",cnonce="7f81e8ca688ac6a5a1bedbf063148a6b",nc=00000002,qop=auth,algorithm=md5,opaque="1c1139330db8006e"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---ba0270737036f929
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
From: "29" <sip:[email protected]>;tag=5a570361
To: <sip:0034722***[email protected]>;tag=0c8ba43f-b1b7-411a-b5c2-984a55ab7d55
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---ba0270737036f929
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
From: "29" <sip:[email protected]>;tag=5a570361
To: <sip:0034722***[email protected]>;tag=0c8ba43f-b1b7-411a-b5c2-984a55ab7d55
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
<--- Transmitting SIP request (454 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


  == Spawn extension (from-internal, 0034722***70, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---ba0270737036f929;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=0c8ba43f-b1b7-411a-b5c2-984a55ab7d55
From: "29"<sip:[email protected]>;tag=5a570361
Call-ID: 79048ZTc0YWI0ZGY0ZGNmZjU1OTU2MjA1NjdmNGUxOTVlNzE
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (411 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-e3a3
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 CANCEL
Content-Length: 0


<--- Received SIP response (497 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=as21cb111d
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (440 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPjfd1653e8-53b8-488a-b359-cde68c90f6ad
From: <sip:21***[email protected]>;tag=9523a0f2-27a6-4ca9-b409-7e2f914a24b9
To: <sip:0034722***[email protected]>;tag=as21cb111d
Call-ID: 4285121e-37e4-4e79-959e-f94f9192150f
CSeq: 5927 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (484 bytes) to UDP:192.168.50.170:58941 --->
OPTIONS sip:[email protected]:58941;rinstance=2fb9708b848f21e8 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.4:5060;rport;branch=z9hG4bKPj1523b032-5858-4f0f-ae81-0ad5745a74bb
From: <sip:[email protected]>;tag=8cd7eccb-6f31-4322-afc1-1324f20dfb49
To: <sip:[email protected];rinstance=2fb9708b848f21e8>
Contact: <sip:[email protected]:5060>
Call-ID: ce85c0bc-ab90-4d9a-bd23-da8b6b9e45a0
CSeq: 40057 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (609 bytes) from UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.4:5060;rport=5060;branch=z9hG4bKPj1523b032-5858-4f0f-ae81-0ad5745a74bb
Contact: <sip:192.168.50.170:58941>
To: <sip:[email protected];rinstance=2fb9708b848f21e8>;tag=9b875f4d
From: <sip:[email protected]>;tag=8cd7eccb-6f31-4322-afc1-1324f20dfb49
Call-ID: ce85c0bc-ab90-4d9a-bd23-da8b6b9e45a0
CSeq: 40057 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Allow-Events: talk, hold
Content-Length: 0


<--- Transmitting SIP request (461 bytes) to UDP:217.10.68.150:5060 --->
OPTIONS sip:21***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj0f619358-218f-4dbe-81b9-7c460e7ae09a
From: <sip:[email protected]>;tag=947c3b86-d741-4db5-9356-cf1496983240
To: <sip:21***[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: eb0f4663-de7c-4b45-9089-6368e31545ae
CSeq: 61586 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (392 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 151.182.55.227:5060;rport=64893;branch=z9hG4bKPj0f619358-218f-4dbe-81b9-7c460e7ae09a;received=79.145.192.13
From: <sip:[email protected]>;tag=947c3b86-d741-4db5-9356-cf1496983240
To: <sip:21***[email protected]>;tag=912805fe4f8193ac6ebdbdd6077ba2ce.493d
Call-ID: eb0f4663-de7c-4b45-9089-6368e31545ae
CSeq: 61586 OPTIONS
Content-Length: 0

Code:
# 3. Variante: Dial-Options: p-header: Nutzen der CallerID(num) aus extensions
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: b(p-header,sipgate,1)
# /etc/asterisk/extensions_custom.conf:

[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CALLERID(num)}@sipconnect.sipgate.de>)
same => n,Return()

#Log

<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---bb155030cbabce4a;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034***[email protected]>
From: "29"<sip:[email protected]>;tag=0a749a3a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098642800150156 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 56382 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---bb155030cbabce4a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
From: "29" <sip:[email protected]>;tag=0a749a3a
To: <sip:0034***[email protected]>;tag=z9hG4bK-524287-1---bb155030cbabce4a
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454169195/a709b914f260f6eee891f0fd200caa22",opaque="1706762c7e917264",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---bb155030cbabce4a;rport
Max-Forwards: 70
To: <sip:0034***[email protected]>;tag=z9hG4bK-524287-1---bb155030cbabce4a
From: "29"<sip:[email protected]>;tag=0a749a3a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---9e361e31f4f3a86d;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034***[email protected]>
From: "29"<sip:[email protected]>;tag=0a749a3a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454169195/a709b914f260f6eee891f0fd200caa22",uri="sip:0034***[email protected]",response="e3b00066c0af5c3e7cabac7c2bddd05b",cnonce="839ec333051be064c3922aac317ab275",nc=00000001,qop=auth,algorithm=md5,opaque="1706762c7e917264"
Content-Length: 336

v=0
o=- 13098642800150156 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 56382 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---9e361e31f4f3a86d
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
From: "29" <sip:[email protected]>;tag=0a749a3a
To: <sip:0034***[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034***70@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1454169195.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034***70@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034***70,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1454169195") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160130-165315") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034***70") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034***70)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034***70@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034***70@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034***70@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034***70@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034***70,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034***70") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID="Chris" <496***29>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)="Chris" <496***29>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=496***29") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034***70") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)b(p-header,sipgate,1))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034***70)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034***70@2***t0,300,b(p-header,sipgate,1)") in new stack
    -- PJSIP/2***t0-00000001 Internal Gosub(p-header,sipgate,1) start
    -- Executing [sipgate@p-header:1] Set("PJSIP/2***t0-00000001", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:0034***[email protected]>") in new stack
    -- Executing [sipgate@p-header:2] Return("PJSIP/2***t0-00000001", "") in new stack
  == Spawn extension (from-pstn, 0034***70, 1) exited non-zero on 'PJSIP/2***t0-00000001'
    -- PJSIP/2***t0-00000001 Internal Gosub(p-header,sipgate,1) complete GOSUB_RETVAL=
<--- Transmitting SIP request (1088 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj881cf0b3-2e93-41d5-956f-3bcf941bc47d
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>
Contact: <sip:2***[email protected]:5060>
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23843 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:0034***[email protected]>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1341257844 1341257844 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 17206 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

    -- Called PJSIP/0034***70@2***t0
<--- Received SIP response (532 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj881cf0b3-2e93-41d5-956f-3bcf941bc47d
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f42b
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23843 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="VqzdmFas3GzZ9Z3SJ1wU9Tv4jDuHmskN"
Content-Length: 0


<--- Transmitting SIP request (468 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj881cf0b3-2e93-41d5-956f-3bcf941bc47d
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f42b
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23843 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1308 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>
Contact: <sip:2***[email protected]:5060>
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:0034***[email protected]>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="2***t0", realm="sipconnect.sipgate.de", nonce="VqzdmFas3GzZ9Z3SJ1wU9Tv4jDuHmskN", uri="sip:0034***[email protected]:5060", response="87491a00fdaedf5284351ad9bc4028d7"
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1341257844 1341257844 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 17206 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (399 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 INVITE
Content-Length: 0


<--- Received SIP response (1045 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=baa71b8b-6e05-4fce-9489-2b95e989e9ea>
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=as5f4ea096
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:270034***[email protected]:5060>
Content-Type: application/sdp
Content-Length: 350

v=0
o=root 1877283727 1877283727 IN IP4 217.10.77.65
s=sipgate VoIP GW
c=IN IP4 212.9.44.243
t=0 0
m=audio 18006 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:18007

    -- PJSIP/2***t0-00000001 is making progress passing it to PJSIP/29-00000000
<--- Transmitting SIP response (907 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---9e361e31f4f3a86d
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
From: "29" <sip:[email protected]>;tag=0a749a3a
To: <sip:0034***[email protected]>;tag=b2844cf7-34e6-458c-a292-34089150272c
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034***[email protected]>
Content-Type: application/sdp
Content-Length:   252

v=0
o=- 1864664716 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 25878 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x7620ed18 -- Probation passed - setting RTP source address to 212.9.44.243:18006
       > 0x76407910 -- Probation passed - setting RTP source address to 192.168.50.170:56382
<--- Transmitting SIP request (484 bytes) to UDP:192.168.50.170:58941 --->
OPTIONS sip:[email protected]:58941;rinstance=2fb9708b848f21e8 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.4:5060;rport;branch=z9hG4bKPj777ef78c-ee63-41e5-9017-e83b2978fe91
From: <sip:[email protected]>;tag=e58521a9-0d48-42fa-ad39-fb4ddbdcc52b
To: <sip:[email protected];rinstance=2fb9708b848f21e8>
Contact: <sip:[email protected]:5060>
Call-ID: ca4a0f8f-4150-4801-866d-b646a375b4b7
CSeq: 60458 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (609 bytes) from UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.4:5060;rport=5060;branch=z9hG4bKPj777ef78c-ee63-41e5-9017-e83b2978fe91
Contact: <sip:192.168.50.170:58941>
To: <sip:[email protected];rinstance=2fb9708b848f21e8>;tag=a91c8b33
From: <sip:[email protected]>;tag=e58521a9-0d48-42fa-ad39-fb4ddbdcc52b
Call-ID: ca4a0f8f-4150-4801-866d-b646a375b4b7
CSeq: 60458 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Allow-Events: talk, hold
Content-Length: 0


 Contact 29/6be15cbd2f31917188eed6f3e76dcaf0 is now Reachable.  RTT: 26.362 msec
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:0034***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---9e361e31f4f3a86d;rport
Max-Forwards: 70
To: <sip:0034***[email protected]>
From: "29"<sip:[email protected]>;tag=0a749a3a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454169195/a709b914f260f6eee891f0fd200caa22",uri="sip:0034***[email protected]",response="724d05de8652d720b227d7695f68055d",cnonce="bcb251a6d3e46fbc467c1f871198a4ef",nc=00000002,qop=auth,algorithm=md5,opaque="1706762c7e917264"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---9e361e31f4f3a86d
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
From: "29" <sip:[email protected]>;tag=0a749a3a
To: <sip:0034***[email protected]>;tag=b2844cf7-34e6-458c-a292-34089150272c
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---9e361e31f4f3a86d
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
From: "29" <sip:[email protected]>;tag=0a749a3a
To: <sip:0034***[email protected]>;tag=b2844cf7-34e6-458c-a292-34089150272c
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034***[email protected]>
Content-Length:  0


<--- Transmitting SIP request (455 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:0034***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034***70, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---9e361e31f4f3a86d;rport
Max-Forwards: 70
To: <sip:0034***[email protected]>;tag=b2844cf7-34e6-458c-a292-34089150272c
From: "29"<sip:[email protected]>;tag=0a749a3a
Call-ID: 79048NGMzNWMzMGE0MjRmNDdkMjBhOThmYWU4NzUxYjM0MTQ
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (412 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-21a3
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 CANCEL
Content-Length: 0


<--- Received SIP response (498 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=as5f4ea096
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (441 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj1332275f-21ef-4584-b9a8-c0007d1b7e90
From: <sip:2***[email protected]>;tag=baa71b8b-6e05-4fce-9489-2b95e989e9ea
To: <sip:0034***[email protected]>;tag=as5f4ea096
Call-ID: 6ca1458f-39d4-4601-8c60-f9c5e9c275c5
CSeq: 23844 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (461 bytes) to UDP:217.10.68.150:5060 --->
OPTIONS sip:2***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj19d192b1-f9fc-4d3f-951a-4f7cc719ee3d
From: <sip:[email protected]>;tag=016070c8-bd90-4f6f-9818-51f79496e0d7
To: <sip:2***[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: 4ee6f815-85e2-4318-835d-3f8a46dd94ec
CSeq: 59638 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (392 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 151.182.55.227:5060;rport=64888;branch=z9hG4bKPj19d192b1-f9fc-4d3f-951a-4f7cc719ee3d;received=79.145.192.13
From: <sip:[email protected]>;tag=016070c8-bd90-4f6f-9818-51f79496e0d7
To: <sip:2***[email protected]>;tag=912805fe4f8193ac6ebdbdd6077ba2ce.e62b
Call-ID: 4ee6f815-85e2-4318-835d-3f8a46dd94ec
CSeq: 59638 OPTIONS
Content-Length: 0


 Contact 2***t0/sip:2***[email protected]:5060 is now Reachable.  RTT: 55.865 msec

Code:
# 4. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit $(CLIP) aus macro "..Predial-Hook"
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: b(p-header,sipgate,1)
# /etc/asterisk/extensions_custom.conf:

[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CLIP}@sipconnect.sipgate.de>)
same => n,Return()

# Log:
<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---4098777e34f0f047;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:[email protected]>
From: "29"<sip:[email protected]>;tag=57b75935
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098643697771012 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 51588 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---4098777e34f0f047
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
From: "29" <sip:[email protected]>;tag=57b75935
To: <sip:[email protected]>;tag=z9hG4bK-524287-1---4098777e34f0f047
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454170093/c8baaed09a649002d7e5bf38ab23cbd3",opaque="37766846060b0036",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---4098777e34f0f047;rport
Max-Forwards: 70
To: <sip:[email protected]>;tag=z9hG4bK-524287-1---4098777e34f0f047
From: "29"<sip:[email protected]>;tag=57b75935
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---4b842f3c32c58525;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:[email protected]>
From: "29"<sip:[email protected]>;tag=57b75935
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454170093/c8baaed09a649002d7e5bf38ab23cbd3",uri="sip:[email protected]",response="bafd9b47eec986f1e69294a85b8e3377",cnonce="e594144ea72372d3b0d6930346751433",nc=00000001,qop=auth,algorithm=md5,opaque="37766846060b0036"
Content-Length: 336

v=0
o=- 13098643697771012 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 51588 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---4b842f3c32c58525
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
From: "29" <sip:[email protected]>;tag=57b75935
To: <sip:[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034722332970@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1454170093.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034722332970@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034722332970,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1454170093") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160130-170813") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034722332970") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034722332970)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034722332970@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034722332970@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034722332970@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034722332970@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034722332970,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034722332970") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID="Chris" <4961027198829>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)="Chris" <4961027198829>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=4961027198829") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034722332970") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)b(p-header,sipgate,1))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/29-00000000", "CLIP=4961027198829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:2] Set("PJSIP/29-00000000", "CLIP=4961027198829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:3] Set("PJSIP/29-00000000", "CLIP=4961027198829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:4] Set("PJSIP/29-00000000", "CALLERID(name)=4961027198829") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:5] Set("PJSIP/29-00000000", "CALLERID(num)=4961027198829") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034722332970)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:4961027198829)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4961027198829)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034722332970@2113905t0,300,b(p-header,sipgate,1)") in new stack
    -- PJSIP/2113905t0-00000001 Internal Gosub(p-header,sipgate,1) start
    -- Executing [sipgate@p-header:1] Set("PJSIP/2113905t0-00000001", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:@sipconnect.sipgate.de>") in new stack
    -- Executing [sipgate@p-header:2] Return("PJSIP/2113905t0-00000001", "") in new stack
  == Spawn extension (from-pstn, 0034722332970, 1) exited non-zero on 'PJSIP/2113905t0-00000001'
    -- PJSIP/2113905t0-00000001 Internal Gosub(p-header,sipgate,1) complete GOSUB_RETVAL=
    -- Called PJSIP/0034722332970@2113905t0
<--- Transmitting SIP request (1075 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj3e368bc1-74f3-467a-8132-0aed3a0abc0d
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22005 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:@sipconnect.sipgate.de>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1496685379 1496685379 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 17366 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (532 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj3e368bc1-74f3-467a-8132-0aed3a0abc0d
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=86e53dd608d1c001e0b8060625977563.1be9
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22005 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="VqzhGVas3+2dgKYY8DXL9fb6Hs1QhsDC"
Content-Length: 0


<--- Transmitting SIP request (468 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj3e368bc1-74f3-467a-8132-0aed3a0abc0d
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=86e53dd608d1c001e0b8060625977563.1be9
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22005 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1295 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:@sipconnect.sipgate.de>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="2113905t0", realm="sipconnect.sipgate.de", nonce="VqzhGVas3+2dgKYY8DXL9fb6Hs1QhsDC", uri="sip:[email protected]:5060", response="9fb2642c8be204dea06d75d79d2dc4b4"
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1496685379 1496685379 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 17366 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (399 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 INVITE
Content-Length: 0


<--- Received SIP response (1049 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=50cd3965-080e-45b4-bf11-7036d45d31f5>
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=as657e2da8
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 352

v=0
o=root 1040177426 1040177426 IN IP4 217.116.117.69
s=sipgate VoIP GW
c=IN IP4 212.9.44.245
t=0 0
m=audio 26994 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:26995

    -- PJSIP/2113905t0-00000001 is making progress passing it to PJSIP/29-00000000
<--- Transmitting SIP response (907 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---4b842f3c32c58525
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
From: "29" <sip:[email protected]>;tag=57b75935
To: <sip:[email protected]>;tag=9d1d710c-80c2-4cc3-864b-85b737e7f2aa
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:4961027198829" <sip:[email protected]>
Content-Type: application/sdp
Content-Length:   252

v=0
o=- 2762285572 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 27744 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x7622fbb0 -- Probation passed - setting RTP source address to 212.9.44.245:26994
       > 0x75b07b98 -- Probation passed - setting RTP source address to 192.168.50.170:51588
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---4b842f3c32c58525;rport
Max-Forwards: 70
To: <sip:[email protected]>
From: "29"<sip:[email protected]>;tag=57b75935
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454170093/c8baaed09a649002d7e5bf38ab23cbd3",uri="sip:[email protected]",response="6239b4cbe693accd1ad61ccefd18f590",cnonce="008bd669cb004e6fa25daf0e79a52155",nc=00000002,qop=auth,algorithm=md5,opaque="37766846060b0036"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---4b842f3c32c58525
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
From: "29" <sip:[email protected]>;tag=57b75935
To: <sip:[email protected]>;tag=9d1d710c-80c2-4cc3-864b-85b737e7f2aa
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---4b842f3c32c58525
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
From: "29" <sip:[email protected]>;tag=57b75935
To: <sip:[email protected]>;tag=9d1d710c-80c2-4cc3-864b-85b737e7f2aa
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:4961027198829" <sip:[email protected]>
Content-Length:  0


<--- Transmitting SIP request (455 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034722332970, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---4b842f3c32c58525;rport
Max-Forwards: 70
To: <sip:[email protected]>;tag=9d1d710c-80c2-4cc3-864b-85b737e7f2aa
From: "29"<sip:[email protected]>;tag=57b75935
Call-ID: 79048ZWNjNmYwYjcxZTkwZmZjZTgyMTIyMDQwYjlmNjY2Nzk
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (412 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-78ca
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 CANCEL
Content-Length: 0


<--- Received SIP response (498 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=as657e2da8
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (441 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj0c95fd9e-bbac-460d-bc09-e9838df94af9
From: <sip:[email protected]>;tag=50cd3965-080e-45b4-bf11-7036d45d31f5
To: <sip:[email protected]>;tag=as657e2da8
Call-ID: 2c77a6c2-5a8f-4a1d-950e-f5d9558ee5a8
CSeq: 22006 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


PBX001*CLI>

Code:
# 5. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit $(CLIP)
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: b(p-header,sipgate,1)
# /etc/asterisk/extensions_custom.conf:

[p-header]
exten => sipgate,1,Set(CLIP=${CALLERID(num)})
exten => s,n,Set(CLIP=${IF($["${CLIP:0:2}"="00"]?${CLIP:2}:${CLIP})}) ; 00 abschneiden
exten => s,n,Set(CLIP=${IF($["${CLIP:0:1}"="0"]?49${CLIP:1}:${CLIP})}) ; 0 durch 49 ersetzen
exten => s,n,Set(CALLERID(name)=${CLIP})
exten => s,n,Set(CALLERID(num)=${CLIP})
exten => s,n,,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CLIP}@sipconnect.sipgate.de>)
same => n,Return()


# Log:
<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---d205694799661a4f;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=03ea9644
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098644099622489 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 51900 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---d205694799661a4f
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
From: "29" <sip:[email protected]>;tag=03ea9644
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---d205694799661a4f
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454170495/7e08c3ceede631a138333eb8fb09a91e",opaque="31fb793b3694dee6",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---d205694799661a4f;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---d205694799661a4f
From: "29"<sip:[email protected]>;tag=03ea9644
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---98986b0ebfc30821;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=03ea9644
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454170495/7e08c3ceede631a138333eb8fb09a91e",uri="sip:0034722***[email protected]",response="9e2dba6e8640958804a8cc88b7835dff",cnonce="228916432db6a003bcfea19250eff1b2",nc=00000001,qop=auth,algorithm=md5,opaque="31fb793b3694dee6"
Content-Length: 336

v=0
o=- 13098644099622489 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 51900 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---98986b0ebfc30821
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
From: "29" <sip:[email protected]>;tag=03ea9644
To: <sip:0034722***[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034722***70@from-internal:1] Macro("PJSIP/29-00000000", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000000", "TOUCH_MONITOR=1454170495.0") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000000", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000000", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000000", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000000", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000000", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000000", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000000", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000000", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000000", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000000", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000000", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000000", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000000", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000000", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000000", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000000", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034722***70@from-internal:2] Gosub("PJSIP/29-00000000", "sub-record-check,s,1(out,0034722***70,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000000", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000000", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000000", "NOW=1454170495") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000000", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000000", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000000", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000000", "__TIMESTR=20160130-171455") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000000", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000000", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000000", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000000", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000000", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000000", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000000", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000000", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000000", "Outbound Recording Check from 29 to 0034722***70") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000000", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000000", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000000", "recordcheck,1(dontcare,out,0034722***70)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000000", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000000", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [0034722***70@from-internal:3] ExecIf("PJSIP/29-00000000", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034722***70@from-internal:4] Set("PJSIP/29-00000000", "MOHCLASS=default") in new stack
    -- Executing [0034722***70@from-internal:5] Set("PJSIP/29-00000000", "_NODEST=") in new stack
    -- Executing [0034722***70@from-internal:6] Macro("PJSIP/29-00000000", "dialout-trunk,4,0034722***70,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000000", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000000", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000000", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000000", "DIAL_NUMBER=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000000", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000000", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000000", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000000", "DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000000", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000000", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000000", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000000", "USEROUTCID="Chris" <496***29>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000000", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000000", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000000", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000000", "1?Set(CALLERID(all)="Chris" <496***29>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000000", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000000", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000000", "CDR(outbound_cnum)=496***29") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000000", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000000", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000000", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000000", "OUTNUM=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000000", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)b(p-header,sipgate,1))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000000", "0?Set(DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000000", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/29-00000000", "") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000000", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(num,i)=0034722***70)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000000", "1?Set(CONNECTEDLINE(name,i)=CID:496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000000", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000000", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000000", "PJSIP/0034722***70@21***t0,300,b(p-header,sipgate,1)") in new stack
    -- PJSIP/21***t0-00000001 Internal Gosub(p-header,sipgate,1) start
    -- Executing [sipgate@p-header:1] Set("PJSIP/21***t0-00000001", "CLIP=0034722***70") in new stack
[2016-01-30 17:14:55] NOTICE[11130][C-00000000]: app_stack.c:1082 gosub_run: PJSIP/21***t0-00000001 Abnormal 'Gosub(p-header,sipgate,1)' exit.  Popping routine return locations.
    -- Called PJSIP/0034722***70@21***t0
<--- Transmitting SIP request (1022 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj8e6f8ac4-1f34-4b80-8db5-fbafc2914f93
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3792 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1903412126 1903412126 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 18158 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (531 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj8e6f8ac4-1f34-4b80-8db5-fbafc2914f93
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.09d5
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3792 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="Vqziq1as4X8llAAsB36ZMV3f9FhPKw5N"
Content-Length: 0


<--- Transmitting SIP request (467 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj8e6f8ac4-1f34-4b80-8db5-fbafc2914f93
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.09d5
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3792 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1242 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="21***t0", realm="sipconnect.sipgate.de", nonce="Vqziq1as4X8llAAsB36ZMV3f9FhPKw5N", uri="sip:0034722***[email protected]:5060", response="8f40d6f9ef6f0bf9a62da3c365fb3d9a"
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1903412126 1903412126 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 18158 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (398 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 INVITE
Content-Length: 0


<--- Received SIP response (1040 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=4d71119c-764d-4b4d-a869-8a8f5f653b3e>
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=as4f77d843
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:270034722***[email protected]:5060>
Content-Type: application/sdp
Content-Length: 347

v=0
o=root 510289821 510289821 IN IP4 217.10.67.4
s=sipgate VoIP GW
c=IN IP4 212.9.44.247
t=0 0
m=audio 27758 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:27759

    -- PJSIP/21***t0-00000001 is making progress passing it to PJSIP/29-00000000
<--- Transmitting SIP response (907 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---98986b0ebfc30821
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
From: "29" <sip:[email protected]>;tag=03ea9644
To: <sip:0034722***[email protected]>;tag=39a0f0f2-8c50-4bf7-b40e-1568c9cd6591
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Type: application/sdp
Content-Length:   252

v=0
o=- 3164137049 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 25258 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x7620df98 -- Probation passed - setting RTP source address to 212.9.44.247:27758
       > 0x75e07ba0 -- Probation passed - setting RTP source address to 192.168.50.170:51900
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---98986b0ebfc30821;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=03ea9644
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454170495/7e08c3ceede631a138333eb8fb09a91e",uri="sip:0034722***[email protected]",response="815887dbe8377e22ad37be74bd9eefc7",cnonce="addd6e82245c5d8a54935a5616b1f909",nc=00000002,qop=auth,algorithm=md5,opaque="31fb793b3694dee6"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---98986b0ebfc30821
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
From: "29" <sip:[email protected]>;tag=03ea9644
To: <sip:0034722***[email protected]>;tag=39a0f0f2-8c50-4bf7-b40e-1568c9cd6591
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---98986b0ebfc30821
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
From: "29" <sip:[email protected]>;tag=03ea9644
To: <sip:0034722***[email protected]>;tag=39a0f0f2-8c50-4bf7-b40e-1568c9cd6591
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000000' in macro 'dialout-trunk'
<--- Transmitting SIP request (454 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


  == Spawn extension (from-internal, 0034722***70, 6) exited non-zero on 'PJSIP/29-00000000'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000000", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000000", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000000", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000000", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000000' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000000'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---98986b0ebfc30821;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=39a0f0f2-8c50-4bf7-b40e-1568c9cd6591
From: "29"<sip:[email protected]>;tag=03ea9644
Call-ID: 79048Mjc0NjRiYTZhMTE3ZDNhMzExNjQyODZkNTE4NDlkNzI
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (411 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-1376
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 CANCEL
Content-Length: 0


<--- Received SIP response (497 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64893;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=as4f77d843
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (440 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj82c1fa18-f54f-4269-874a-5f794fd0a263
From: <sip:21***[email protected]>;tag=4d71119c-764d-4b4d-a869-8a8f5f653b3e
To: <sip:0034722***[email protected]>;tag=as4f77d843
Call-ID: 6a3e2b84-bbaf-4b27-a889-6df7f8eca1fe
CSeq: 3793 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0

Code:
# 6. Variante: Dial-Options: p-header: Setzen der CallerID(num) mit Klartext Nummer
# CallerID: 496***9
# External_Num: 0034722****70
# Trunkoptions: b(p-header,sipgate,1)
# /etc/asterisk/extensions_custom.conf:

[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>)
same => n,Return()

# Log
<--- Transmitting SIP request (484 bytes) to UDP:192.168.50.170:58941 --->
OPTIONS sip:[email protected]:58941;rinstance=2fb9708b848f21e8 SIP/2.0
Via: SIP/2.0/UDP 192.168.50.4:5060;rport;branch=z9hG4bKPj15e239d3-8d75-4026-b47f-78c8e9b8ca98
From: <sip:[email protected]>;tag=c4aaa2bd-206c-45c0-8037-4fa5102e7fcd
To: <sip:[email protected];rinstance=2fb9708b848f21e8>
Contact: <sip:[email protected]:5060>
Call-ID: 7866abf7-1491-4913-8bf2-aaa98acbe64e
CSeq: 29015 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (609 bytes) from UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.4:5060;rport=5060;branch=z9hG4bKPj15e239d3-8d75-4026-b47f-78c8e9b8ca98
Contact: <sip:192.168.50.170:58941>
To: <sip:[email protected];rinstance=2fb9708b848f21e8>;tag=eaf99831
From: <sip:[email protected]>;tag=c4aaa2bd-206c-45c0-8037-4fa5102e7fcd
Call-ID: 7866abf7-1491-4913-8bf2-aaa98acbe64e
CSeq: 29015 OPTIONS
Accept: application/sdp
Accept-Language: en
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Allow-Events: talk, hold
Content-Length: 0


PBX001*CLI> pjsip set logger on
PJSIP Logging enabled
<--- Received SIP request (919 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---611e221d211e944a;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=9f879b30
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
CSeq: 1 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Content-Length: 336

v=0
o=- 13098641845570126 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 54400 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (543 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---611e221d211e944a
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
From: "29" <sip:[email protected]>;tag=9f879b30
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---611e221d211e944a
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454168241/1cf766b6b887884065548e6d0858e80e",opaque="483744c43e35c25c",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP request (367 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---611e221d211e944a;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=z9hG4bK-524287-1---611e221d211e944a
From: "29"<sip:[email protected]>;tag=9f879b30
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
CSeq: 1 ACK
Content-Length: 0


<--- Received SIP request (1209 bytes) from UDP:192.168.50.170:58941 --->
INVITE sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---b88a57168534832a;rport
Max-Forwards: 70
Contact: <sip:[email protected]:58941;rinstance=2fb9708b848f21e8>
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=9f879b30
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
CSeq: 2 INVITE
Allow: SUBSCRIBE, NOTIFY, INVITE, ACK, CANCEL, BYE, REFER, INFO, MESSAGE, OPTIONS
Content-Type: application/sdp
Supported: replaces
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454168241/1cf766b6b887884065548e6d0858e80e",uri="sip:0034722***[email protected]",response="30b317aeb81994eea776355ed40c3d22",cnonce="9472792447a47e17ced13f0b46b79562",nc=00000001,qop=auth,algorithm=md5,opaque="483744c43e35c25c"
Content-Length: 336

v=0
o=- 13098641845570126 1 IN IP4 192.168.50.170
s=X-Lite release 4.9.2 stamp 79048
c=IN IP4 192.168.50.170
t=0 0
m=audio 54400 RTP/AVP 8 120 0 84 101
a=rtpmap:120 opus/48000/2
a=fmtp:120 useinbandfec=1; usedtx=1; maxaveragebitrate=64000
a=rtpmap:84 speex/16000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

<--- Transmitting SIP response (350 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---b88a57168534832a
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
From: "29" <sip:[email protected]>;tag=9f879b30
To: <sip:0034722***[email protected]>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [0034722***70@from-internal:1] Macro("PJSIP/29-00000004", "user-callerid,LIMIT,EXTERNAL,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("PJSIP/29-00000004", "TOUCH_MONITOR=1454168241.6") in new stack
    -- Executing [s@macro-user-callerid:2] Set("PJSIP/29-00000004", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("PJSIP/29-00000004", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("PJSIP/29-00000004", "1?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("PJSIP/29-00000004", "AMPUSER=29") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("PJSIP/29-00000004", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:7] Set("PJSIP/29-00000004", "AMPUSERCIDNAME=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:8] GotoIf("PJSIP/29-00000004", "0?report") in new stack
    -- Executing [s@macro-user-callerid:9] Set("PJSIP/29-00000004", "AMPUSERCID=29") in new stack
    -- Executing [s@macro-user-callerid:10] Set("PJSIP/29-00000004", "__DIAL_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-user-callerid:11] Set("PJSIP/29-00000004", "CALLERID(all)="Christian Bovet" <29>") in new stack
    -- Executing [s@macro-user-callerid:12] GotoIf("PJSIP/29-00000004", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:13] ExecIf("PJSIP/29-00000004", "1?Set(GROUP(concurrency_limit)=29)") in new stack
    -- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/29-00000004", "1?Set(CHANNEL(language)=de_alaw)") in new stack
    -- Executing [s@macro-user-callerid:15] GotoIf("PJSIP/29-00000004", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,29)
    -- Executing [s@macro-user-callerid:29] Set("PJSIP/29-00000004", "CALLERID(number)=29") in new stack
    -- Executing [s@macro-user-callerid:30] Set("PJSIP/29-00000004", "CALLERID(name)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:31] Set("PJSIP/29-00000004", "CDR(cnum)=29") in new stack
    -- Executing [s@macro-user-callerid:32] Set("PJSIP/29-00000004", "CDR(cnam)=Christian Bovet") in new stack
    -- Executing [s@macro-user-callerid:33] Set("PJSIP/29-00000004", "CHANNEL(language)=de_alaw") in new stack
    -- Executing [0034722***70@from-internal:2] Gosub("PJSIP/29-00000004", "sub-record-check,s,1(out,0034722***70,dontcare)") in new stack
    -- Executing [s@sub-record-check:1] GotoIf("PJSIP/29-00000004", "0?initialized") in new stack
    -- Executing [s@sub-record-check:2] Set("PJSIP/29-00000004", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:3] Set("PJSIP/29-00000004", "NOW=1454168241") in new stack
    -- Executing [s@sub-record-check:4] Set("PJSIP/29-00000004", "__DAY=30") in new stack
    -- Executing [s@sub-record-check:5] Set("PJSIP/29-00000004", "__MONTH=01") in new stack
    -- Executing [s@sub-record-check:6] Set("PJSIP/29-00000004", "__YEAR=2016") in new stack
    -- Executing [s@sub-record-check:7] Set("PJSIP/29-00000004", "__TIMESTR=20160130-163721") in new stack
    -- Executing [s@sub-record-check:8] Set("PJSIP/29-00000004", "__FROMEXTEN=29") in new stack
    -- Executing [s@sub-record-check:9] Set("PJSIP/29-00000004", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:10] NoOp("PJSIP/29-00000004", "Recordings initialized") in new stack
    -- Executing [s@sub-record-check:11] ExecIf("PJSIP/29-00000004", "0?Set(ARG3=dontcare)") in new stack
    -- Executing [s@sub-record-check:12] Set("PJSIP/29-00000004", "REC_POLICY_MODE_SAVE=") in new stack
    -- Executing [s@sub-record-check:13] ExecIf("PJSIP/29-00000004", "0?Set(REC_STATUS=NO)") in new stack
    -- Executing [s@sub-record-check:14] GotoIf("PJSIP/29-00000004", "3?checkaction") in new stack
    -- Goto (sub-record-check,s,17)
    -- Executing [s@sub-record-check:17] GotoIf("PJSIP/29-00000004", "1?sub-record-check,out,1") in new stack
    -- Goto (sub-record-check,out,1)
    -- Executing [out@sub-record-check:1] NoOp("PJSIP/29-00000004", "Outbound Recording Check from 29 to 0034722***70") in new stack
    -- Executing [out@sub-record-check:2] Set("PJSIP/29-00000004", "RECMODE=dontcare") in new stack
    -- Executing [out@sub-record-check:3] ExecIf("PJSIP/29-00000004", "1?Goto(routewins)") in new stack
    -- Goto (sub-record-check,out,7)
    -- Executing [out@sub-record-check:7] Gosub("PJSIP/29-00000004", "recordcheck,1(dontcare,out,0034722***70)") in new stack
    -- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/29-00000004", "Starting recording check against dontcare") in new stack
    -- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/29-00000004", "dontcare") in new stack
    -- Goto (sub-record-check,recordcheck,3)
    -- Executing [recordcheck@sub-record-check:3] Return("PJSIP/29-00000004", "") in new stack
    -- Executing [out@sub-record-check:8] Return("PJSIP/29-00000004", "") in new stack
    -- Executing [0034722***70@from-internal:3] ExecIf("PJSIP/29-00000004", "0 ?Set(CDR(accountcode)=)") in new stack
    -- Executing [0034722***70@from-internal:4] Set("PJSIP/29-00000004", "MOHCLASS=default") in new stack
    -- Executing [0034722***70@from-internal:5] Set("PJSIP/29-00000004", "_NODEST=") in new stack
    -- Executing [0034722***70@from-internal:6] Macro("PJSIP/29-00000004", "dialout-trunk,4,0034722***70,,on") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("PJSIP/29-00000004", "DIAL_TRUNK=4") in new stack
    -- Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/29-00000004", "0?sub-pincheck,s,1()") in new stack
    -- Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/29-00000004", "0?disabletrunk,1") in new stack
    -- Executing [s@macro-dialout-trunk:4] Set("PJSIP/29-00000004", "DIAL_NUMBER=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:5] Set("PJSIP/29-00000004", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dialout-trunk:6] Set("PJSIP/29-00000004", "OUTBOUND_GROUP=OUT_4") in new stack
    -- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/29-00000004", "1?nomax") in new stack
    -- Goto (macro-dialout-trunk,s,9)
    -- Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/29-00000004", "0?skipoutcid") in new stack
    -- Executing [s@macro-dialout-trunk:10] Set("PJSIP/29-00000004", "DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)") in new stack
    -- Executing [s@macro-dialout-trunk:11] Macro("PJSIP/29-00000004", "outbound-callerid,4") in new stack
    -- Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/29-00000004", "0?Set(CALLERPRES(name-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/29-00000004", "0?Set(CALLERPRES(num-pres)=)") in new stack
    -- Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/29-00000004", "0?Set(REALCALLERIDNUM=29)") in new stack
    -- Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/29-00000004", "1?normcid") in new stack
    -- Goto (macro-outbound-callerid,s,7)
    -- Executing [s@macro-outbound-callerid:7] Set("PJSIP/29-00000004", "USEROUTCID="Chris" <496***29>") in new stack
    -- Executing [s@macro-outbound-callerid:8] Set("PJSIP/29-00000004", "EMERGENCYCID=") in new stack
    -- Executing [s@macro-outbound-callerid:9] Set("PJSIP/29-00000004", "TRUNKOUTCID=") in new stack
    -- Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/29-00000004", "1?trunkcid") in new stack
    -- Goto (macro-outbound-callerid,s,15)
    -- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/29-00000004", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/29-00000004", "1?Set(CALLERID(all)="Chris" <496***29>)") in new stack
    -- Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/29-00000004", "0?Set(CALLERID(all)=)") in new stack
    -- Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/29-00000004", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/29-00000004", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
    -- Executing [s@macro-outbound-callerid:20] Set("PJSIP/29-00000004", "CDR(outbound_cnum)=496***29") in new stack
    -- Executing [s@macro-outbound-callerid:21] Set("PJSIP/29-00000004", "CDR(outbound_cnam)=Chris") in new stack
    -- Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/29-00000004", "1?sub-flp-4,s,1()") in new stack
    -- Executing [s@sub-flp-4:1] ExecIf("PJSIP/29-00000004", "0?Return()") in new stack
    -- Executing [s@sub-flp-4:2] Return("PJSIP/29-00000004", "") in new stack
    -- Executing [s@macro-dialout-trunk:13] Set("PJSIP/29-00000004", "OUTNUM=0034722***70") in new stack
    -- Executing [s@macro-dialout-trunk:14] Set("PJSIP/29-00000004", "custom=PJSIP") in new stack
    -- Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/29-00000004", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)b(p-header,sipgate,1))") in new stack
    -- Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/29-00000004", "0?Set(DIAL_TRUNK_OPTIONS=b(p-header,sipgate,1)M(confirm))") in new stack
    -- Executing [s@macro-dialout-trunk:17] Macro("PJSIP/29-00000004", "dialout-trunk-predial-hook,") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/29-00000004", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:2] Set("PJSIP/29-00000004", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:3] Set("PJSIP/29-00000004", "CLIP=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:4] Set("PJSIP/29-00000004", "CALLERID(name)=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:5] Set("PJSIP/29-00000004", "CALLERID(num)=496***29") in new stack
    -- Executing [s@macro-dialout-trunk-predial-hook:6] Set("PJSIP/29-00000004", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>") in new stack
    -- Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/29-00000004", "0?bypass,1") in new stack
    -- Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/29-00000004", "1?Set(CONNECTEDLINE(num,i)=0034722***70)") in new stack
    -- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/29-00000004", "1?Set(CONNECTEDLINE(name,i)=CID:496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/29-00000004", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)496***29)") in new stack
    -- Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/29-00000004", "0?customtrunk") in new stack
    -- Executing [s@macro-dialout-trunk:23] Dial("PJSIP/29-00000004", "PJSIP/0034722***70@21***t0,300,b(p-header,sipgate,1)") in new stack
    -- PJSIP/21***t0-00000005 Internal Gosub(p-header,sipgate,1) start
    -- Executing [sipgate@p-header:1] Set("PJSIP/21***t0-00000005", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>") in new stack
    -- Executing [sipgate@p-header:2] Return("PJSIP/21***t0-00000005", "") in new stack
  == Spawn extension (from-pstn, 0034722***70, 1) exited non-zero on 'PJSIP/21***t0-00000005'
    -- PJSIP/21***t0-00000005 Internal Gosub(p-header,sipgate,1) complete GOSUB_RETVAL=
    -- Called PJSIP/0034722***70@21***t0
<--- Transmitting SIP request (1088 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPje04ea54e-83e7-4499-95d1-2868306f1473
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18898 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:496***[email protected]>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1201355481 1201355481 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 25126 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (532 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPje04ea54e-83e7-4499-95d1-2868306f1473
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f03c
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18898 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="VqzZ3Vas2LE2mSsOBozYOF/Ih2k/0j/G"
Content-Length: 0


<--- Transmitting SIP request (468 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPje04ea54e-83e7-4499-95d1-2868306f1473
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=86e53dd608d1c001e0b8060625977563.f03c
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18898 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (1308 bytes) to UDP:217.10.68.150:5060 --->
INVITE sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>
Contact: <sip:21***[email protected]:5060>
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 INVITE
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Session-Expires: 1800
Min-SE: 90
P-Preferred-Identity: <sip:496***[email protected]>
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Proxy-Authorization: Digest username="21***t0", realm="sipconnect.sipgate.de", nonce="VqzZ3Vas2LE2mSsOBozYOF/Ih2k/0j/G", uri="sip:0034722***[email protected]:5060", response="aca5ec90e42a7bdd98995a2ed6c53d49"
Content-Type: application/sdp
Content-Length:   317

v=0
o=- 1201355481 1201355481 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 151.182.55.227
t=0 0
m=audio 25126 RTP/AVP 0 8 3 111 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

<--- Received SIP response (399 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 INVITE
Content-Length: 0


<--- Received SIP response (1046 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
Record-Route: <sip:172.20.40.6;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=f6b5acec-edb9-4380-8618-7c61563e70fa>
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=as62b69359
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:270034722***[email protected]:5060>
Content-Type: application/sdp
Content-Length: 350

v=0
o=root 976160273 976160273 IN IP4 217.116.117.8
s=sipgate VoIP GW
c=IN IP4 217.10.77.240
t=0 0
m=audio 17646 RTP/AVP 8 0 3 111 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:111 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
a=rtcp:17647

    -- PJSIP/21***t0-00000005 is making progress passing it to PJSIP/29-00000004
<--- Transmitting SIP response (906 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---b88a57168534832a
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
From: "29" <sip:[email protected]>;tag=9f879b30
To: <sip:0034722***[email protected]>;tag=50e62ed3-8d01-4f4e-947f-a4b16d2f454e
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Contact: <sip:192.168.50.4:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Type: application/sdp
Content-Length:   251

v=0
o=- 910084686 3 IN IP4 192.168.50.4
s=Asterisk
c=IN IP4 192.168.50.4
t=0 0
m=audio 27496 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

       > 0x76219c40 -- Probation passed - setting RTP source address to 217.10.77.240:17646
       > 0x75d0cbb0 -- Probation passed - setting RTP source address to 192.168.50.170:54400
<--- Received SIP request (669 bytes) from UDP:192.168.50.170:58941 --->
CANCEL sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---b88a57168534832a;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>
From: "29"<sip:[email protected]>;tag=9f879b30
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
CSeq: 2 CANCEL
User-Agent: X-Lite release 4.9.2 stamp 79048
Authorization: Digest username="29",realm="asterisk",nonce="1454168241/1cf766b6b887884065548e6d0858e80e",uri="sip:0034722***[email protected]",response="b991ec83ba927d703c3f93f811fd0c73",cnonce="aa24ae760b3467715181145990e26fe4",nc=00000002,qop=auth,algorithm=md5,opaque="483744c43e35c25c"
Content-Length: 0


<--- Transmitting SIP response (387 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---b88a57168534832a
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
From: "29" <sip:[email protected]>;tag=9f879b30
To: <sip:0034722***[email protected]>;tag=50e62ed3-8d01-4f4e-947f-a4b16d2f454e
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP response (589 bytes) to UDP:192.168.50.170:58941 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.50.170:58941;rport=58941;received=192.168.50.170;branch=z9hG4bK-524287-1---b88a57168534832a
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
From: "29" <sip:[email protected]>;tag=9f879b30
To: <sip:0034722***[email protected]>;tag=50e62ed3-8d01-4f4e-947f-a4b16d2f454e
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.6.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER
P-Asserted-Identity: "CID:496***29" <sip:0034722***[email protected]>
Content-Length:  0


  == Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/29-00000004' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 0034722***70, 6) exited non-zero on 'PJSIP/29-00000004'
    -- Executing [h@from-internal:1] Macro("PJSIP/29-00000004", "hangupcall") in new stack
<--- Transmitting SIP request (455 bytes) to UDP:217.10.68.150:5060 --->
CANCEL sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 CANCEL
Reason: Q.850;cause=0
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


    -- Executing [s@macro-hangupcall:1] GotoIf("PJSIP/29-00000004", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("PJSIP/29-00000004", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("PJSIP/29-00000004", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/29-00000004' in macro 'hangupcall'
  == Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/29-00000004'
<--- Received SIP request (368 bytes) from UDP:192.168.50.170:58941 --->
ACK sip:0034722***[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.50.170:58941;branch=z9hG4bK-524287-1---b88a57168534832a;rport
Max-Forwards: 70
To: <sip:0034722***[email protected]>;tag=50e62ed3-8d01-4f4e-947f-a4b16d2f454e
From: "29"<sip:[email protected]>;tag=9f879b30
Call-ID: 79048NzMwNjE4MDg5YWNiNTE4ZmIwODg2NGQ2MDJkODIxNzc
CSeq: 2 ACK
Content-Length: 0


<--- Received SIP response (412 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=769fa25a14d1b0dbe3b46bbd25abb4b3-cf4c
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 CANCEL
Content-Length: 0


<--- Received SIP response (498 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 151.182.55.227:5060;received=79.145.192.13;rport=64888;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=as62b69359
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0


<--- Transmitting SIP request (441 bytes) to UDP:217.10.68.150:5060 --->
ACK sip:0034722***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj897861a5-0cdb-4f49-8cf6-79b6872bcc27
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa
To: <sip:0034722***[email protected]>;tag=as62b69359
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538
CSeq: 18899 ACK
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Transmitting SIP request (461 bytes) to UDP:217.10.68.150:5060 --->
OPTIONS sip:21***[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPj1caca8e4-62b8-4978-8d2e-c2eea3ecdc5f
From: <sip:[email protected]>;tag=e6ea983b-7ab6-42ba-8cc9-73d9f86ec70c
To: <sip:21***[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: c6eb9f29-8b21-48bf-84e5-5645f4e95521
CSeq: 32538 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.6.0)
Content-Length:  0


<--- Received SIP response (392 bytes) from UDP:217.10.68.150:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 151.182.55.227:5060;rport=64888;branch=z9hG4bKPj1caca8e4-62b8-4978-8d2e-c2eea3ecdc5f;received=79.145.192.13
From: <sip:[email protected]>;tag=e6ea983b-7ab6-42ba-8cc9-73d9f86ec70c
To: <sip:21***[email protected]>;tag=912805fe4f8193ac6ebdbdd6077ba2ce.f46f
Call-ID: c6eb9f29-8b21-48bf-84e5-5645f4e95521
CSeq: 32538 OPTIONS
Content-Length: 0


PBX001*CLI> exit
 
Ich bin zwar kein Profi, aber aus deinem Log erkenne ich nicht den vollständigen Ablauf mit dem Stacks. Vergleiche mal mit meinem Log, der ist wesentlich aufschlussreicher. Variante 6 zeigt außerdem, die P-Preffered-Identity im Invite des PJSIP Headders.

Versuche nochmal mit

asterisk -rvvvvv

in die CLI zu kommen und dort dann schon wie rentier-s sagte,

pjsip set logger on

zu dem habe ich

sip set debug on


Du erhälst dann vor und nach dem Durchlauf der Hooks solche Anzeigen des PJSIP Loggings
Code:
<--- Transmitting SIP request (1088 bytes) to UDP:217.10.68.150:5060 ---> 
INVITE sip:0034722***[email protected]:5060 SIP/2.0 
Via: SIP/2.0/UDP 151.182.55.227:5060;rport;branch=z9hG4bKPje04ea54e-83e7-4499-95d1-2868306f1473 
From: <sip:21***[email protected]>;tag=f6b5acec-edb9-4380-8618-7c61563e70fa 
To: <sip:0034722***[email protected]> 
Contact: <sip:21***[email protected]:5060> 
Call-ID: da5cee59-40ee-4432-9519-12050b1ca538 
CSeq: 18898 INVITE 
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, REGISTER, MESSAGE, REFER 
Supported: 100rel, timer, replaces, norefersub 
Session-Expires: 1800 
Min-SE: 90 
P-Preferred-Identity: <sip:496***[email protected]> 
Max-Forwards: 70 
User-Agent: FPBX-13.0.54(13.6.0) 
Content-Type: application/sdp 
Content-Length:   317


Wollte dir das hier nur als Beispiel geben. Die P-Preffered-ID wird im Invite gerade aber nur angegeben, da ich diese direkt mit

[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>)
same => n,Return()

in der extensions_custom.conf gesetzt habe. Das gilt dann aber für jeden Ausgehenden Anruf. Sollte für mich und für dich nur veranschaulichen, was das Ziel des Loggings ist und ob ein Problem besteht.


Weitere Lösungsvarianten (welche ich mir zwar vorstelle, aber nicht funktionieren) findet ihr in meinem gestrigen Post. In den Text Files ist jeweils erwähnt, was in der extensions_custom.conf zum Zeitpunkt des Loggings drin stand.
 
Ich bin zwar kein Profi...
Genau das ist auch mein Problem:)

Spaß beiseite:
Hier steht nochmal ein Log-Auszug zur Verfügung, welcher mit asterisk -rvvvvv, pjsip set logger on und sip set debug on erstellt wurde
Code:
# asterisk -rvvvvv
# pjsip set logger on
# sip set debug on

CSeq: 31274 OPTIONS
Supported: replaces
User-Agent: N510 IP PRO/42.076.00.000.000
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp,application/dtmf-relay,application/simple-message-summary,message/sipfrag
Accept-Encoding: identity
Accept-Language: en
Content-Length: 0


[2016-02-01 07:21:54] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP request (1221 bytes) from UDP:192.168.120.35:2048 --->
INVITE sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.120.35:2048;branch=z9hG4bK-4crcbkfwqw7x;rport
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>
Call-ID: 56aef9812d30-xr7b5681y73l
CSeq: 1 INVITE
Max-Forwards: 70
Contact: <sip:[email protected]:2048;line=je0exdpn>;reg-id=1
X-Serialnumber: 000413232E1C
P-Key-Flags: resolution="31x13", keys="4"
User-Agent: snom360/8.7.3.25
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Content-Type: application/sdp
Content-Length: 405

v=0
o=root 250730445 250730445 IN IP4 192.168.120.35
s=call
c=IN IP4 192.168.120.35
t=0 0
m=audio 54272 RTP/AVP 9 0 8 3 99 108 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:108 AAL2-G726-32/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv

[2016-02-01 07:21:54] VERBOSE[18763] res_pjsip_logger.c: <--- Transmitting SIP response (528 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-4crcbkfwqw7x
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=z9hG4bK-4crcbkfwqw7x
CSeq: 1 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1454307714/52c5afb8a78bdc3297dd1ff0c2d9d3b4",opaque="131ca7261ae4820e",algorithm=md5,qop="auth"
Server: FPBX-13.0.54(13.5.0)
Content-Length:  0


[2016-02-01 07:21:54] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP request (434 bytes) from UDP:192.168.120.35:2048 --->
ACK sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.120.35:2048;branch=z9hG4bK-4crcbkfwqw7x;rport
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=z9hG4bK-4crcbkfwqw7x
Call-ID: 56aef9812d30-xr7b5681y73l
CSeq: 1 ACK
Max-Forwards: 70
Contact: <sip:[email protected]:2048;line=je0exdpn>;reg-id=1
Content-Length: 0


[2016-02-01 07:21:54] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP request (1505 bytes) from UDP:192.168.120.35:2048 --->
INVITE sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.120.35:2048;branch=z9hG4bK-xo0im76s8pp8;rport
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>
Call-ID: 56aef9812d30-xr7b5681y73l
CSeq: 2 INVITE
Max-Forwards: 70
Contact: <sip:[email protected]:2048;line=je0exdpn>;reg-id=1
X-Serialnumber: 000413232E1C
P-Key-Flags: resolution="31x13", keys="4"
User-Agent: snom360/8.7.3.25
Accept: application/sdp
Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, NOTIFY, SUBSCRIBE, PRACK, MESSAGE, INFO, UPDATE
Allow-Events: talk, hold, refer, call-info
Supported: timer, 100rel, replaces, from-change
Session-Expires: 3600;refresher=uas
Min-SE: 90
Authorization: Digest username="200",realm="asterisk",nonce="1454307714/52c5afb8a78bdc3297dd1ff0c2d9d3b4",uri="sip:[email protected];user=phone",qop=auth,nc=00000001,cnonce="3313833c",response="f20f3a7429e4d96a6dac43186ca41b0d",opaque="131ca7261ae4820e",algorithm=MD5
Content-Type: application/sdp
Content-Length: 405

v=0
o=root 250730445 250730445 IN IP4 192.168.120.35
s=call
c=IN IP4 192.168.120.35
t=0 0
m=audio 54272 RTP/AVP 9 0 8 3 99 108 18 101
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:108 AAL2-G726-32/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv

[2016-02-01 07:21:54] VERBOSE[18763] res_pjsip_logger.c: <--- Transmitting SIP response (350 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-xo0im76s8pp8
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.5.0)
Content-Length:  0


[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:1] Macro("PJSIP/200-00000039", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:1] Set("PJSIP/200-00000039", "TOUCH_MONITOR=1454307714.105") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:2] Set("PJSIP/200-00000039", "AMPUSER=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:3] GotoIf("PJSIP/200-00000039", "0?report") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:4] ExecIf("PJSIP/200-00000039", "1?Set(REALCALLERIDNUM=200)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:5] Set("PJSIP/200-00000039", "AMPUSER=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:6] GotoIf("PJSIP/200-00000039", "0?limit") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:7] Set("PJSIP/200-00000039", "AMPUSERCIDNAME=Robert (Snom 360)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:8] GotoIf("PJSIP/200-00000039", "0?report") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:9] Set("PJSIP/200-00000039", "AMPUSERCID=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:10] Set("PJSIP/200-00000039", "__DIAL_OPTIONS=Ttr") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:11] Set("PJSIP/200-00000039", "CALLERID(all)="Robert (Snom 360)" <200>") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:12] GotoIf("PJSIP/200-00000039", "0?limit") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:13] ExecIf("PJSIP/200-00000039", "1?Set(GROUP(concurrency_limit)=200)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:14] ExecIf("PJSIP/200-00000039", "0?Set(CHANNEL(language)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:15] GotoIf("PJSIP/200-00000039", "1?continue") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (macro-user-callerid,s,29)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:29] Set("PJSIP/200-00000039", "CALLERID(number)=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:30] Set("PJSIP/200-00000039", "CALLERID(name)=Robert (Snom 360)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:31] Set("PJSIP/200-00000039", "CDR(cnum)=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:32] Set("PJSIP/200-00000039", "CDR(cnam)=Robert (Snom 360)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-user-callerid:33] Set("PJSIP/200-00000039", "CHANNEL(language)=en") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:2] Gosub("PJSIP/200-00000039", "sub-record-check,s,1(out,0017516xxxx4,force)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/200-00000039", "0?initialized") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/200-00000039", "__REC_STATUS=INITIALIZED") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/200-00000039", "NOW=1454307714") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/200-00000039", "__DAY=01") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/200-00000039", "__MONTH=02") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/200-00000039", "__YEAR=2016") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/200-00000039", "__TIMESTR=20160201-072154") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/200-00000039", "__FROMEXTEN=200") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/200-00000039", "__MON_FMT=wav") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/200-00000039", "Recordings initialized") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/200-00000039", "0?Set(ARG3=dontcare)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/200-00000039", "REC_POLICY_MODE_SAVE=") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/200-00000039", "0?Set(REC_STATUS=NO)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/200-00000039", "3?checkaction") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (sub-record-check,s,17)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/200-00000039", "1?sub-record-check,out,1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (sub-record-check,out,1)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [out@sub-record-check:1] NoOp("PJSIP/200-00000039", "Outbound Recording Check from 200 to 0017516xxxx4") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [out@sub-record-check:2] Set("PJSIP/200-00000039", "RECMODE=dontcare") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [out@sub-record-check:3] ExecIf("PJSIP/200-00000039", "1?Goto(routewins)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (sub-record-check,out,7)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [out@sub-record-check:7] Gosub("PJSIP/200-00000039", "recordcheck,1(force,out,0017516xxxx4)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/200-00000039", "Starting recording check against force") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/200-00000039", "force") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (sub-record-check,recordcheck,5)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:5] Set("PJSIP/200-00000039", "__REC_POLICY_MODE=FORCE") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:6] GotoIf("PJSIP/200-00000039", "1?startrec") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (sub-record-check,recordcheck,16)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:16] NoOp("PJSIP/200-00000039", "Starting recording: out, 0017516xxxx4") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:17] Set("PJSIP/200-00000039", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:18] Set("PJSIP/200-00000039", "__CALLFILENAME=out-0017516xxxx4-200-20160201-072154-1454307714.105") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:19] MixMonitor("PJSIP/200-00000039", "2016/02/01/out-0017516xxxx4-200-20160201-072154-1454307714.105.wav,ai(LOCAL_MIXMON_ID),") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:20] Set("PJSIP/200-00000039", "__MIXMON_ID=0x7f80a00e36e0") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:21] Set("PJSIP/200-00000039", "__RECORD_ID=PJSIP/200-00000039") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:22] Set("PJSIP/200-00000039", "__REC_STATUS=RECORDING") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:23] Set("PJSIP/200-00000039", "CDR(recordingfile)=out-0017516xxxx4-200-20160201-072154-1454307714.105.wav") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [recordcheck@sub-record-check:24] Return("PJSIP/200-00000039", "") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/200-00000039", "") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:3] ExecIf("PJSIP/200-00000039", "0 ?Set(CDR(accountcode)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:4] Set("PJSIP/200-00000039", "MOHCLASS=default") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:5] Set("PJSIP/200-00000039", "_NODEST=") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [0017516xxxx4@from-internal:6] Macro("PJSIP/200-00000039", "dialout-trunk,1,017516xxxx4,,off") in new stack
[2016-02-01 07:21:54] VERBOSE[32231][C-00000030] app_mixmonitor.c: Begin MixMonitor Recording PJSIP/200-00000039
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-00000039", "DIAL_TRUNK=1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/200-00000039", "0?sub-pincheck,s,1()") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/200-00000039", "0?disabletrunk,1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:4] Set("PJSIP/200-00000039", "DIAL_NUMBER=017516xxxx4") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:5] Set("PJSIP/200-00000039", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-00000039", "OUTBOUND_GROUP=OUT_1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/200-00000039", "0?nomax") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:8] GotoIf("PJSIP/200-00000039", "0?chanfull") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/200-00000039", "0?skipoutcid") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/200-00000039", "DIAL_TRUNK_OPTIONS=Tt") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:11] Macro("PJSIP/200-00000039", "outbound-callerid,1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/200-00000039", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/200-00000039", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/200-00000039", "0?Set(REALCALLERIDNUM=200)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/200-00000039", "1?normcid") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (macro-outbound-callerid,s,7)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:7] Set("PJSIP/200-00000039", "USEROUTCID=Robert Schuster <4922897xxx10>") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:8] Set("PJSIP/200-00000039", "EMERGENCYCID=") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:9] Set("PJSIP/200-00000039", "TRUNKOUTCID=") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/200-00000039", "1?trunkcid") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Goto (macro-outbound-callerid,s,15)
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/200-00000039", "0?Set(CALLERID(all)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/200-00000039", "1?Set(CALLERID(all)=Robert Schuster <4922897xxx10>)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/200-00000039", "0?Set(CALLERID(all)=)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/200-00000039", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/200-00000039", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:20] Set("PJSIP/200-00000039", "CDR(outbound_cnum)=4922897xxx10") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-outbound-callerid:21] Set("PJSIP/200-00000039", "CDR(outbound_cnam)=Robert Schuster") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/200-00000039", "0?sub-flp-1,s,1()") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:13] Set("PJSIP/200-00000039", "OUTNUM=017516xxxx4") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:14] Set("PJSIP/200-00000039", "custom=SIP/sipgate") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/200-00000039", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/200-00000039", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:17] Macro("PJSIP/200-00000039", "dialout-trunk-predial-hook,") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/200-00000039", "") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/200-00000039", "0?bypass,1") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/200-00000039", "1?Set(CONNECTEDLINE(num,i)=017516xxxx4)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/200-00000039", "1?Set(CONNECTEDLINE(name,i)=CID:4922897xxx10)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/200-00000039", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4922897xxx10)") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/200-00000039", "0?customtrunk") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-dialout-trunk:23] Dial("PJSIP/200-00000039", "SIP/sipgate/017516xxxx4,300,Tt") in new stack
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] netsock2.c: Using SIP RTP TOS bits 184
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] netsock2.c: Using SIP RTP CoS mark 5
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] chan_sip.c: Audio is at 14542
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] chan_sip.c: Adding codec ulaw to SDP
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] chan_sip.c: Adding codec alaw to SDP
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK28055b0c;rport
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-13.0.54(13.5.0)
Date: Mon, 01 Feb 2016 06:21:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 277

v=0
o=root 1657529415 1657529415 IN IP4 212.79.184.96
s=Asterisk PBX 13.5.0
c=IN IP4 212.79.184.96
t=0 0
m=audio 14542 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---
[2016-02-01 07:21:54] VERBOSE[32230][C-00000030] app_dial.c: Called SIP/sipgate/017516xxxx4
[2016-02-01 07:21:54] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK28055b0c;rport=5061
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=bd5993ef28b67e3a282c182de47698f4.76a5
Call-ID: [email protected]
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="Vq76rlau+YIbQB250S+BOwgFiCnEzckD"
Content-Length: 0

<------------->
[2016-02-01 07:21:54] VERBOSE[2005] chan_sip.c: --- (8 headers 0 lines) ---
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK28055b0c;rport
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=bd5993ef28b67e3a282c182de47698f4.76a5
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Audio is at 14542
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Adding codec ulaw to SDP
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Adding codec alaw to SDP
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2016-02-01 07:21:54] VERBOSE[2005][C-00000030] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK7706c9c1;rport
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 INVITE
User-Agent: FPBX-13.0.54(13.5.0)
Proxy-Authorization: Digest username="xxxxxxxxx", realm="sipconnect.sipgate.de", algorithm=MD5, uri="sip:[email protected]:5060", nonce="Vq76rlau+YIbQB250S+BOwgFiCnEzckD", response="39ad3affd3d369c0e1508ec0def29785"
Date: Mon, 01 Feb 2016 06:21:54 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 277

v=0
o=root 1657529415 1657529416 IN IP4 212.79.184.96
s=Asterisk PBX 13.5.0
c=IN IP4 212.79.184.96
t=0 0
m=audio 14542 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---
[2016-02-01 07:21:54] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 103 INVITE
Content-Length: 0

<------------->
[2016-02-01 07:21:54] VERBOSE[2005] chan_sip.c: --- (7 headers 0 lines) ---
[2016-02-01 07:21:59] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
Record-Route: <sip:172.20.40.5;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=as7662db02>
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:[email protected]:5060>
Content-Length: 0

<------------->
[2016-02-01 07:21:59] VERBOSE[2005] chan_sip.c: --- (12 headers 0 lines) ---
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] sip/route.c: sip_route_dump: route/path hop: <sip:217.10.68.150;lr;ftag=as7662db02>
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] sip/route.c: sip_route_dump: route/path hop: <sip:172.20.40.5;lr>
[2016-02-01 07:21:59] VERBOSE[32230][C-00000030] app_dial.c: SIP/sipgate-00000030 is ringing
[2016-02-01 07:21:59] VERBOSE[3225] res_pjsip_logger.c: <--- Transmitting SIP response (534 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-xo0im76s8pp8
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=oG99649DzB-UEI2b-INGnhhZwR93RIBw
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.5.0)
Contact: <sip:212.79.184.96:5060>
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REGISTER, REFER
Content-Length:  0


[2016-02-01 07:21:59] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
Record-Route: <sip:172.20.40.5;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=as7662db02>
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 282

v=0
o=root 1115461770 1115461770 IN IP4 217.10.67.11
s=sipgate VoIP GW
c=IN IP4 217.10.67.11
t=0 0
m=audio 26488 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
[2016-02-01 07:21:59] VERBOSE[2005] chan_sip.c: --- (13 headers 13 lines) ---
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] sip/route.c: sip_route_dump: route/path hop: <sip:217.10.68.150;lr;ftag=as7662db02>
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] sip/route.c: sip_route_dump: route/path hop: <sip:172.20.40.5;lr>
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found RTP audio format 8
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found RTP audio format 0
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found RTP audio format 101
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found audio description format PCMA for ID 8
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found audio description format PCMU for ID 0
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Found audio description format telephone-event for ID 101
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Capabilities: us - (alaw|ulaw), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (alaw|ulaw)
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2016-02-01 07:21:59] VERBOSE[2005][C-00000030] chan_sip.c: Peer audio RTP is at port 217.10.67.11:26488
[2016-02-01 07:21:59] VERBOSE[32230][C-00000030] app_dial.c: SIP/sipgate-00000030 is making progress passing it to PJSIP/200-00000039
[2016-02-01 07:21:59] VERBOSE[18763] res_pjsip_logger.c: <--- Transmitting SIP response (890 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-xo0im76s8pp8
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=oG99649DzB-UEI2b-INGnhhZwR93RIBw
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.5.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REGISTER, REFER
Contact: <sip:212.79.184.96:5060>
Content-Type: application/sdp
Content-Length:   313

v=0
o=- 250730445 250730447 IN IP4 212.79.184.96
s=Asterisk
c=IN IP4 212.79.184.96
t=0 0
m=audio 14166 RTP/AVP 0 8 3 99 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 G726-32/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

[2016-02-01 07:22:02] VERBOSE[3225] res_pjsip_logger.c: <--- Transmitting SIP request (478 bytes) to UDP:192.168.120.25:5060 --->
OPTIONS sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5060;rport;branch=z9hG4bKPjLO1mLJgXWahhbq1h-0FkGF8OKQ5YllnM
From: <sip:[email protected]>;tag=c.6pHdUYJkIQxB5M96IJN7QF-4rtC3Uf
To: <sip:[email protected]>
Contact: <sip:[email protected]:5060>
Call-ID: i1MqlLlEBqP1Yibh0RMRJ9Mn-H.7qeaF
CSeq: 57813 OPTIONS
Max-Forwards: 70
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length:  0


[2016-02-01 07:22:02] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP response (651 bytes) from UDP:192.168.120.25:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 212.79.184.96:5060;rport=5060;branch=z9hG4bKPjLO1mLJgXWahhbq1h-0FkGF8OKQ5YllnM
From: <sip:[email protected]>;tag=c.6pHdUYJkIQxB5M96IJN7QF-4rtC3Uf
To: <sip:[email protected]>;tag=b.7qIeTXKjHPyC4L87HKO6PG-5suB2Tg
Call-ID: i1MqlLlEBqP1Yibh0RMRJ9Mn-H.7qeaF
CSeq: 57813 OPTIONS
Supported: replaces
User-Agent: N510 IP PRO/42.076.00.000.000
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp,application/dtmf-relay,application/simple-message-summary,message/sipfrag
Accept-Encoding: identity
Accept-Language: en
Content-Length: 0


[2016-02-01 07:22:02] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP request (409 bytes) from UDP:192.168.120.35:2048 --->
CANCEL sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.120.35:2048;branch=z9hG4bK-xo0im76s8pp8;rport
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>
Call-ID: 56aef9812d30-xr7b5681y73l
CSeq: 2 CANCEL
Max-Forwards: 70
Reason: SIP;cause=487;text="Request terminated by user"
Content-Length: 0


[2016-02-01 07:22:02] VERBOSE[3225] res_pjsip_logger.c: <--- Transmitting SIP response (383 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-xo0im76s8pp8
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=oG99649DzB-UEI2b-INGnhhZwR93RIBw
CSeq: 2 CANCEL
Server: FPBX-13.0.54(13.5.0)
Content-Length:  0


[2016-02-01 07:22:02] VERBOSE[3225] res_pjsip_logger.c: <--- Transmitting SIP response (510 bytes) to UDP:192.168.120.35:2048 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 192.168.120.35:2048;rport=2048;received=192.168.120.35;branch=z9hG4bK-xo0im76s8pp8
Call-ID: 56aef9812d30-xr7b5681y73l
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=oG99649DzB-UEI2b-INGnhhZwR93RIBw
CSeq: 2 INVITE
Server: FPBX-13.0.54(13.5.0)
Allow: OPTIONS, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REGISTER, REFER
Content-Length:  0


[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
CANCEL sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK7706c9c1;rport
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 103 CANCEL
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] app_macro.c: Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/200-00000039' in macro 'dialout-trunk'
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Spawn extension (from-internal, 0017516xxxx4, 6) exited non-zero on 'PJSIP/200-00000039'
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Executing [h@from-internal:1] Macro("PJSIP/200-00000039", "hangupcall") in new stack
[2016-02-01 07:22:02] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=b023696d0e38355785338c7ec56341c9-98c6
Call-ID: [email protected]
CSeq: 103 CANCEL
Content-Length: 0

<------------->
[2016-02-01 07:22:02] VERBOSE[2005] chan_sip.c: --- (7 headers 0 lines) ---
[2016-02-01 07:22:02] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0

<------------->
[2016-02-01 07:22:02] VERBOSE[2005] chan_sip.c: --- (9 headers 0 lines) ---
[2016-02-01 07:22:02] VERBOSE[2005][C-00000030] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK7706c9c1;rport
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-01 07:22:02] VERBOSE[2005][C-00000030] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/200-00000039", "1?theend") in new stack
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Goto (macro-hangupcall,s,3)
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/200-00000039", "0?Set(CDR(recordingfile)=)") in new stack
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Executing [s@macro-hangupcall:4] Hangup("PJSIP/200-00000039", "") in new stack
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/200-00000039' in macro 'hangupcall'
[2016-02-01 07:22:02] VERBOSE[32230][C-00000030] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/200-00000039'
[2016-02-01 07:22:02] VERBOSE[32231][C-00000030] app_mixmonitor.c: MixMonitor close filestream (mixed)
[2016-02-01 07:22:02] VERBOSE[32231][C-00000030] app_mixmonitor.c: End MixMonitor Recording PJSIP/200-00000039
[2016-02-01 07:22:02] VERBOSE[1991] res_pjsip_logger.c: <--- Received SIP request (446 bytes) from UDP:192.168.120.35:2048 --->
ACK sip:[email protected];user=phone SIP/2.0
Via: SIP/2.0/UDP 192.168.120.35:2048;branch=z9hG4bK-xo0im76s8pp8;rport
From: "Robert Schuster" <sip:[email protected]>;tag=p3lvdf2l3c
To: <sip:[email protected];user=phone>;tag=oG99649DzB-UEI2b-INGnhhZwR93RIBw
Call-ID: 56aef9812d30-xr7b5681y73l
CSeq: 2 ACK
Max-Forwards: 70
Contact: <sip:[email protected]:2048;line=je0exdpn>;reg-id=1
Content-Length: 0


[2016-02-01 07:22:03] VERBOSE[2005] chan_sip.c:
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK7706c9c1;rport=5061
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0

<------------->
[2016-02-01 07:22:03] VERBOSE[2005] chan_sip.c: --- (9 headers 0 lines) ---
[2016-02-01 07:22:03] VERBOSE[2005][C-00000030] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK7706c9c1;rport
Route: <sip:217.10.68.150;lr;ftag=as7662db02>,<sip:172.20.40.5;lr>
Max-Forwards: 70
From: "Robert Schuster" <sip:[email protected]:5061>;tag=as7662db02
To: <sip:[email protected]:5060>;tag=as216fcbb4
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---

ich werde mich heute - wenn etwas Zeit sein sollte - nochmal der prinzipiellen Idee von drive 92 widmen.
Ein erster Versuch gestern mit:
[p-header]
exten => sipgate,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:496***[email protected]>)
same => n,Return()
hat bei mir gar nichts gebracht - keinerlei Veränderung...
 
Zuletzt bearbeitet:
Hm, scheinbar werden PJSIP Header innerhalb des Macros nicht gesetzt, weil der Bezug zum Channel fehlt. Aber zumindest klappt das mit dem Pre-Dial handler schon mal, jetzt müssen wir nur noch ein Variable finden, wo die Callerid drin steht. In Callerid(num) steht ja witziger Weise die gerufene Nummer, statt der Callerid. Wäre glatt interessant, ob in ${EXTEN} dann die Callerid zu finden ist :gruebel:

Ansonsten probier mal die Variante 4, aber ändere im Macro das erste Set(CLIP=...) in Set(__CLIP=...) damit die Variable auf den gerufenen Channel vererbt wird.

Robert, bei Dir fehlt wahrscheinlich die Dial Option, damit der handler überhaupt aufgerufen wird. Steht etwas weiter vorne im Thread, was Du ja nur überflogen hast ;-)
 
Beides werde ich heute Abend berichten können. Kann in der Woche leider erst nach 17 Uhr an den Server, da er schon im "Produktivbetrieb" steht.

@rentier-s, ich will ja nichts sagen, aber du gibts mir mit jeden deiner Post Hoffnung, dass das Teil zum laufen kommt, danke dafür!
 
Zuletzt bearbeitet von einem Moderator:
fragt mich bitte nicht was ich da gebastelt habe...
meine /etc/asterisk/extensions_custom.conf sieht jetzt zumindest so aus (wobei der add-null Block schon drin war):
Code:
[add-null]
exten => _X.,1,NOOP("Entered [add-null]")
exten => _X.,n,Set(CALLERID(number)=0${CALLERID(number)})
exten => _X.,n,Set(CALLERID(name)=${CALLERID(number)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
include => from-pstn

[macro-dialout-trunk-predial-hook]
exten => s,1,Set(CALLERID(name)=${CDR(outbound_cnum)})
exten => s,n,Set(CALLERID(number)=SIPGATE-SIPID)
exten => s,n,SipAddHeader(P-Preferred-Identity: <sip:${CALLERID(num)@sipconnect.sipgate.de>)

und ich erreiche damit jetzt zumindest, dass Anrufe von der Nebenstelle 10 auf mein Handy (auch sipgate) als Absenderrufnummer die 0228 97xxx10 tragen.
Wie das auf anderen Voip- oder gar "normalen" Festnetz-Anschlüssen rüberkommt kann ich noch nicht sagen. Was ich machen muss, dass der Rückruf vom angerufenen Handy auch aus dem Ausland funktioniert - also +49 228 97xxx10 übertragen wird - keine Ahnung.
 
kleine Ergänzung noch zu meinem gestrigen Post:

Was die Zeile:
Code:
exten => s,n,Set(CALLERID(number)=SIPGATE-SIPID)
bringen soll ist mir nicht wirklich klar. Ich habe sie aus einem Readme von Sipgate - es funktioniert allerdings auch ohne.

Die Zeile:
Code:
exten => s,1,Set(CALLERID(name)=${CDR(outbound_cnum)})
wirft mir im Log unmittelbar nach der Ausführung eine Fehlermeldung
Code:
[2016-02-02 08:12:51] VERBOSE[16033][C-00000029] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/200-0000002a", "CALLERID(name)=4922897xxx10") in new stack
[2016-02-02 08:12:51] WARNING[16033][C-00000029] pbx.c: Error in extension logic (missing '}')
wo zur Hölle soll die schließende geschweifte Klammer fehlen?

Hier nochmals ein komplettes Log eines Anrufes mit der aktuellen config:
Code:
# asterisk -rvvvvv
# pjsip set logger on
# sip set debug on

# /etc/asterisk/extensions_custom.conf (nur meine Änderungen)
# [macro-dialout-trunk-predial-hook]
# exten => s,1,Set(CALLERID(name)=${CDR(outbound_cnum)})
# exten => s,n,Set(CALLERID(number)=SIPGATE-SIPID)
# exten => s,n,SipAddHeader(P-Preferred-Identity: <sip:${CALLERID(num)@sipconnect.sipgate.de>)

<------------->
[2016-02-02 08:23:43] VERBOSE[18256] chan_sip.c: --- (8 headers 0 lines) ---
[2016-02-02 08:23:43] NOTICE[18256] chan_sip.c: Outbound Registration: Expiry for sipconnect.sipgate.de is 120 sec (Scheduling reregistration in 105 s)
[2016-02-02 08:23:43] VERBOSE[18256] chan_sip.c: Really destroying SIP dialog '[email protected]' Method: REGISTER
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:1] Macro("PJSIP/200-0000002b", "user-callerid,LIMIT,EXTERNAL,") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:1] Set("PJSIP/200-0000002b", "TOUCH_MONITOR=1454397849.85") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:2] Set("PJSIP/200-0000002b", "AMPUSER=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:3] GotoIf("PJSIP/200-0000002b", "0?report") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:4] ExecIf("PJSIP/200-0000002b", "1?Set(REALCALLERIDNUM=200)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:5] Set("PJSIP/200-0000002b", "AMPUSER=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:6] GotoIf("PJSIP/200-0000002b", "0?limit") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:7] Set("PJSIP/200-0000002b", "AMPUSERCIDNAME=Robert (Snom 360)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:8] GotoIf("PJSIP/200-0000002b", "0?report") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:9] Set("PJSIP/200-0000002b", "AMPUSERCID=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:10] Set("PJSIP/200-0000002b", "__DIAL_OPTIONS=Ttr") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:11] Set("PJSIP/200-0000002b", "CALLERID(all)="Robert (Snom 360)" <200>") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:12] GotoIf("PJSIP/200-0000002b", "0?limit") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:13] ExecIf("PJSIP/200-0000002b", "1?Set(GROUP(concurrency_limit)=200)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:14] ExecIf("PJSIP/200-0000002b", "0?Set(CHANNEL(language)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:15] GotoIf("PJSIP/200-0000002b", "1?continue") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (macro-user-callerid,s,29)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:29] Set("PJSIP/200-0000002b", "CALLERID(number)=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:30] Set("PJSIP/200-0000002b", "CALLERID(name)=Robert (Snom 360)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:31] Set("PJSIP/200-0000002b", "CDR(cnum)=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:32] Set("PJSIP/200-0000002b", "CDR(cnam)=Robert (Snom 360)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-user-callerid:33] Set("PJSIP/200-0000002b", "CHANNEL(language)=en") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:2] Gosub("PJSIP/200-0000002b", "sub-record-check,s,1(out,0017516xxxx4,force)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:1] GotoIf("PJSIP/200-0000002b", "0?initialized") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:2] Set("PJSIP/200-0000002b", "__REC_STATUS=INITIALIZED") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:3] Set("PJSIP/200-0000002b", "NOW=1454397849") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:4] Set("PJSIP/200-0000002b", "__DAY=02") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:5] Set("PJSIP/200-0000002b", "__MONTH=02") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:6] Set("PJSIP/200-0000002b", "__YEAR=2016") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:7] Set("PJSIP/200-0000002b", "__TIMESTR=20160202-082409") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:8] Set("PJSIP/200-0000002b", "__FROMEXTEN=200") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:9] Set("PJSIP/200-0000002b", "__MON_FMT=wav") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:10] NoOp("PJSIP/200-0000002b", "Recordings initialized") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:11] ExecIf("PJSIP/200-0000002b", "0?Set(ARG3=dontcare)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:12] Set("PJSIP/200-0000002b", "REC_POLICY_MODE_SAVE=") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:13] ExecIf("PJSIP/200-0000002b", "0?Set(REC_STATUS=NO)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:14] GotoIf("PJSIP/200-0000002b", "3?checkaction") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (sub-record-check,s,17)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@sub-record-check:17] GotoIf("PJSIP/200-0000002b", "1?sub-record-check,out,1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (sub-record-check,out,1)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [out@sub-record-check:1] NoOp("PJSIP/200-0000002b", "Outbound Recording Check from 200 to 0017516xxxx4") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [out@sub-record-check:2] Set("PJSIP/200-0000002b", "RECMODE=dontcare") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [out@sub-record-check:3] ExecIf("PJSIP/200-0000002b", "1?Goto(routewins)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (sub-record-check,out,7)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [out@sub-record-check:7] Gosub("PJSIP/200-0000002b", "recordcheck,1(force,out,0017516xxxx4)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/200-0000002b", "Starting recording check against force") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:2] Goto("PJSIP/200-0000002b", "force") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (sub-record-check,recordcheck,5)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:5] Set("PJSIP/200-0000002b", "__REC_POLICY_MODE=FORCE") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:6] GotoIf("PJSIP/200-0000002b", "1?startrec") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (sub-record-check,recordcheck,16)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:16] NoOp("PJSIP/200-0000002b", "Starting recording: out, 0017516xxxx4") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:17] Set("PJSIP/200-0000002b", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:18] Set("PJSIP/200-0000002b", "__CALLFILENAME=out-0017516xxxx4-200-20160202-082409-1454397849.85") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:19] MixMonitor("PJSIP/200-0000002b", "2016/02/02/out-0017516xxxx4-200-20160202-082409-1454397849.85.wav,ai(LOCAL_MIXMON_ID),") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:20] Set("PJSIP/200-0000002b", "__MIXMON_ID=0x7fc890336800") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:21] Set("PJSIP/200-0000002b", "__RECORD_ID=PJSIP/200-0000002b") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:22] Set("PJSIP/200-0000002b", "__REC_STATUS=RECORDING") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:23] Set("PJSIP/200-0000002b", "CDR(recordingfile)=out-0017516xxxx4-200-20160202-082409-1454397849.85.wav") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [recordcheck@sub-record-check:24] Return("PJSIP/200-0000002b", "") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [out@sub-record-check:8] Return("PJSIP/200-0000002b", "") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:3] ExecIf("PJSIP/200-0000002b", "0 ?Set(CDR(accountcode)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16365][C-0000002a] app_mixmonitor.c: Begin MixMonitor Recording PJSIP/200-0000002b
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:4] Set("PJSIP/200-0000002b", "MOHCLASS=default") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:5] Set("PJSIP/200-0000002b", "_NODEST=") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [0017516xxxx4@from-internal:6] Macro("PJSIP/200-0000002b", "dialout-trunk,1,017516xxxx4,,off") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:1] Set("PJSIP/200-0000002b", "DIAL_TRUNK=1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:2] GosubIf("PJSIP/200-0000002b", "0?sub-pincheck,s,1()") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:3] GotoIf("PJSIP/200-0000002b", "0?disabletrunk,1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:4] Set("PJSIP/200-0000002b", "DIAL_NUMBER=017516xxxx4") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:5] Set("PJSIP/200-0000002b", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:6] Set("PJSIP/200-0000002b", "OUTBOUND_GROUP=OUT_1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/200-0000002b", "0?nomax") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:8] GotoIf("PJSIP/200-0000002b", "0?chanfull") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:9] GotoIf("PJSIP/200-0000002b", "0?skipoutcid") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:10] Set("PJSIP/200-0000002b", "DIAL_TRUNK_OPTIONS=Tt") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:11] Macro("PJSIP/200-0000002b", "outbound-callerid,1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:1] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERPRES(name-pres)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:2] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERPRES(num-pres)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:3] ExecIf("PJSIP/200-0000002b", "0?Set(REALCALLERIDNUM=200)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:4] GotoIf("PJSIP/200-0000002b", "1?normcid") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (macro-outbound-callerid,s,7)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:7] Set("PJSIP/200-0000002b", "USEROUTCID=Robert Schuster <4922897xxx10>") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:8] Set("PJSIP/200-0000002b", "EMERGENCYCID=") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:9] Set("PJSIP/200-0000002b", "TRUNKOUTCID=") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:10] GotoIf("PJSIP/200-0000002b", "1?trunkcid") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Goto (macro-outbound-callerid,s,15)
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERID(all)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:16] ExecIf("PJSIP/200-0000002b", "1?Set(CALLERID(all)=Robert Schuster <4922897xxx10>)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:17] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERID(all)=)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:18] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:19] ExecIf("PJSIP/200-0000002b", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:20] Set("PJSIP/200-0000002b", "CDR(outbound_cnum)=4922897xxx10") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-outbound-callerid:21] Set("PJSIP/200-0000002b", "CDR(outbound_cnam)=Robert Schuster") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:12] GosubIf("PJSIP/200-0000002b", "0?sub-flp-1,s,1()") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:13] Set("PJSIP/200-0000002b", "OUTNUM=017516xxxx4") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:14] Set("PJSIP/200-0000002b", "custom=SIP/sipgate") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:15] ExecIf("PJSIP/200-0000002b", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:16] ExecIf("PJSIP/200-0000002b", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:17] Macro("PJSIP/200-0000002b", "dialout-trunk-predial-hook,") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Set("PJSIP/200-0000002b", "CALLERID(name)=4922897xxx10") in new stack
[2016-02-02 08:24:09] WARNING[16364][C-0000002a] pbx.c: Error in extension logic (missing '}')
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:2] SIPAddHeader("PJSIP/200-0000002b", "P-Preferred-Identity: <sip:4922897xxx10") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:18] GotoIf("PJSIP/200-0000002b", "0?bypass,1") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:19] ExecIf("PJSIP/200-0000002b", "1?Set(CONNECTEDLINE(num,i)=017516xxxx4)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/200-0000002b", "1?Set(CONNECTEDLINE(name,i)=CID:4922897xxx10)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/200-0000002b", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)4922897xxx10)") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:22] GotoIf("PJSIP/200-0000002b", "0?customtrunk") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-dialout-trunk:23] Dial("PJSIP/200-0000002b", "SIP/sipgate/017516xxxx4,300,Tt") in new stack
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] netsock2.c: Using SIP RTP TOS bits 184
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] netsock2.c: Using SIP RTP CoS mark 5
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] chan_sip.c: Audio is at 18832
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] chan_sip.c: Adding codec ulaw to SDP
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] chan_sip.c: Adding codec alaw to SDP
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK13a93eb4;rport
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 INVITE
User-Agent: FPBX-13.0.54(13.5.0)
Date: Tue, 02 Feb 2016 07:24:09 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Preferred-Identity: <sip:4922897xxx10
Content-Type: application/sdp
Content-Length: 277

v=0
o=root 1496766298 1496766298 IN IP4 212.79.184.96
s=Asterisk PBX 13.5.0
c=IN IP4 212.79.184.96
t=0 0
m=audio 18832 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---
[2016-02-02 08:24:09] VERBOSE[16364][C-0000002a] app_dial.c: Called SIP/sipgate/017516xxxx4
[2016-02-02 08:24:09] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK13a93eb4;rport=5061
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=bd5993ef28b67e3a282c182de47698f4.d745
Call-ID: [email protected]
CSeq: 102 INVITE
Proxy-Authenticate: Digest realm="sipconnect.sipgate.de", nonce="VrBaxVawWZk/IkjrI7jI0r/HshHSJbpF"
Content-Length: 0

<------------->
[2016-02-02 08:24:09] VERBOSE[18256] chan_sip.c: --- (8 headers 0 lines) ---
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK13a93eb4;rport
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=bd5993ef28b67e3a282c182de47698f4.d745
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 102 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Audio is at 18832
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Adding codec ulaw to SDP
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Adding codec alaw to SDP
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Adding non-codec 0x1 (telephone-event) to SDP
[2016-02-02 08:24:09] VERBOSE[18256][C-0000002a] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK025c1f35;rport
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 INVITE
User-Agent: FPBX-13.0.54(13.5.0)
Proxy-Authorization: Digest username="xxxxxxxxx", realm="sipconnect.sipgate.de", algorithm=MD5, uri="sip:[email protected]:5060", nonce="VrBaxVawWZk/IkjrI7jI0r/HshHSJbpF", response="4374c1b16bc5d7b98fe4b3a118a5d763"
Date: Tue, 02 Feb 2016 07:24:09 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
P-Preferred-Identity: <sip:4922897xxx10
Content-Type: application/sdp
Content-Length: 277

v=0
o=root 1496766298 1496766299 IN IP4 212.79.184.96
s=Asterisk PBX 13.5.0
c=IN IP4 212.79.184.96
t=0 0
m=audio 18832 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv

---
[2016-02-02 08:24:09] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 103 INVITE
Content-Length: 0

<------------->
[2016-02-02 08:24:09] VERBOSE[18256] chan_sip.c: --- (7 headers 0 lines) ---
[2016-02-02 08:24:14] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
Record-Route: <sip:172.20.40.5;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=as54ed51d7>
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:[email protected]:5060>
Content-Length: 0

<------------->
[2016-02-02 08:24:14] VERBOSE[18256] chan_sip.c: --- (12 headers 0 lines) ---
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] sip/route.c: sip_route_dump: route/path hop: <sip:217.10.68.150;lr;ftag=as54ed51d7>
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] sip/route.c: sip_route_dump: route/path hop: <sip:172.20.40.5;lr>
[2016-02-02 08:24:14] VERBOSE[16364][C-0000002a] app_dial.c: SIP/sipgate-0000002a is ringing
[2016-02-02 08:24:14] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 183 Session Progress
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
Record-Route: <sip:172.20.40.5;lr>
Record-Route: <sip:217.10.68.150;lr;ftag=as54ed51d7>
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Contact: <sip:[email protected]:5060>
Content-Type: application/sdp
Content-Length: 284

v=0
o=root 1896212286 1896212286 IN IP4 217.10.67.135
s=sipgate VoIP GW
c=IN IP4 217.10.67.135
t=0 0
m=audio 24418 RTP/AVP 8 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv
<------------->
[2016-02-02 08:24:14] VERBOSE[18256] chan_sip.c: --- (13 headers 13 lines) ---
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] sip/route.c: sip_route_dump: route/path hop: <sip:217.10.68.150;lr;ftag=as54ed51d7>
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] sip/route.c: sip_route_dump: route/path hop: <sip:172.20.40.5;lr>
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found RTP audio format 8
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found RTP audio format 0
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found RTP audio format 101
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found audio description format PCMA for ID 8
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found audio description format PCMU for ID 0
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Found audio description format telephone-event for ID 101
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Capabilities: us - (alaw|ulaw), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (alaw|ulaw)
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
[2016-02-02 08:24:14] VERBOSE[18256][C-0000002a] chan_sip.c: Peer audio RTP is at port 217.10.67.135:24418
[2016-02-02 08:24:14] VERBOSE[16364][C-0000002a] app_dial.c: SIP/sipgate-0000002a is making progress passing it to PJSIP/200-0000002b
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] chan_sip.c: Reliably Transmitting (NAT) to 217.10.68.150:5060:
CANCEL sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK025c1f35;rport
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 103 CANCEL
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] app_macro.c: Spawn extension (macro-dialout-trunk, s, 23) exited non-zero on 'PJSIP/200-0000002b' in macro 'dialout-trunk'
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Spawn extension (from-internal, 0017516xxxx4, 6) exited non-zero on 'PJSIP/200-0000002b'
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Executing [h@from-internal:1] Macro("PJSIP/200-0000002b", "hangupcall") in new stack
[2016-02-02 08:24:16] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 200 canceling
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=b023696d0e38355785338c7ec56341c9-5386
Call-ID: [email protected]
CSeq: 103 CANCEL
Content-Length: 0

<------------->
[2016-02-02 08:24:16] VERBOSE[18256] chan_sip.c: --- (7 headers 0 lines) ---
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-hangupcall:1] GotoIf("PJSIP/200-0000002b", "1?theend") in new stack
[2016-02-02 08:24:16] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0

<------------->
[2016-02-02 08:24:16] VERBOSE[18256] chan_sip.c: --- (9 headers 0 lines) ---
[2016-02-02 08:24:16] VERBOSE[18256][C-0000002a] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK025c1f35;rport
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
[2016-02-02 08:24:16] VERBOSE[18256][C-0000002a] chan_sip.c: Scheduling destruction of SIP dialog '[email protected]' in 32000 ms (Method: INVITE)
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Goto (macro-hangupcall,s,3)
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-hangupcall:3] ExecIf("PJSIP/200-0000002b", "0?Set(CDR(recordingfile)=)") in new stack
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Executing [s@macro-hangupcall:4] Hangup("PJSIP/200-0000002b", "") in new stack
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/200-0000002b' in macro 'hangupcall'
[2016-02-02 08:24:16] VERBOSE[16364][C-0000002a] pbx.c: Spawn extension (from-internal, h, 1) exited non-zero on 'PJSIP/200-0000002b'
[2016-02-02 08:24:16] VERBOSE[16365][C-0000002a] app_mixmonitor.c: MixMonitor close filestream (mixed)
[2016-02-02 08:24:16] VERBOSE[16365][C-0000002a] app_mixmonitor.c: End MixMonitor Recording PJSIP/200-0000002b
[2016-02-02 08:24:17] VERBOSE[18256] chan_sip.c: 
<--- SIP read from UDP:217.10.68.150:5060 --->
SIP/2.0 487 Request Terminated
Via: SIP/2.0/UDP 212.79.184.96:5061;received=212.79.184.96;branch=z9hG4bK025c1f35;rport=5061
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Call-ID: [email protected]
CSeq: 103 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces
Content-Length: 0

<------------->
[2016-02-02 08:24:17] VERBOSE[18256] chan_sip.c: --- (9 headers 0 lines) ---
[2016-02-02 08:24:17] VERBOSE[18256][C-0000002a] chan_sip.c: Transmitting (NAT) to 217.10.68.150:5060:
ACK sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 212.79.184.96:5061;branch=z9hG4bK025c1f35;rport
Route: <sip:217.10.68.150;lr;ftag=as54ed51d7>,<sip:172.20.40.5;lr>
Max-Forwards: 70
From: "4922897xxx10" <sip:[email protected]:5061>;tag=as54ed51d7
To: <sip:[email protected]:5060>;tag=as0b094e3c
Contact: <sip:[email protected]:5061>
Call-ID: [email protected]
CSeq: 103 ACK
User-Agent: FPBX-13.0.54(13.5.0)
Content-Length: 0


---
 
Hab ich gestern glatt übersehen, anders als drive92 verwendest Du sipgate als SIP Peer. Da funktioniert das Macro mit SipAddHeader.
Das CALLERID(num)=sipgate-id ist ein Relikt aus sipgate Basic Zeiten, bei Trunking ist das hinfällig.
Wo die Klammer fehlen soll finde ich grad auch nicht.

@drive92, Männer greifen halt gleich zum Hammer, wenn etwas nicht so läuft wie sie wollen. Frauen dagegen finden immer einen Weg um ans Ziel zu gelangen, egal wie lange es dauert ;-)
 
Hallo,
ich wollte mich eigentlich nur für diesen Beitrag bedanken. Ohne diesen hätte ich die Lösung nicht geschafft.
Habe das gleiche Problem mit der Aussendung von p-preferred-identity für den Provider toplink-xpress. Aktuell ist die Freepbx Version 13.0.131

Die Lösung bei mir sieht folgendermaßen aus: in der extension_custom.conf steht:

[macro-dialout-trunk-predial-hook]
exten => s,1,Set(__CLIP=${CALLERID(num)})

[p-header]
exten => toplink,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CLIP}@sip.toplink-xpress.de>)
same => n,Return()


Mit dem 1. Eintrag wird die richtige abgehende CALLERID in die Variable CLIP übergeben. (Danke an rentier-s mit dem Hinweis __CLIP) für die Vererbung an das 2. Macro.

Der 2. Eintrag setzt dann über CLIP die CALLERIDs welche in der Freepbx eingetragen werden können. (Danke an drive92 für die Variante 4)

P.S. Bei einer Rufweiterleitung z.B. über IVR wird sogar die Rufnummer des weitergeleiteten Anrufers angezeigt.
 
Ich komme hier auch nicht wirklich weiter, habe das gleiche Problem. Asterisk (vanilla) hier auf FreeBSD, also ohne GUI oder reingebastelte Makros.

Keine der unten stehenden Varianten funktioniert (immer nur die Fallbacknummer von Sipgate). In FreePBX funktionierte es einfach mit
Code:
"490002"
in CID bzw.
Code:
"hidden"
zur Nummernunterdrückung.

Code:
exten => _2.,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)="490002" <sip:[email protected]>)
Code:
exten => _2.,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)= <sip:[email protected]>)
Code:
exten => _2.,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:[email protected]>)
Code:
exten => _2.,1,Set(PJSIP_HEADER(add,P-Preferred-Identity)=sip:[email protected])


Könntet ihr mal eure pjsip.conf posten? Ohne Nummer und Passwörter versteht sich....

send_pai und trust_id_inbound im endpoint-kontext sind mir da noch nicht ganz klar....

- - - Aktualisiert - - -

Ich habe es hinbekommen.

Es wird rein in den Extensions gelöst.

Code:
[[COLOR=#ff0000]49000_raus[/COLOR]]
exten => _1.,1,NoOp()
same => n,Dial(PJSIP/${EXTEN:1}@sipgate,,b([COLOR=#ff0000]49000_raus[/COLOR]^[COLOR=#008080]addheader[/COLOR]^1))
same => n,Hangup
exten => [COLOR=#008080]addheader[/COLOR],1,Set(PJSIP_HEADER(add,P-Preferred-Identity)= <sip:[email protected]>)

Nachzulesen hier:

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_PJSIP_HEADER

Code:
                     Note
                             Icon                                               If you call PJSIP_HEADER in a normal dialplan context you'll be operating on the [B]caller's (incoming)[/B] channel which may not be what you want. To operate on the [B]callee's (outgoing)[/B] channel call PJSIP_HEADER in a pre-dial handler.
  Example:
  ;
  [handler]
  exten => addheader,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)
  exten => addheader,2,Set(PJSIP_HEADER(add,X-MyHeader2)=myvalue2)
  ;
  [somecontext]
  exten => 1,1,Dial(PJSIP/${EXTEN},,b(handler^addheader^1))
  ;

Und hier:

https://issues.asterisk.org/jira/browse/ASTERISK-25790
 
Zuletzt bearbeitet:
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.