Pjsip custom header - cant dial out!


(Hans Max) #1

Freepbx15 Distro iso with Asterisk16

i changed my system from both sip and pjsip to only pjsip cause my phones will be only websockets in the future and with pjsip its working a bit better at this end.
The problem now, i had to unload the sip module and now need to add my prodiver as pjsip.
Inbound Calls working. No Problem, but outbound istn working.

When i dial i get the msg (Everyone is busy/congested at this time (1:0/0/1))

1108	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: PJSIP/107-00000004 Internal Gosub(custom-sip-header,s,1) start	
1109	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@custom-sip-header:1] NoOp("PJSIP/107-00000004", "entering user defined context custom-sip-header in extensions_custom.conf") in new stack	
1110	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@custom-sip-header:2] Set("PJSIP/107-00000004", "PJSIP_HEADER(add,P-Preferred-Identity)=<sip:49449xxxxx@fpbx.de>") in new stack	
1111	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@custom-sip-header:3] Dial("PJSIP/107-00000004", "PJSIP/49449xxxxxx@fpbx.de") in new stack	
1112	[2021-01-18 17:54:54] ERROR[2222] chan_pjsip.c: Unable to create PJSIP channel - endpoint 'fpbx.de' was not found	
1113	[2021-01-18 17:54:54] WARNING[5297][C-00000003] app_dial.c: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)	
1114	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_dial.c: No devices or endpoints to dial (technology/resource)	
1115	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@custom-sip-header:4] Return("PJSIP/107-00000004", "") in new stack	
1116	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: Spawn extension (macro-dialout-trunk, s, 34) exited non-zero on 'PJSIP/107-00000004'	
1117	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: PJSIP/107-00000004 Internal Gosub(custom-sip-header,s,1) complete GOSUB_RETVAL=	
1118	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: PJSIP/PLACETEL_PJSIP-00000005 Internal Gosub(func-apply-sipheaders,s,1(3)) start	
1119	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/PLACETEL_PJSIP-00000005", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack	
1120	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/PLACETEL_PJSIP-00000005", "Applying SIP Headers to channel PJSIP/PLACETEL_PJSIP-00000005") in new stack	
1121	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/PLACETEL_PJSIP-00000005", "TECH=PJSIP") in new stack	
1122	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/PLACETEL_PJSIP-00000005", "SIPHEADERKEYS=Alert-Info") in new stack	
1123	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-00000005", "1") in new stack	
1124	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/PLACETEL_PJSIP-00000005", "sipheader=unset") in new stack	
1125	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/PLACETEL_PJSIP-00000005", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack	
1126	[2021-01-18 17:54:54] ERROR[2222] res_pjsip_header_funcs.c: No headers had been previously added to this session.	
1127	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/PLACETEL_PJSIP-00000005", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack	
1128	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/PLACETEL_PJSIP-00000005", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack	
1129	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/PLACETEL_PJSIP-00000005", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack	
1130	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/PLACETEL_PJSIP-00000005", "") in new stack	
1131	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-00000005", "0") in new stack	
1132	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] pbx.c: Executing [s@func-apply-sipheaders:12] Return("PJSIP/PLACETEL_PJSIP-00000005", "") in new stack	
1133	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: Spawn extension (from-trunk, 0151xxxxxx, 1) exited non-zero on 'PJSIP/PLACETEL_PJSIP-00000005'	
1134	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_stack.c: PJSIP/PLACETEL_PJSIP-00000005 Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=	
1135	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_dial.c: Called PJSIP/0151xxxxxxx@PLACETEL_PJSIP	
1136	[2021-01-18 17:54:54] VERBOSE[5297][C-00000003] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)

i think the problem is the sip-header. Placetel wants sth like

>     SipAddHeader(P-Preferred-Identity: <sip:the number wich shall be shown>@fpbx.de>)
>     Dial(SIP/the number wich shall be shown@placetel.de)

something like this does not work…

[custom-sip-header]
; add "B(custom-sip-header^s^1)" (without quotes) to the dial options of a trunk in addition to the defaults already there
; this only affects calls on specific trunks
exten => s,1,Noop(entering user defined context custom-sip-header in extensions_custom.conf)
exten => s,n,Set(PJSIP_HEADER(add,P-Preferred-Identity)=<sip:${CALLERID(number)}@fpbx.de>)
exten => s,n,Dial(PJSIP/${CALLERID(number)}@fpbx.de)
exten => s,n,Return

