Jean-Denis Girard
2015-May-20 06:38 UTC
[asterisk-users] CHANNEL(aor) CHANNEL(contact) return nothing
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi list, I'm trying to use CHANNEL(aor) and CHANNEL(contact) on PJSIP channel, on asterisk-13.3.2, but they don't return anything. Is this a bug, or did I miss something? Here is my test dialplan: exten => *98,1,Answer same => n,NoOp(Channel=<${CHANNEL(name)}>,type <${CHANNEL(channeltype)}>) same => n,NoOp(AOR=<${CHANNEL(aor)}>, contact=<${CHANNEL(contact)}>) same => n,Set(aor=${CHANNEL(name):$[LEN(CHANNEL(channeltype)) +1]:-9}) same => n,Set(contact=${PJSIP_AOR(${aor},contact)}) same => n,NoOp(URI=<${PJSIP_CONTACT(${contact},uri)}>) same => n,NoOp(Expiration time <${PJSIP_CONTACT(${contact},expiration_time)}>) same => n,NoOp(Qualify frequency <${PJSIP_CONTACT(${contact},qualify_frequency)}>) same => n,NoOp(Outbound proxy <${PJSIP_CONTACT(${contact},outbound_proxy)}>) same => n,NoOp(Path=<${PJSIP_CONTACT(${contact},path)}>) same => n,NoOp(User-Agent=<${PJSIP_CONTACT(${contact},user_agent)}>) same => n,PJSIPNotify(,jdg,gs-idle-screen-refresh) same => n,Hangup And here is the result in Asterisk CLI: x220*CLI> -- Executing [*98 at public:1] Answer("PJSIP/jdg-0000001f", "") in new stack -- Executing [*98 at public:2] NoOp("PJSIP/jdg-0000001f", "Channel=<PJSIP/jdg-0000001f>, type=<PJSIP>") in new stack -- Executing [*98 at public:3] NoOp("PJSIP/jdg-0000001f", "AOR=<>, contact=<>") in new stack [May 19 18:44:11] NOTICE[1476][C-0000001f]: ast_expr2.y:763 compose_func_args: argbuf allocated 12 bytes; [May 19 18:44:11] NOTICE[1476][C-0000001f]: ast_expr2.y:782 compose_func_args: argbuf uses 11 bytes; [May 19 18:44:11] NOTICE[1476][C-0000001f]: ast_expr2.y:763 compose_func_args: argbuf allocated 6 bytes; [May 19 18:44:11] NOTICE[1476][C-0000001f]: ast_expr2.y:782 compose_func_args: argbuf uses 5 bytes; -- Executing [*98 at public:4] Set("PJSIP/jdg-0000001f", "aor=jdg") in new stack -- Executing [*98 at public:5] Set("PJSIP/jdg-0000001f", "contact=jdg;@sip:jdg at 192.168.10.131:5062") in new stack -- Executing [*98 at public:6] NoOp("PJSIP/jdg-0000001f", "URI=<sip:jdg at 192.168.10.131:5062>") in new stack -- Executing [*98 at public:7] NoOp("PJSIP/jdg-0000001f", "Expiration time=<1432098235>") in new stack -- Executing [*98 at public:8] NoOp("PJSIP/jdg-0000001f", "Qualify frequency=<60>") in new stack -- Executing [*98 at public:9] NoOp("PJSIP/jdg-0000001f", "Outbound proxy=<>") in new stack -- Executing [*98 at public:10] NoOp("PJSIP/jdg-0000001f", "Path=<>") in new stack -- Executing [*98 at public:11] NoOp("PJSIP/jdg-0000001f", "User-Agent=<Grandstream GXP2130 1.0.4.23>") in new stack -- Executing [*98 at public:12] PJSIPNotify("PJSIP/jdg-0000001f", ",jdg,gs-idle-screen-refresh") in new stack -- Executing [*98 at public:13] Hangup("PJSIP/jdg-0000001f", "") in new stack == Spawn extension (public, *98, 13) exited non-zero on 'PJSIP/jdg-0000001f' What is wrong ? Thanks, - -- Jean-Denis Girard SysNux Syst?mes Linux en Polyn?sie fran?aise http://www.sysnux.pf/ T?l: +689 40.50.10.40 / GSM: +689 87.79.75.27 -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlVcK+MACgkQuu7Rv+oOo/hOVgCbBspmlyjRFnY3VCfjaUpcd+Vr HO4AnA8OsDYx8+lPxET53X2xRdksy2rc =n/qH -----END PGP SIGNATURE-----
Joshua Colp
2015-May-20 10:50 UTC
[asterisk-users] CHANNEL(aor) CHANNEL(contact) return nothing
Jean-Denis Girard wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi list, > > I'm trying to use CHANNEL(aor) and CHANNEL(contact) on PJSIP channel, on > asterisk-13.3.2, but they don't return anything. Is this a bug, or did I > miss something?It looks like this is an incoming leg, in which case that information isn't available. There is no association of an AOR and Contact on incoming legs (it MAY be possible to deduce but it certainly wouldn't work in all cases). Since you specify one explicitly on outgoing, that's when it is available. -- Joshua Colp Digium, Inc. | Senior Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org
Jean-Denis Girard
2015-May-20 16:29 UTC
[asterisk-users] CHANNEL(aor) CHANNEL(contact) return nothing
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le 20/05/2015 00:50, Joshua Colp a ?crit :> It looks like this is an incoming leg, in which case that information > isn't available. There is no association of an AOR and Contact on > incoming legs (it MAY be possible to deduce but it certainly wouldn't > work in all cases). Since you specify one explicitly on outgoing, that's> when it is available. >When you say it may be possible, could you be more specific: is there another dialplan function / application to use ? Thanks, - -- Jean-Denis Girard SysNux Syst?mes Linux en Polyn?sie fran?aise http://www.sysnux.pf/ T?l: +689 40.50.10.40 / GSM: +689 87.79.75.27 -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlVctnwACgkQuu7Rv+oOo/jgWgCgsaDSC7i/Am9OGPFeM7GwsLL7 NrQAnRKgV5QVVOTWllRjF7zROpCb5/XF =FPOG -----END PGP SIGNATURE-----
Reasonably Related Threads
- compose_func_args: argbuf allocated 4 bytes compose_func_args: argbuf uses 3 bytes
- CHANNEL(aor) CHANNEL(contact) return nothing
- [PATCH v6] virtio-fs: add virtiofs filesystem
- [PATCH v4 15/16] virtio-fs: add virtiofs filesystem
- [PATCH v4 15/16] virtio-fs: add virtiofs filesystem