Ultimately, what I’m trying to accomplish here is to attach a hangup handler to the PJSIP channel that answered the call from a Queue, using a subroutine, where the Queue member is a Local channel that dials a PJSIP channel.
Nothing I’ve tried has worked, the hangup handler always ends up on the Local channel and runs when the local channel optimizes out. I don’t want to keep the local channel up, I need it to go away (another requirement).
I’ve tried the queue gosub options (both with Queue() and in queues.conf, and the various b, B, and U dial options.
-- Executing [200@context:7] Queue("PJSIP/carrier-0000010f", "queue,tTxIik,,,90") in new stack
-- Called Local/7810@experiment
-- Executing [7810@experiment:1] Dial("Local/7810@experiment-00000154;2", "PJSIP/test.7810/sip:test.7810@192.168.1.184:5060,,riexktw") in new stack
-- Called PJSIP/test.7810/sip:test.7810@192.168.1.184:5060
-- Local/7810@experiment-00000154;1 is ringing
-- PJSIP/test.7810-00000110 connected line has changed. Saving it until answer for Local/7810@experiment-00000154;2
-- PJSIP/test.7810-00000110 is ringing
-- Local/7810@experiment-00000154;1 is ringing
-- PJSIP/test.7810-00000110 answered Local/7810@experiment-00000154;2
-- Connected line update to PJSIP/carrier-0000010f prevented.
-- Local/7810@experiment-00000154;1 answered PJSIP/carrier-0000010f
-- Channel PJSIP/test.7810-00000110 joined 'simple_bridge' basic-bridge <7beb66b2-5bc9-4c92-b856-a1cb8e94257c>
-- Local/7810@experiment-00000154;1 Internal Gosub(agent,s,1) start
-- Channel Local/7810@experiment-00000154;2 joined 'simple_bridge' basic-bridge <7beb66b2-5bc9-4c92-b856-a1cb8e94257c>
-- Executing [s@agent:1] NoOp("Local/7810@experiment-00000154;1", " *** CHANNEL:Local/7810@experiment-00000154;1 *** ") in new stack
You are correct! I’m using the queue.conf membergosub option here, but same result if I use Dial’s “U(agent,s,1)” option. Edited again. Thanks for putting up with me (and for any insight), been running this one around the block all day.
If using the Queue option, then it will execute on the dialed channel which is the Local channel ;1 leg. That is correct, and what should happen. You’re not directly dialing the PJSIP channel, the Queue has no idea that is what was dialed until everything bridges and any optimization occurs.
It’s working. We’re doing a lot of local channel work mixed in here and there’s so much CLI output I completely missed the U option working amid all my attempts. That, plus a type-o in an ExecIf I just found.
Thanks for taking the time @jcolp … I’m sure you have better things to do …