(Lorne Gaetz) #2

See this post, modify to suit your situation
https://community.freepbx.org/t/passing-original-callerid-to-external-number-in-fm-fm/72115/2?u=lgaetz


(Hans Max) #3

still not working :frowning:
edited it like this… think i interpreted this correct.

[macro-dialout-trunk-predial-hook]
; add "B(macro-dialout-trunk-predial-hook^s^1)" (without quotes) to the dial options of a trunk in addition to the defaults already there
exten => s,1,GoSub(func-set-sipheader,s,1(P-Asserted-Identity,sip:${CALLERID(number)}@fpbx.de))
exten => s,n(done),MacroExit()

restart, reboot and that error occures.

131	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-outbound-callerid:39] Set("PJSIP/107-00000002", "CDR(outbound_cnum)=494491xxxx") in new stack	
132	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-outbound-callerid:40] Set("PJSIP/107-00000002", "CDR(outbound_cnam)=") in new stack	
133	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/107-00000002", "0?sub-flp-3,s,1()") in new stack	
134	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/107-00000002", "OUTNUM=0151xxxxxxx") in new stack	
135	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/107-00000002", "custom=PJSIP") in new stack	
136	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/107-00000002", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)B(macro-dialout-trunk-predial-hook^s^1))") in new stack	
137	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/107-00000002", "0?Set(DIAL_TRUNK_OPTIONS=B(macro-dialout-trunk-predial-hook^s^1)M(confirm))") in new stack	
138	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:19] Macro("PJSIP/107-00000002", "dialout-trunk-predial-hook,") in new stack	
139	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Gosub("PJSIP/107-00000002", "func-set-sipheader,s,1(P-Asserted-Identity,sip:494491xxxxx@fpbx.de)") in new stack	
140	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:1] NoOp("PJSIP/107-00000002", "Sip Add Header function called. Adding P-Asserted-Identity = sip:494491xxxxx@fpbx.de") in new stack	
141	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:2] Set("PJSIP/107-00000002", "HASH(__SIPHEADERS,P-Asserted-Identity)=sip:494491xxxxx@fpbx.de") in new stack	
142	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:3] Return("PJSIP/107-00000002", "") in new stack	
143	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:2] MacroExit("PJSIP/107-00000002", "") in new stack	
144	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/107-00000002", "0?skipcrm") in new stack	
145	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:21] Set("PJSIP/107-00000002", "__CRM_DIRECTION=OUTBOUND") in new stack	
146	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:22] Set("PJSIP/107-00000002", "__CRM_DESTINATION=0151xxxxxxx") in new stack	
147	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:23] Set("PJSIP/107-00000002", "__CRM_SOURCE=107") in new stack	
148	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:24] AGI("PJSIP/107-00000002", "sangomacrm.agi") in new stack	
149	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi	
150	[2021-01-18 18:21:43] VERBOSE[3351][C-00000002] app_mixmonitor.c: Begin MixMonitor Recording PJSIP/107-00000002	
151	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] res_agi.c: <PJSIP/107-00000002>AGI Script sangomacrm.agi completed, returning 0	
152	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:25] Set("PJSIP/107-00000002", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack	
153	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp("PJSIP/107-00000002", "CRM Finished") in new stack	
154	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf("PJSIP/107-00000002", "0?bypass,1") in new stack	
155	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf("PJSIP/107-00000002", "1?Set(CONNECTEDLINE(num,i)=0151xxxxxxx)") in new stack	
156	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/107-00000002", "1?Set(CONNECTEDLINE(name,i)=CID:494491xxxxx)") in new stack	
157	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/107-00000002", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)494491xxxxx)") in new stack	
158	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf("PJSIP/107-00000002", "0?customtrunk") in new stack	
159	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:32] ExecIf("PJSIP/107-00000002", "0?Set(DIAL_TRUNK_OPTIONS=B(macro-dialout-trunk-predial-hook^s^1))") in new stack	
160	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:33] Set("PJSIP/107-00000002", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack	
161	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk:34] Dial("PJSIP/107-00000002", "PJSIP/0151xxxxxxxx@PLACETEL_PJSIP,300,B(macro-dialout-trunk-predial-hook^s^1)b(func-apply-sipheaders^s^1,(3))U(sub-send-obroute-email^0151xxxxxxxx^0151xxxxxxx^3^1610994103^^4944919xxxxx)") in new stack	
162	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_stack.c: PJSIP/107-00000002 Internal Gosub(macro-dialout-trunk-predial-hook,s,1) start	
163	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Gosub("PJSIP/107-00000002", "func-set-sipheader,s,1(P-Asserted-Identity,sip:494491xxxxx@fpbx.de)") in new stack	
164	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:1] NoOp("PJSIP/107-00000002", "Sip Add Header function called. Adding P-Asserted-Identity = sip:494491xxxxx@fpbx.de") in new stack	
165	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:2] Set("PJSIP/107-00000002", "HASH(__SIPHEADERS,P-Asserted-Identity)=sip:494491xxxxx@fpbx.de") in new stack	
166	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-set-sipheader:3] Return("PJSIP/107-00000002", "") in new stack	
167	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:2] MacroExit("PJSIP/107-00000002", "") in new stack	
168	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_stack.c: Spawn extension (macro-dialout-trunk-predial-hook, s, 2) exited non-zero on 'PJSIP/107-00000002'	
169	[2021-01-18 18:21:43] NOTICE[3350][C-00000002] app_stack.c: PJSIP/107-00000002 Abnormal 'Gosub(macro-dialout-trunk-predial-hook,s,1)' exit. Popping routine return locations.	
170	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_stack.c: PJSIP/PLACETEL_PJSIP-00000003 Internal Gosub(func-apply-sipheaders,s,1(3)) start	
171	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack	
172	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/PLACETEL_PJSIP-00000003", "Applying SIP Headers to channel PJSIP/PLACETEL_PJSIP-00000003") in new stack	
173	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/PLACETEL_PJSIP-00000003", "TECH=PJSIP") in new stack	
174	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/PLACETEL_PJSIP-00000003", "SIPHEADERKEYS=P-Asserted-Identity,Alert-Info") in new stack	
175	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-00000003", "1") in new stack	
176	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/PLACETEL_PJSIP-00000003", "sipheader=sip:494491xxxxx@fpbx.de") in new stack	
177	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(PJSIP_HEADER(remove,P-Asserted-Identity)=)") in new stack	
178	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(sipheader=<http://127.0.0.1>;info=sip:494491xxxxx@fpbx.de)") in new stack	
179	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(sipheader=<http://127.0.0.1>sip:494491xxxxx@fpbx.de)") in new stack	
180	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "1?Set(PJSIP_HEADER(add,P-Asserted-Identity)=sip:494491xxxxx@fpbx.de)") in new stack	
181	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/PLACETEL_PJSIP-00000003", "") in new stack	
182	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-00000003", "1") in new stack	
183	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/PLACETEL_PJSIP-00000003", "sipheader=unset") in new stack	
184	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack	
185	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack	
186	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack	
187	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/PLACETEL_PJSIP-00000003", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack	
188	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/PLACETEL_PJSIP-00000003", "") in new stack	
189	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-00000003", "0") in new stack	
190	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] pbx.c: Executing [s@func-apply-sipheaders:12] Return("PJSIP/PLACETEL_PJSIP-00000003", "") in new stack	
191	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_stack.c: Spawn extension (from-trunk, 0151xxxxxx, 1) exited non-zero on 'PJSIP/PLACETEL_PJSIP-00000003'	
192	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_stack.c: PJSIP/PLACETEL_PJSIP-00000003 Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=	
193	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_dial.c: Called PJSIP/0151xxxxxxx@PLACETEL_PJSIP	
194	[2021-01-18 18:21:43] VERBOSE[3350][C-00000002] app_dial.c: Everyone is busy/congested at this time (1:0/0/1) 

