I’m placing the call using the originate command, and using asterisk 1.8. How can I get notified about the existence of 181 messages occurred before the 200 ? Can I receive this information in the dialplan itself ? Thx.
181 cannot happen after 200 and your example does not show that.
If one before the 200 can be detected, it will be in terms of connected party updates, so I would check if associated functions (probably REDIRECTING) provide the information. Otherwise, you will be out of luck. (I’m using an older version, so I am not familiar with exactly what conditions are required for these to work.)
I made some progress here, but i still need help. I changed the originate to use a local channel, like this:
[from-local]
exten => 3000,1,Set(REDIRECTING_CALLER_SEND_MACRO=caller)
same => n,Dial(SIP/sipp/4004711881,30,t)
The outgoing call is made, and the REDIRECTING_CALLER_SEND_MACRO is called when that side it receives 181. What I need now is pass this “information” to the call on 3001@tts; so that side can decide to continue with the call or not. Setting variables doesn’t work. They exist on one side of the local channel, but doesn’t in the other. How can I pass this info to the other side ?
Variables beginning _ will be passed when the channel is created. Otherwise, you need to use global variables. (I’m assuming that your strategy is optimum, rather than doing a deep analysis.)