[asterisk-users] Queue questions - Asterisk 11

Satish Barot satish4asterisk at gmail.com
Thu Jul 4 23:36:45 CDT 2013


On Thu, Jul 4, 2013 at 5:36 PM, Administrator TOOTAI <admin at tootai.net>wrote:

> Le 04/07/2013 07:29, Satish Barot a écrit :
>
>> [...]
>>
>>     Already tested, I tried again as the option passed to queue was
>>     changed (n option)
>>
>>     Logs:
>>
>>         -- Started music on hold, class 'default', on SIP/gw-0000005e
>>         -- Executing [909 at memberconnector:1] Dial("Local/909@
>>     memberconnector-00000002;2", "SIP/s-ntfe_909,60,") in new stack
>>       == Using SIP RTP CoS mark 5
>>         -- Called SIP/s-ntfe_909
>>         -- SIP/s-ntfe_909-00000060 is ringing
>>         -- Local/909 at memberconnector- 00000002;1 is ringing
>>
>>         -- SIP/s-ntfe_909-00000060 is ringing
>>         -- Stopped music on hold on SIP/gw-0000005e
>>       == Spawn extension (macro-toQueue, s, 11) exited non-zero on
>>     'SIP/gw-0000005e' in macro 'toQueue'
>>       == Spawn extension (incoming-Swiss-itech, 10000, 204) exited
>>     non-zero on 'SIP/gw-0000005e'
>>         -- Executing [h at incoming-Swiss-itech:1]
>>     NoOp("SIP/gw-0000005e", "Call ended with QUEUESTATUS= and
>>     DIALSTATUS= and HANGUPCAUSE=0") in new stack
>>
>>     >From extension:
>>
>>     [memberconnector]
>>     ;
>>     exten => _XXX,1,Dial(SIP/${peerPrefix}$ {EXTEN},${TIMERINGQUEUE},)
>>           same => n,NoOp(DIALSTATUS=${ DIALSTATUS})
>>
>>     As you can see, all status are empty,
>>
>>
>>     --     Daniel
>>
>>
>>
>> QUEUESTATUS will contain different values in different scenarios. i.e. If
>> a call gets answered then the value is CONTINUE, If a call doesn't get
>> answered and Queue timeout happens then TIMEOUT. If a caller hangs up when
>> call is in Queue then QUEUESTATUS will be blank.
>>
>> Have something like this,
>> ... ...
>> same => n,queue(support,c,,,20)
>> same => n,Noop(QSTATUS=${QUEUESTATUS})
>> ... ...
>> exten => h,1,Noop(QSTATUS=${**QUEUESTATUS})
>>
>> [memberconnector]
>> exten => _X.,1,Noop(Connecting to Member at ${EXTEN})
>> same => n,Dial(SIP/${EXTEN})
>> ;Check the Dialstatus for Member
>> same => n,Noop(DIALSTATUS=${**DIALSTATUS})
>>
>> exten => h,1,Noop(DIALSTATUS=${**DIALSTATUS})
>>
>>
> Hi Satish,
>
> the c option has a result of DIALSTATUS shown on h extension in
> [memberconnector] and _only_ here. I then have to put the result in a
> global variable as DIALSTATUS is resetted.
>
> Many thanks for your help
>
> Regards
> --
> Daniel
>
>
That is because DIALSTATUS is set on a local channel and not on a caller
channel. Use SHARED Function to get the value back in caller channel.

same => n,Set(__ORIGCHANNEL=${CHANNEL})
same => n,queue(support,c,,,20)
same => n,Noop(QSTATUS=${QUEUESTATUS})
... ...
exten =>
h,1,Noop(QSTATUS=${QUEUESTATUS},DIALSTATUS=${SHARED(DIALSTATUS,${ORIGCHANNEL})})

[memberconnector]
exten => _X.,1,Noop(Connecting to Member at ${EXTEN})
same => n,Dial(SIP/${EXTEN})
;Check the Dialstatus for Member
same => n,Noop(DIALSTATUS=${DIALSTATUS})
same => n,Set(SHARED(DIALSTATUS,${ORIGCHANNEL})=${DIALSTATUS})

exten => h,1,Noop(DIALSTATUS=${DIALSTATUS})
same => n,Set(SHARED(DIALSTATUS,${ORIGCHANNEL})=${DIALSTATUS})


--Satish Barot
Ahmedabad, India
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130705/35eff130/attachment.htm>


More information about the asterisk-users mailing list