Misc app - number you have dialed is not in service

Hello i have misc application which have extension number: “2468” when i dial this number it should run this app:

[from-internal-java]
exten => s,1,Noop(Entering user defined context [from-internal-java] in extensions_custom.conf)
exten => s,2,Set(result=${CURL(my-url)})
;exten => s,n,Return

Basically its just sending HTTP command.

I registered it with goto string in custom destinations like this: “from-internal-java,s,1”.

When i dial extension number of app its gonna say: “Number you have dialed is not in service”

When i put http command into browser it works so problem must be in PBX, because even when i do easy stuff in misc app like playback or play ivr its still saying tha line with number not in service.

Its all in local network without going through trunk its just for testing purpose it shouldnt even communicate to public telephony network so i dont need trunk.

This is my log when i dial Misc App Extension number

46696 [1980-01-01 21:06:07] VERBOSE[25992] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘192.168.1.30’
46697 [1980-01-01 21:06:07] NOTICE[25992] res_pjsip_sdp_rtp.c: No joint capabilities for ‘video’ media stream between our configuration((h261|h263|h263p|h264|h265|mpeg4|vp8|vp9)) and incoming SDP((ulaw))
46698 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:1] NoOp(“PJSIP/anonymous-00000000”, “Received incoming SIP connection from unknown peer to 2468”) in new stack
46699 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:2] Set(“PJSIP/anonymous-00000000”, “DID=2468”) in new stack
46700 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:3] Goto(“PJSIP/anonymous-00000000”, “s,1”) in new stack
46701 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,1)
46702 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000000”, “1?setlanguage:checkanon”) in new stack
46703 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,2)
46704 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:2] Set(“PJSIP/anonymous-00000000”, “CHANNEL(language)=en”) in new stack
46705 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:3] GotoIf(“PJSIP/anonymous-00000000”, “0?noanonymous”) in new stack
46706 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:4] Goto(“PJSIP/anonymous-00000000”, “from-trunk,2468,1”) in new stack
46707 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (from-trunk,2468,1)
46708 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:1] Set(“PJSIP/anonymous-00000000”, “__FROM_DID=2468”) in new stack
46709 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/anonymous-00000000”, “Received an unknown call with DID set to 2468”) in new stack
46710 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:3] Goto(“PJSIP/anonymous-00000000”, “s,a2”) in new stack
46711 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (from-trunk,s,2)
46712 [1980-01-01 21:06:07] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:2] Answer(“PJSIP/anonymous-00000000”, “”) in new stack
46713 [1980-01-01 21:06:08] WARNING[26490][C-00000001] chan_sip.c: This function can only be used on SIP channels.
46714 [1980-01-01 21:06:08] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:3] Log(“PJSIP/anonymous-00000000”, "WARNING,Friendly Scanner from ") in new stack
46715 [1980-01-01 21:06:08] WARNING[26490][C-00000001] Ext. s: Friendly Scanner from
46716 [1980-01-01 21:06:08] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:4] Wait(“PJSIP/anonymous-00000000”, “2”) in new stack
46717 [1980-01-01 21:06:10] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:5] Playback(“PJSIP/anonymous-00000000”, “ss-noservice”) in new stack
46718 [1980-01-01 21:06:10] VERBOSE[26490][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing ‘ss-noservice.ulaw’ (language ‘en’)
46719 [1980-01-01 21:06:15] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:6] SayAlpha(“PJSIP/anonymous-00000000”, “2468”) in new stack
46720 [1980-01-01 21:06:15] VERBOSE[26490][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing ‘digits/2.ulaw’ (language ‘en’)
46721 [1980-01-01 21:06:16] VERBOSE[26490][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing ‘digits/4.ulaw’ (language ‘en’)
46722 [1980-01-01 21:06:16] VERBOSE[26490][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing ‘digits/6.ulaw’ (language ‘en’)
46723 [1980-01-01 21:06:17] VERBOSE[26490][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing ‘digits/8.ulaw’ (language ‘en’)
46724 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:7] Hangup(“PJSIP/anonymous-00000000”, “”) in new stack
46725 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Spawn extension (from-trunk, s, 7) exited non-zero on ‘PJSIP/anonymous-00000000’
46726 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:1] Macro(“PJSIP/anonymous-00000000”, “hangupcall,”) in new stack
46727 [1980-01-01 21:06:18] WARNING[26490][C-00000001] app_macro.c: Macro() is deprecated and will be removed from a future version of Asterisk.
46728 [1980-01-01 21:06:18] WARNING[26490][C-00000001] app_macro.c: Dialplan should be updated to use Gosub instead.
46729 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-00000000”, “1?theend”) in new stack
46730 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (macro-hangupcall,s,3)
46731 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/anonymous-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
46732 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:4] NoOp(“PJSIP/anonymous-00000000”, " montior file= ") in new stack
46733 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:5] GotoIf(“PJSIP/anonymous-00000000”, “1?skipagi”) in new stack
46734 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx_builtins.c: Goto (macro-hangupcall,s,7)
46735 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Executing [[email protected]:7] Hangup(“PJSIP/anonymous-00000000”, “”) in new stack
46736 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] app_macro.c: Spawn extension (macro-hangupcall, s, 7) exited non-zero on ‘PJSIP/anonymous-00000000’ in macro ‘hangupcall’
46737 [1980-01-01 21:06:18] VERBOSE[26490][C-00000001] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘PJSIP/anonymous-00000000’

I

So i just found problem is in the extension… When i call custom app from different extension its working as expected…

So i got it working but when i wanna do return after http command was send and i wana return somewhere like playback, ivr etc

Im getting this error in log:

1] ERROR[5632][C-00000010] app_stack.c: Return without Gosub: stack is unallocated

Your dialplan ends with a Return, but you’ve not configured the Custom Destination to use it. Edit the Custom Destination, toggle the Return button and select a destination where you want the call to go after the cust dest.

Actually i configured the return button and im still getting same error - ok for some reason when i configured everything from scratch it started working :smiley:

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