Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling
My actual dialplan hangupcause handling is in AGI and AEL, so the dialplan below has not been tested. Don't use HANGUPCAUSE_KEYS, the order of the channels varies. Save the channel name while the dialplan is in the predial handler like below. MASTER_CHANNEL is used to avoid silly issues with

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Khalil Khamlichi
your link has nothing to do with this subject ??? On Sat, Jun 9, 2018 at 7:16 PM Eric Wieling wrote: > > I think HANGUPCAUSE is channel agnostic. > > See: core show function HANGUPCAUSE > > Some thing like this IIRC: > Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)}) > > Remember the incom

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling
I think HANGUPCAUSE is channel agnostic. See: core show function HANGUPCAUSE Some thing like this IIRC: Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)}) Remember the incoming leg of the call and the outgoing leg of the call are different channels. Make sure you are giving HANGUPCAUSE t

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Khalil Khamlichi
Thanks for your response Eric, Here is some testing code, as you can see ${HANGUPCAUSE(${ARG1},tech)} is empty if number is not found (HANGUPCAUSE=1) or if sip request times-out (HANGUPCAUSE=0) (a dead far end for example) so I had to check value HANGUPCAUSE and filter out zero and one before movi

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Eric Wieling
I think HANGUPCAUSE is channel agnostic. See: core show function HANGUPCAUSE Some thing like this IIRC: Set(my_cause=${HANGUPCAUSE(${CHANNEL(name)},tech)}) Remember the incoming leg of the call and the outgoing leg of the call are different channels. Make sure you are giving HANGUPCAUSE t

Re: [asterisk-users] getting real sip status after dial

2018-06-09 Thread Khalil Khamlichi
It seems very weird to me that we cannot access sip code of a call from pjsip which information is actually returned from the provider, so it is available to asterisk, why does asterisk hide it ? On Sat, Jun 9, 2018 at 5:08 PM Khalil Khamlichi wrote: > > Hi, > > Is there any way I can get exact si

[asterisk-users] getting real sip status after dial

2018-06-09 Thread Khalil Khamlichi
Hi, Is there any way I can get exact sip status from pjsip after a dial ? or all we can get is asterisk hangup causes ? Thanks in advance. KKh -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- Check o