image
image
image


(Lorne Gaetz) #4

Confirm you’re setting the correct header, there are two with confusingly similar names.


(Hans Max) #5

image

im pretty sure my provider wants P-Preferred-Identity. The second after i posted the former post i changed that already. Issue is the same.

116	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx_builtins.c: Goto (macro-outbound-callerid,s,20)	
117	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:20] Set("PJSIP/107-0000000a", "USEROUTCID=<494491xxxxxxx>") in new stack	
118	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:21] Set("PJSIP/107-0000000a", "EMERGENCYCID=") in new stack	
119	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:22] ExecIf("PJSIP/107-0000000a", "0?Set(EMERGENCYCID=)") in new stack	
120	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:23] Set("PJSIP/107-0000000a", "TRUNKOUTCID=") in new stack	
121	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:24] GotoIf("PJSIP/107-0000000a", "1?trunkcid") in new stack	
122	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx_builtins.c: Goto (macro-outbound-callerid,s,30)	
123	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:30] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERID(all)=)") in new stack	
124	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:31] ExecIf("PJSIP/107-0000000a", "1?Set(CALLERID(all)=<494491xxxxxxx>)") in new stack	
125	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:32] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERID(all)=)") in new stack	
126	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:33] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERID(all)=107)") in new stack	
127	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:34] Set("PJSIP/107-0000000a", "TIOHIDE=no") in new stack	
128	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:35] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack	
129	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:36] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack	
130	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:37] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERPRES(name-pres)=prohib_passed_screen)") in new stack	
131	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:38] ExecIf("PJSIP/107-0000000a", "0?Set(CALLERPRES(num-pres)=prohib_passed_screen)") in new stack	
132	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:39] Set("PJSIP/107-0000000a", "CDR(outbound_cnum)=494491xxxxxxx") in new stack	
133	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-outbound-callerid:40] Set("PJSIP/107-0000000a", "CDR(outbound_cnam)=") in new stack	
134	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:14] GosubIf("PJSIP/107-0000000a", "0?sub-flp-3,s,1()") in new stack	
135	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:15] Set("PJSIP/107-0000000a", "OUTNUM=0151xxxxxxx") in new stack	
136	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:16] Set("PJSIP/107-0000000a", "custom=PJSIP") in new stack	
137	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:17] ExecIf("PJSIP/107-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^default)B(macro-dialout-trunk-predial-hook^s^1))") in new stack	
138	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:18] ExecIf("PJSIP/107-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=B(macro-dialout-trunk-predial-hook^s^1)M(confirm))") in new stack	
139	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:19] Macro("PJSIP/107-0000000a", "dialout-trunk-predial-hook,") in new stack	
140	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Gosub("PJSIP/107-0000000a", "func-set-sipheader,s,1(P-Preferred-Identity,sip:494491xxxxxxx@fpbx.de)") in new stack	
141	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:1] NoOp("PJSIP/107-0000000a", "Sip Add Header function called. Adding P-Preferred-Identity = sip:494491xxxxxxx@fpbx.de") in new stack	
142	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:2] Set("PJSIP/107-0000000a", "HASH(__SIPHEADERS,P-Preferred-Identity)=sip:494491xxxxxxx@fpbx.de") in new stack	
143	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:3] Return("PJSIP/107-0000000a", "") in new stack	
144	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:2] MacroExit("PJSIP/107-0000000a", "") in new stack	
145	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:20] GotoIf("PJSIP/107-0000000a", "0?skipcrm") in new stack	
146	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:21] Set("PJSIP/107-0000000a", "__CRM_DIRECTION=OUTBOUND") in new stack	
147	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:22] Set("PJSIP/107-0000000a", "__CRM_DESTINATION=0151xxxxxxx") in new stack	
148	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:23] Set("PJSIP/107-0000000a", "__CRM_SOURCE=107") in new stack	
149	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:24] AGI("PJSIP/107-0000000a", "sangomacrm.agi") in new stack	
150	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] res_agi.c: Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi	
151	[2021-01-18 19:38:52] VERBOSE[7927][C-00000006] app_mixmonitor.c: Begin MixMonitor Recording PJSIP/107-0000000a	
152	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] res_agi.c: <PJSIP/107-0000000a>AGI Script sangomacrm.agi completed, returning 0	
153	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:25] Set("PJSIP/107-0000000a", "CHANNEL(hangup_handler_push)=crm-hangup,s,1") in new stack	
154	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:26] NoOp("PJSIP/107-0000000a", "CRM Finished") in new stack	
155	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:27] GotoIf("PJSIP/107-0000000a", "0?bypass,1") in new stack	
156	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:28] ExecIf("PJSIP/107-0000000a", "1?Set(CONNECTEDLINE(num,i)=0151xxxxxxx)") in new stack	
157	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:29] ExecIf("PJSIP/107-0000000a", "1?Set(CONNECTEDLINE(name,i)=CID:494491xxxxxxx)") in new stack	
158	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:30] ExecIf("PJSIP/107-0000000a", "0?Set(CONNECTEDLINE(name,i)=CID:(Hidden)494491xxxxxxx)") in new stack	
159	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:31] GotoIf("PJSIP/107-0000000a", "0?customtrunk") in new stack	
160	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:32] ExecIf("PJSIP/107-0000000a", "0?Set(DIAL_TRUNK_OPTIONS=B(macro-dialout-trunk-predial-hook^s^1))") in new stack	
161	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:33] Set("PJSIP/107-0000000a", "HASH(__SIPHEADERS,Alert-Info)=unset") in new stack	
162	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk:34] Dial("PJSIP/107-0000000a", "PJSIP/0151xxxxxxx@PLACETEL_PJSIP,300,B(macro-dialout-trunk-predial-hook^s^1)b(func-apply-sipheaders^s^1,(3))U(sub-send-obroute-email^0151xxxxxxx^0151xxxxxxx^3^1610998732^^494491xxxxxxx)") in new stack	
163	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_stack.c: PJSIP/107-0000000a Internal Gosub(macro-dialout-trunk-predial-hook,s,1) start	
164	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] Gosub("PJSIP/107-0000000a", "func-set-sipheader,s,1(P-Preferred-Identity,sip:494491xxxxxxx@fpbx.de)") in new stack	
165	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:1] NoOp("PJSIP/107-0000000a", "Sip Add Header function called. Adding P-Preferred-Identity = sip:494491xxxxxxx@fpbx.de") in new stack	
166	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:2] Set("PJSIP/107-0000000a", "HASH(__SIPHEADERS,P-Preferred-Identity)=sip:494491xxxxxxx@fpbx.de") in new stack	
167	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-set-sipheader:3] Return("PJSIP/107-0000000a", "") in new stack	
168	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:2] MacroExit("PJSIP/107-0000000a", "") in new stack	
169	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_stack.c: Spawn extension (macro-dialout-trunk-predial-hook, s, 2) exited non-zero on 'PJSIP/107-0000000a'	
170	[2021-01-18 19:38:52] NOTICE[7926][C-00000006] app_stack.c: PJSIP/107-0000000a Abnormal 'Gosub(macro-dialout-trunk-predial-hook,s,1)' exit. Popping routine return locations.	
171	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_stack.c: PJSIP/PLACETEL_PJSIP-0000000b Internal Gosub(func-apply-sipheaders,s,1(3)) start	
172	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:1] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack	
173	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:2] NoOp("PJSIP/PLACETEL_PJSIP-0000000b", "Applying SIP Headers to channel PJSIP/PLACETEL_PJSIP-0000000b") in new stack	
174	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/PLACETEL_PJSIP-0000000b", "TECH=PJSIP") in new stack	
175	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:4] Set("PJSIP/PLACETEL_PJSIP-0000000b", "SIPHEADERKEYS=P-Preferred-Identity,Alert-Info") in new stack	
176	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-0000000b", "1") in new stack	
177	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/PLACETEL_PJSIP-0000000b", "sipheader=sip:494491xxxxxxx@fpbx.de") in new stack	
178	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(PJSIP_HEADER(remove,P-Preferred-Identity)=)") in new stack	
179	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(sipheader=<http://127.0.0.1>;info=sip:494491xxxxxxx@fpbx.de)") in new stack	
180	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(sipheader=<http://127.0.0.1>sip:494491xxxxxxx@fpbx.de)") in new stack	
181	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "1?Set(PJSIP_HEADER(add,P-Preferred-Identity)=sip:494491xxxxxxx@fpbx.de)") in new stack	
182	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/PLACETEL_PJSIP-0000000b", "") in new stack	
183	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-0000000b", "1") in new stack	
184	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:6] Set("PJSIP/PLACETEL_PJSIP-0000000b", "sipheader=unset") in new stack	
185	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack	
186	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:8] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(sipheader=<http://127.0.0.1>;info=unset)") in new stack	
187	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:9] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(sipheader=<http://127.0.0.1>unset)") in new stack	
188	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:10] ExecIf("PJSIP/PLACETEL_PJSIP-0000000b", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack	
189	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:11] EndWhile("PJSIP/PLACETEL_PJSIP-0000000b", "") in new stack	
190	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:5] While("PJSIP/PLACETEL_PJSIP-0000000b", "0") in new stack	
191	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] pbx.c: Executing [s@func-apply-sipheaders:12] Return("PJSIP/PLACETEL_PJSIP-0000000b", "") in new stack	
192	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_stack.c: Spawn extension (from-trunk, 0151xxxxxxx, 1) exited non-zero on 'PJSIP/PLACETEL_PJSIP-0000000b'	
193	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_stack.c: PJSIP/PLACETEL_PJSIP-0000000b Internal Gosub(func-apply-sipheaders,s,1(3)) complete GOSUB_RETVAL=	
194	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_dial.c: Called PJSIP/0151xxxxxxx@PLACETEL_PJSIP	
195	[2021-01-18 19:38:52] VERBOSE[7926][C-00000006] app_dial.c: Everyone is busy/congested at this time (1:0/0/1)

