hi,
i have the problem that an outbound route which should be used by a dedicated extension is not chosen.
if i chose another extension registered to number 61 it works. this number is configured on a yealink t46s.
extension 66 is not working. this device is registered on a freeswitch server. registration works fine, calling works fine - but the default route is always chosen.
i guess it is caused by the contact-line the endpoint uses:
Contact: 66/sip:[email protected]:59557;transp a92f971a71 Avail 0.665
i was able to tweak freeswitch to use 66 in its invite in the contact line. but nevertheless asterisk choses the wrong outbound route.
any idea?
Console verbose was OFF and is now 33.
== Using SIP RTP Audio TOS bits 184
== Using SIP RTP Audio CoS mark 5
-- Executing [01233999999@from-internal:1] Macro("PJSIP/66-0000058c", "user-callerid,LIMIT,EXTERNAL,") in new stack
-- Executing [s@macro-user-callerid:1] Set("PJSIP/66-0000058c", "TOUCH_MONITOR=1692634435.1528") in new stack
-- Executing [s@macro-user-callerid:2] Set("PJSIP/66-0000058c", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:3] Set("PJSIP/66-0000058c", "CHANCONTEXT=") in new stack
-- Executing [s@macro-user-callerid:4] Set("PJSIP/66-0000058c", "CHANEXTENCONTEXT=66-0000058c") in new stack
-- Executing [s@macro-user-callerid:5] Set("PJSIP/66-0000058c", "CHANEXTEN=66-0000058c") in new stack
-- Executing [s@macro-user-callerid:6] Set("PJSIP/66-0000058c", "CALLERID(number)=0000000000") in new stack
-- Executing [s@macro-user-callerid:7] Set("PJSIP/66-0000058c", "AMPUSER=0000000000") in new stack
-- Executing [s@macro-user-callerid:8] Set("PJSIP/66-0000058c", "HOTDESCKCHAN=66-0000058c") in new stack
-- Executing [s@macro-user-callerid:9] Set("PJSIP/66-0000058c", "HOTDESKEXTEN=66") in new stack
-- Executing [s@macro-user-callerid:10] Set("PJSIP/66-0000058c", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-user-callerid:11] ExecIf("PJSIP/66-0000058c", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-user-callerid:12] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-user-callerid:13] GotoIf("PJSIP/66-0000058c", "0?report") in new stack
-- Executing [s@macro-user-callerid:14] ExecIf("PJSIP/66-0000058c", "1?Set(REALCALLERIDNUM=0000000000)") in new stack
-- Executing [s@macro-user-callerid:15] Set("PJSIP/66-0000058c", "AMPUSER=") in new stack
-- Executing [s@macro-user-callerid:16] GotoIf("PJSIP/66-0000058c", "0?limit") in new stack
-- Executing [s@macro-user-callerid:17] Set("PJSIP/66-0000058c", "AMPUSERCIDNAME=") in new stack
-- Executing [s@macro-user-callerid:18] ExecIf("PJSIP/66-0000058c", "0?Set(__CIDMASQUERADING=TRUE)") in new stack
-- Executing [s@macro-user-callerid:19] GotoIf("PJSIP/66-0000058c", "1?report") in new stack
-- Goto (macro-user-callerid,s,28)
-- Executing [s@macro-user-callerid:28] NoOp("PJSIP/66-0000058c", "Macro Depth is 1") in new stack
-- Executing [s@macro-user-callerid:29] GotoIf("PJSIP/66-0000058c", "1?report2:macroerror") in new stack
-- Goto (macro-user-callerid,s,30)
-- Executing [s@macro-user-callerid:30] GotoIf("PJSIP/66-0000058c", "1?continue") in new stack
-- Goto (macro-user-callerid,s,48)
-- Executing [s@macro-user-callerid:48] Set("PJSIP/66-0000058c", "CALLERID(number)=0000000000") in new stack
-- Executing [s@macro-user-callerid:49] Set("PJSIP/66-0000058c", "CALLERID(name)=") in new stack
-- Executing [s@macro-user-callerid:50] GotoIf("PJSIP/66-0000058c", "1?cnum") in new stack
-- Goto (macro-user-callerid,s,52)
-- Executing [s@macro-user-callerid:52] Set("PJSIP/66-0000058c", "CDR(cnum)=0000000000") in new stack
-- Executing [s@macro-user-callerid:53] Set("PJSIP/66-0000058c", "CHANNEL(language)=de_DE") in new stack
-- Executing [01233999999@from-internal:2] Gosub("PJSIP/66-0000058c", "sub-record-check,s,1(out,01233999999,dontcare)") in new stack
-- Executing [s@sub-record-check:1] GotoIf("PJSIP/66-0000058c", "0?initialized") in new stack
-- Executing [s@sub-record-check:2] Set("PJSIP/66-0000058c", "__REC_STATUS=INITIALIZED") in new stack
-- Executing [s@sub-record-check:3] Set("PJSIP/66-0000058c", "NOW=1692634435") in new stack
-- Executing [s@sub-record-check:4] Set("PJSIP/66-0000058c", "__DAY=21") in new stack
-- Executing [s@sub-record-check:5] Set("PJSIP/66-0000058c", "__MONTH=08") in new stack
-- Executing [s@sub-record-check:6] Set("PJSIP/66-0000058c", "__YEAR=2023") in new stack
-- Executing [s@sub-record-check:7] Set("PJSIP/66-0000058c", "__TIMESTR=20230821-181355") in new stack
-- Executing [s@sub-record-check:8] Set("PJSIP/66-0000058c", "__FROMEXTEN=0000000000") in new stack
-- Executing [s@sub-record-check:9] Set("PJSIP/66-0000058c", "__MON_FMT=wav") in new stack
-- Executing [s@sub-record-check:10] NoOp("PJSIP/66-0000058c", "Recordings initialized") in new stack
-- Executing [s@sub-record-check:11] ExecIf("PJSIP/66-0000058c", "0?Set(ARG3=dontcare)") in new stack
-- Executing [s@sub-record-check:12] Set("PJSIP/66-0000058c", "REC_POLICY_MODE_SAVE=") in new stack
-- Executing [s@sub-record-check:13] ExecIf("PJSIP/66-0000058c", "0?Set(REC_STATUS=NO)") in new stack
-- Executing [s@sub-record-check:14] GotoIf("PJSIP/66-0000058c", "3?checkaction") in new stack
-- Goto (sub-record-check,s,17)
-- Executing [s@sub-record-check:17] GotoIf("PJSIP/66-0000058c", "1?sub-record-check,out,1") in new stack
-- Goto (sub-record-check,out,1)
-- Executing [out@sub-record-check:1] NoOp("PJSIP/66-0000058c", "Outbound Recording Check from 0000000000 to 01233999999") in new stack
-- Executing [out@sub-record-check:2] Set("PJSIP/66-0000058c", "RECMODE=") in new stack
-- Executing [out@sub-record-check:3] ExecIf("PJSIP/66-0000058c", "1?Goto(routewins)") in new stack
-- Goto (sub-record-check,out,7)
-- Executing [out@sub-record-check:7] Gosub("PJSIP/66-0000058c", "recordcheck,1(dontcare,out,01233999999)") in new stack
-- Executing [recordcheck@sub-record-check:1] NoOp("PJSIP/66-0000058c", "Starting recording check against dontcare") in new stack
-- Executing [recordcheck@sub-record-check:2] Goto("PJSIP/66-0000058c", "dontcare") in new stack
-- Goto (sub-record-check,recordcheck,3)
-- Executing [recordcheck@sub-record-check:3] Return("PJSIP/66-0000058c", "") in new stack
-- Executing [out@sub-record-check:8] Return("PJSIP/66-0000058c", "") in new stack
-- Executing [01233999999@from-internal:3] Set("PJSIP/66-0000058c", "_ROUTEID=5") in new stack
-- Executing [01233999999@from-internal:4] Set("PJSIP/66-0000058c", "_ROUTENAME=Default_4000") in new stack
-- Executing [01233999999@from-internal:5] Set("PJSIP/66-0000058c", "EMERGENCYROUTE=YES") in new stack
-- Executing [01233999999@from-internal:6] Set("PJSIP/66-0000058c", "MOHCLASS=default") in new stack
-- Executing [01233999999@from-internal:7] Set("PJSIP/66-0000058c", "_CALLERIDNAMEINTERNAL=") in new stack
-- Executing [01233999999@from-internal:8] Set("PJSIP/66-0000058c", "_CALLERIDNUMINTERNAL=0000000000") in new stack
-- Executing [01233999999@from-internal:9] Set("PJSIP/66-0000058c", "_EMAILNOTIFICATION=FALSE") in new stack
-- Executing [01233999999@from-internal:10] Set("PJSIP/66-0000058c", "_NODEST=") in new stack
-- Executing [01233999999@from-internal:11] Macro("PJSIP/66-0000058c", "dialout-trunk,9,01233999999,,on") in new stack
-- Executing [s@macro-dialout-trunk:1] Set("PJSIP/66-0000058c", "DIAL_TRUNK=9") in new stack
-- Executing [s@macro-dialout-trunk:2] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_OPTIONS=tr)") in new stack
-- Executing [s@macro-dialout-trunk:3] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_OPTIONS=Tr)") in new stack
-- Executing [s@macro-dialout-trunk:4] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_OPTIONS=tr)") in new stack
-- Executing [s@macro-dialout-trunk:5] GosubIf("PJSIP/66-0000058c", "0?sub-pincheck,s,1()") in new stack
-- Executing [s@macro-dialout-trunk:6] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(num)=)") in new stack
-- Executing [s@macro-dialout-trunk:7] GotoIf("PJSIP/66-0000058c", "0?disabletrunk,1") in new stack
-- Executing [s@macro-dialout-trunk:8] Set("PJSIP/66-0000058c", "DIAL_NUMBER=01233999999") in new stack
-- Executing [s@macro-dialout-trunk:9] Set("PJSIP/66-0000058c", "DIAL_TRUNK_OPTIONS=Ttr") in new stack
-- Executing [s@macro-dialout-trunk:10] Set("PJSIP/66-0000058c", "OUTBOUND_GROUP=OUT_9") in new stack
-- Executing [s@macro-dialout-trunk:11] Set("PJSIP/66-0000058c", "DIAL_TRUNK_OPTIONS=Tt") in new stack
-- Executing [s@macro-dialout-trunk:12] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_TRUNK_OPTIONS=t)") in new stack
-- Executing [s@macro-dialout-trunk:13] GotoIf("PJSIP/66-0000058c", "1?nomax") in new stack
-- Goto (macro-dialout-trunk,s,15)
-- Executing [s@macro-dialout-trunk:15] GotoIf("PJSIP/66-0000058c", "0?skipoutcid") in new stack
-- Executing [s@macro-dialout-trunk:16] Macro("PJSIP/66-0000058c", "outbound-callerid,9") in new stack
-- Executing [s@macro-outbound-callerid:1] NoOp("PJSIP/66-0000058c", "0000000000") in new stack
-- Executing [s@macro-outbound-callerid:2] NoOp("PJSIP/66-0000058c", "") in new stack
-- Executing [s@macro-outbound-callerid:3] NoOp("PJSIP/66-0000058c", "all") in new stack
-- Executing [s@macro-outbound-callerid:4] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(name-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:5] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(num-pres)=)") in new stack
-- Executing [s@macro-outbound-callerid:6] Set("PJSIP/66-0000058c", "HOTDESCKCHAN=66-0000058c") in new stack
-- Executing [s@macro-outbound-callerid:7] Set("PJSIP/66-0000058c", "HOTDESKEXTEN=66") in new stack
-- Executing [s@macro-outbound-callerid:8] Set("PJSIP/66-0000058c", "HOTDESKCALL=0") in new stack
-- Executing [s@macro-outbound-callerid:9] ExecIf("PJSIP/66-0000058c", "0?Set(HOTDESKCALL=1)") in new stack
-- Executing [s@macro-outbound-callerid:10] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(name)=)") in new stack
-- Executing [s@macro-outbound-callerid:11] Set("PJSIP/66-0000058c", "ALLOWTHISROUTE=NO") in new stack
-- Executing [s@macro-outbound-callerid:12] ExecIf("PJSIP/66-0000058c", "1?Set(ALLOWTHISROUTE=YES)") in new stack
-- Executing [s@macro-outbound-callerid:13] ExecIf("PJSIP/66-0000058c", "0?Hangup()") in new stack
-- Executing [s@macro-outbound-callerid:14] ExecIf("PJSIP/66-0000058c", "0?Set(REALCALLERIDNUM=0000000000)") in new stack
-- Executing [s@macro-outbound-callerid:15] ExecIf("PJSIP/66-0000058c", "0?Set(AMPUSER=0000000000)") in new stack
-- Executing [s@macro-outbound-callerid:16] GotoIf("PJSIP/66-0000058c", "1?normcid") in new stack
-- Goto (macro-outbound-callerid,s,20)
-- Executing [s@macro-outbound-callerid:20] Set("PJSIP/66-0000058c", "USEROUTCID=") in new stack
-- Executing [s@macro-outbound-callerid:21] Set("PJSIP/66-0000058c", "EMERGENCYCID=") in new stack
-- Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/66-0000058c", "0?Set(EMERGENCYCID=)") in new stack
-- Executing [s@macro-outbound-callerid:23] Set("PJSIP/66-0000058c", "TRUNKOUTCID=<+4923684000>") in new stack
-- Executing [s@macro-outbound-callerid:24] GotoIf("PJSIP/66-0000058c", "1?trunkcid") in new stack
-- Goto (macro-outbound-callerid,s,30)
-- Executing [s@macro-outbound-callerid:30] ExecIf("PJSIP/66-0000058c", "1?Set(CALLERID(all)=<+4923684000>)") in new stack
-- Executing [s@macro-outbound-callerid:31] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(all)=)") in new stack
-- Executing [s@macro-outbound-callerid:32] ExecIf("PJSIP/66-0000058c", "1?Set(CALLERID(all)=<+4923684000>)") in new stack
-- Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(all)=0000000000)") in new stack
-- Executing [s@macro-outbound-callerid:34] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(all)=0000000000)") in new stack
-- Executing [s@macro-outbound-callerid:35] Set("PJSIP/66-0000058c", "TIOHIDE=no") in new stack
-- Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:38] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(name-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:39] ExecIf("PJSIP/66-0000058c", "0?Set(CALLERID(num-pres)=prohib_passed_screen)") in new stack
-- Executing [s@macro-outbound-callerid:40] Set("PJSIP/66-0000058c", "CDR(outbound_cnum)=+4923684000") in new stack
-- Executing [s@macro-outbound-callerid:41] Set("PJSIP/66-0000058c", "CDR(outbound_cnam)=") in new stack
-- Executing [s@macro-dialout-trunk:17] GosubIf("PJSIP/66-0000058c", "1?sub-flp-9,s,1()") in new stack
-- Executing [s@sub-flp-9:1] ExecIf("PJSIP/66-0000058c", "0?Set(TARGET_FLP_9=0123801233999999)") in new stack
-- Executing [s@sub-flp-9:2] GotoIf("PJSIP/66-0000058c", "0?match") in new stack
-- Executing [s@sub-flp-9:3] ExecIf("PJSIP/66-0000058c", "0?Set(TARGET_FLP_9=0123801233999999)") in new stack
-- Executing [s@sub-flp-9:4] GotoIf("PJSIP/66-0000058c", "0?match") in new stack
-- Executing [s@sub-flp-9:5] ExecIf("PJSIP/66-0000058c", "0?Set(TARGET_FLP_9=0123801233999999)") in new stack
-- Executing [s@sub-flp-9:6] GotoIf("PJSIP/66-0000058c", "0?match") in new stack
-- Executing [s@sub-flp-9:7] Return("PJSIP/66-0000058c", "") in new stack
-- Executing [s@macro-dialout-trunk:18] Set("PJSIP/66-0000058c", "OUTNUM=01233999999") in new stack
-- Executing [s@macro-dialout-trunk:19] Set("PJSIP/66-0000058c", "custom=PJSIP") in new stack
-- Executing [s@macro-dialout-trunk:20] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)Tt)") in new stack
-- Executing [s@macro-dialout-trunk:21] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_TRUNK_OPTIONS=TtM(confirm))") in new stack
-- Executing [s@macro-dialout-trunk:22] Macro("PJSIP/66-0000058c", "dialout-trunk-predial-hook,") in new stack
-- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("PJSIP/66-0000058c", "") in new stack
-- Executing [s@macro-dialout-trunk:23] GotoIf("PJSIP/66-0000058c", "0?bypass,1") in new stack
-- Executing [s@macro-dialout-trunk:24] ExecIf("PJSIP/66-0000058c", "0?Set(CONNECTEDLINE(num,i)=01233999999)") in new stack
-- Executing [s@macro-dialout-trunk:25] ExecIf("PJSIP/66-0000058c", "0?Set(CONNECTEDLINE(name,i)=CID:+4923684000)") in new stack
-- Executing [s@macro-dialout-trunk:26] ExecIf("PJSIP/66-0000058c", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)+4923684000)") in new stack
-- Executing [s@macro-dialout-trunk:27] GotoIf("PJSIP/66-0000058c", "0?customtrunk") in new stack
-- Executing [s@macro-dialout-trunk:28] ExecIf("PJSIP/66-0000058c", "0?Set(DIAL_TRUNK_OPTIONS=t)") in new stack
-- Executing [s@macro-dialout-trunk:29] Set("PJSIP/66-0000058c", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack
-- Executing [s@macro-dialout-trunk:30] Dial("PJSIP/66-0000058c", "PJSIP/01233999999@pjsip_telekom_0123456789,300,Ttb(func-apply-sipheaders^s^1,(9))U(sub-send-obroute-email^01233999999^01233999999^9^1692634435^^+4923684000)") in new stack
-- PJSIP/pjsip_telekom_0123456789-0000058d Internal Gosub(func-apply-sipheaders,s,1(9)) start
-- Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/pjsip_telekom_0123456789-0000058d", "Applying SIP Headers to channel PJSIP/pjsip_telekom_0123456789-0000058d") in new stack
-- Executing [s@func-apply-sipheaders:2] Set("PJSIP/pjsip_telekom_0123456789-0000058d", "TECH=PJSIP") in new stack
-- Executing [s@func-apply-sipheaders:3] Set("PJSIP/pjsip_telekom_0123456789-0000058d", "SIPHEADERKEYS=Alert-Info") in new stack
-- Executing [s@func-apply-sipheaders:4] While("PJSIP/pjsip_telekom_0123456789-0000058d", "1") in new stack
-- Executing [s@func-apply-sipheaders:5] Set("PJSIP/pjsip_telekom_0123456789-0000058d", "sipheader=unset") in new stack
-- Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/pjsip_telekom_0123456789-0000058d", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
[2023-08-21 18:13:55] ERROR[31352]: res_pjsip_header_funcs.c:717 remove_header: No headers had been previously added to this session.
-- Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/pjsip_telekom_0123456789-0000058d", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack
-- Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/pjsip_telekom_0123456789-0000058d", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack
-- Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/pjsip_telekom_0123456789-0000058d", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
-- Executing [s@func-apply-sipheaders:10] EndWhile("PJSIP/pjsip_telekom_0123456789-0000058d", "") in new stack
-- Executing [s@func-apply-sipheaders:4] While("PJSIP/pjsip_telekom_0123456789-0000058d", "0") in new stack
-- Executing [s@func-apply-sipheaders:11] Return("PJSIP/pjsip_telekom_0123456789-0000058d", "") in new stack
== Spawn extension (func-apply-sipheaders, s, 11) exited non-zero on 'PJSIP/pjsip_telekom_0123456789-0000058d'
-- PJSIP/pjsip_telekom_0123456789-0000058d Internal Gosub(func-apply-sipheaders,s,1(9)) complete GOSUB_RETVAL=
-- Called PJSIP/01233999999@pjsip_telekom_0123456789
> 0x7ff63808c1c0 -- Strict RTP learning after remote address set to: a.b.c.d:55876
-- PJSIP/pjsip_telekom_0123456789-0000058d answered PJSIP/66-0000058c
-- PJSIP/pjsip_telekom_0123456789-0000058d Internal Gosub(sub-send-obroute-email,s,1(01233999999,01233999999,9,1692634435,,+4923684000)) start
-- Executing [s@sub-send-obroute-email:1] GotoIf("PJSIP/pjsip_telekom_0123456789-0000058d", "0?sendEmail") in new stack
-- Executing [s@sub-send-obroute-email:2] NoOp("PJSIP/pjsip_telekom_0123456789-0000058d", "email notifications disabled..exiting.") in new stack
-- Executing [s@sub-send-obroute-email:3] Return("PJSIP/pjsip_telekom_0123456789-0000058d", "") in new stack
== Spawn extension (sub-send-obroute-email, s, 3) exited non-zero on 'PJSIP/pjsip_telekom_0123456789-0000058d'
-- PJSIP/pjsip_telekom_0123456789-0000058d Internal Gosub(sub-send-obroute-email,s,1(01233999999,01233999999,9,1692634435,,+4923684000)) complete GOSUB_RETVAL=
> 0x7ff6280076a0 -- Strict RTP learning after remote address set to: 10.x.y.66:30760
-- Channel PJSIP/pjsip_telekom_0123456789-0000058d joined 'simple_bridge' basic-bridge <07e2735d-e647-456c-a3fa-07593f2aa6ce>
-- Channel PJSIP/66-0000058c joined 'simple_bridge' basic-bridge <07e2735d-e647-456c-a3fa-07593f2aa6ce>
> 0x7ff6280076a0 -- Strict RTP switching to RTP target address 10.x.y.66:30760 as source
> 0x7ff63808c1c0 -- Strict RTP switching to RTP target address a.b.c.d:55876 as source
> 0x7ff63808c1c0 -- Strict RTP learning complete - Locking on source address a.b.c.d:55876
> 0x7ff6280076a0 -- Strict RTP learning complete - Locking on source address 10.x.y.66:30760
pbx-sys-1*CLI>