No call out after calling local-channel using callfiles

Hi all

Here is what I am doing.
My call file calls the Local Channel which in turn calls an agent and plays simple IVR press 1 to dial out and 2 for hangup.

But when agent presses 1 to call out its not making call .

Q.Is this possible to connect to local channel which calls a SIP channel (agent ) then conneting that SIP channel(agent who presses one to call out) to an outside number…?

Here is my dial plan

[call_out]
exten => 11,1,verbose(CALLID :${call_id} ----${agent})
exten => 11,n,verbose(-------callerid is : ${CALLERID(num)})
exten => 11,n,Dial(SIP/${agent}) ;dialling the agent

exten => 9090,1,Background(/opt/webcall)
exten => 9090,n,WaitExten(5)

exten => 2,1,verbose(–agent denied call–)
exten => 2,n,hangup()

exten => 1,1,verbose(–agent selected to call customer—${call_id})
exten => 1,n,Set(CALLERID(all)=${call_id})
exten => 1,n,Dial(SIP/flowroute/${phone_to_call})

My call file format :
Channel:Local/11@call_out
Context:call_out
Extension:9090
Priority:1
SetVar:call_id=< call id to ser>
SetVar:agent=8888
SetVar:phone_to_call=

This is my SIP debug output :

– SIP/8888-000000fc answered Local/11@call_out-a9ba;2
> Channel Local/11@call_out-a9ba;1 was answered.
– Executing [9090@call_out:1] Verbose(“Local/11@call_out-a9ba;1”, “------The number to call is: 12345678-----agent number selected is :8888”) in new stack
------The number to call is: 12345678-----agent number selected is :8888
– Executing [9090@call_out:2] BackGround(“Local/11@call_out-a9ba;1”, “/opt/webcall”) in new stack
– <Local/11@call_out-a9ba;1> Playing ‘/opt/webcall.gsm’ (language ‘en’)
== Spawn extension (call_out, 11, 3) exited non-zero on ‘Local/11@call_out-a9ba;2’

<— SIP read from UDP:SERVER-IP:17575 —>
SUBSCRIBE sip:504@192.168.0.107 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.103:9112;branch=z9hG4bK-d87543-34203777a0037b36-1–d87543-;rport
Max-Forwards: 70
Contact: sip:8888@SERIP:17575
To: sip:504@192.168.0.107
From: "nitesh"sip:8888@SERVER-IP;tag=61749242
Call-ID: 9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.
CSeq: 1 SUBSCRIBE
Expires: 3600
Accept: multipart/related, application/rlmi+xml, application/pidf+xml
llow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1002tx stamp 29712
Event: presence
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Creating new subscription
Sending to SERIP:17575 (NAT)
list_route: hop: sip:8888@SERVER-IP:17575
Found peer ‘8888’ for ‘8888’ from SERVER-IP:17575

<— Transmitting (NAT) to SERVER-IP:17575 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.103:9112;branch=z9hG4bK-d87543-34203777a0037b36-1–d87543-;received=SERVER-IP;rport=17575
From: "nitesh"sip:8888@domain-name;tag=61749242
To: sip:504@192.168.0.107;tag=as2d8d13ac
Call-ID: 9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.
CSeq: 1 SUBSCRIBE
Server: FPBX-2.8.1(1.8.11.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="4d149f43"
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.’ in 27200 ms (Method: SUBSCRIBE)

<— SIP read from UDP:SERVER-IP:17575 —>
SUBSCRIBE sip:504@192.168.0.107 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.103:9112;branch=z9hG4bK-d87543-281924023362020b-1–d87543-;rport
Max-Forwards: 70
Contact: sip:8888@SERVER-IP:17575
To: sip:504@192.168.0.107
From: “nitesh"sip:8888@domain-name;tag=61749242
Call-ID: 9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.
CSeq: 2 SUBSCRIBE
Expires: 3600
Accept: multipart/related, application/rlmi+xml, application/pidf+xml
llow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
User-Agent: X-Lite release 1002tx stamp 29712
Authorization: Digest username=“8888”,realm=“asterisk”,nonce=“4d149f43”,uri="sip:504@192.168.0.107”,response=“5b9b82692ef90e2dc4c8872cfdf44e8c”,algorithm=MD5
Event: presence
Content-Length: 0

<------------->
— (15 headers 0 lines) —
Creating new subscription
Sending to SERVER-IP:17575 (NAT)
Found peer ‘8888’ for ‘8888’ from SERVER-IP:17575
Looking for 504 in from-internal (domain 192.168.0.107)

<— Transmitting (NAT) to SERVER-IP:17575 —>
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.0.103:9112;branch=z9hG4bK-d87543-281924023362020b-1–d87543-;received=SERVER-IP;rport=17575
From: "nitesh"sip:8888@domain-name;tag=61749242
To: sip:504@192.168.0.107;tag=as2d8d13ac
Call-ID: 9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.
CSeq: 2 SUBSCRIBE
Server: FPBX-2.8.1(1.8.11.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>
Really destroying SIP dialog ‘9012200fe132a720ODhkYTliYWEyMTQxYzg0NmMwZmQxMTk5MDNmZWZlMDk.’ Method: SUBSCRIBE
– Executing [9090@call_out:3] WaitExten(“SIP/8888-000000fc”, “5”) in new stack
== CDR updated on SIP/8888-000000fc
– Executing [1@call_out:1] Verbose(“SIP/8888-000000fc”, “–agent selected to call customer—1234”) in new stack
–agent selected to call customer—1234
– Executing [1@call_out:2] Set(“SIP/8888-000000fc”, “CALLERID(all)=1234”) in new stack
– Executing [1@call_out:3] Dial(“SIP/8888-000000fc”, “SIP/flowroute/12345678”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
Really destroying SIP dialog ‘38ff09731846abc54b6160c14006d62d@provider:5060’ Method: INVITE
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘SIP/8888-000000fc’ status is ‘CHANUNAVAIL’

You are missing _'s from your variable names.

The trace doesn’t agree with the dialplan wrt to priority numbers on extension 9090.

The Agent seems to have dropped the call during the initial message.

thanks for reply

that must be typo mistake while posting .
when I call locally like SIP/${some-local_number} it connects on press 1

This means that …its correct ( possible) if make a call outside in this manner
call file calling local channel
Local channel -> SIP agent = one channel
same SIP agent press one and connect to an out side number and they can talk.