(Lorne Gaetz) #6

If all that’s needed is the PPI header, it looks correct to me. I think the next step is to contact the provider and ask them why the INVITE it rejected.


(Hans Max) #7

ok, i did that.
i hope i interpreted the settings all correct. They offer a configuration example for asterisk pjsip, and i adopted it to freepbx.

```
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[ptel-trunk]
type=registration
transport=transport-udp
outbound_auth=ptel-auth
server_uri=sip:fpbx.de
client_uri=sip:<VoIP-Ziel Username>@fpbx.de
contact_user=<VoIP-Ziel Username>
retry_interval=60
expiration=300
line=yes
endpoint=ptel-trunk

[ptel-auth]
type=auth
auth_type=userpass
password=<VoIP-Ziel Passwort>
username=<VoIP-Ziel Username>
realm=fpbx.de

[ptel-trunk]
type=endpoint
transport=transport-udp
context=from-placetel
disallow=all
allow=alaw
allow=ulaw
outbound_auth=ptel-auth
aors=ptel-trunk
;force_rport=yes
direct_media=no

[ptel-trunk]
type=aor
contact=sip:fpbx.de:5060

[ptel-trunk]
type=identify
endpoint=ptel-trunk
match=fpbx.de
```

(Ricardo) #8

According to your post Placetel requirement line,”Dial(SIP/the number wich shall be shown@placetel.de) “ , and your setting domain is to “fpbx.de” (is right?)

exten => s,n,Dial(PJSIP/${CALLERID(number)}@fpbx.de)

Your domain configuration are to "fpbx.de" instead of “@placetel.de "


#9

In your trunk settings, set From User to the same value that you have in Username.
Set From Domain to fpbx.de. If it doesn’t work, try placetel.de.

If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
make a failing call, paste the Asterisk log for the call (which will now include a SIP trace) at pastebin.freepbx.org and post the link here.

Also, please post a copy of your working chan_sip settings.


(Hans Max) #10

i am also abit confused about this @placetel.de and @fbpx.de … like i had shown above placetel got a config example for pjsip… in there everything is @fpbx.de

inbound calls are working and when i change something in the trunk settings to placetel.de instead of fpbx.de i dont receive inbound calls.

so right now my settings are like shown above in the pictures (so i can receive inbound calls, i think this is correct?) with login credentials @fpbx.de
and in the extension.conf i wrote placetel.de

settings:

[macro-dialout-trunk-predial-hook]
; add “B(macro-dialout-trunk-predial-hook^s^1)” (without quotes) to the dial options of a trunk in addition to the defaults already there
exten => s,1,GoSub(func-set-sipheader,s,1(P-Preferred-Identity,sip:${CALLERID(number)}@placetel.de))
exten => s,n(done),MacroExit()

image
image


(Hans Max) #11

they told me they cannot provide support for all different type of pbx… nice…


(Hans Max) #12

i should have read this post earlier with more attention to detail… changing the PJSIP Advanced settings “From Domain” from emtpy to fpbx.de made it work!

thank you! give me your paypal ill spend you a beer!