[asterisk-bugs] [JIRA] (ASTERISK-30352) pbx_lua: Set callerid number when attended transfer

Ilia Gvozdev (JIRA) noreply at issues.asterisk.org
Wed Dec 14 04:35:51 CST 2022


    [ https://issues.asterisk.org/jira/browse/ASTERISK-30352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=260910#comment-260910 ] 

Ilia Gvozdev edited comment on ASTERISK-30352 at 12/14/22 4:34 AM:
-------------------------------------------------------------------

No result.

{code:title=extension.lua|borderStyle=solid}
function from-pstn(context,exten)
    app.Set("__ORIG_CIDNUM="..channel['CALLERID(num)']:get())
    app.Answer()
    app.Queue("tech","tr","","",60)
    app.Hangup()
end

function phones (context,exten)
    app.Log("VERBOSE","ORIG_CIDNUM: ",channel['ORIG_CIDNUM']:get() or '')
    app.Set("CALLERID(num)="..channel['ORIG_CIDNUM']:get())
    app.Dumpchan()
    app.Dial("PJSIP/"..exten,60)
end
{code}

Wiki: note that o(${CALLERID(all)}) is similar to option o without the parameter.


was (Author: igvozd):
No result.

{code:title=Bar.lua|borderStyle=solid}
function from-pstn(context,exten)
    app.Set("__ORIG_CIDNUM="..channel['CALLERID(num)']:get())
    app.Answer()
    app.Queue("tech","tr","","",60)
    app.Hangup()
end

function phones (context,exten)
    app.Log("VERBOSE","ORIG_CIDNUM: ",channel['ORIG_CIDNUM']:get() or '')
    app.Set("CALLERID(num)="..channel['ORIG_CIDNUM']:get())
    app.Dumpchan()
    app.Dial("PJSIP/"..exten,60)
end
{code}

Wiki: note that o(${CALLERID(all)}) is similar to option o without the parameter.

> pbx_lua: Set callerid number when attended transfer
> ---------------------------------------------------
>
>                 Key: ASTERISK-30352
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-30352
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Applications/app_dial, PBX/pbx_lua
>    Affects Versions: 18.14.0
>         Environment: CentOS Linux release 7.9.2009 (Core), Linux 3.10.0-1160.76.1.el7.x86_64 x86_64
>            Reporter: Ilia Gvozdev
>            Assignee: Unassigned
>         Attachments: full, full_config, full_lua_1, INVITE_config.txt, INVITE_lua_1.txt, INVITE.txt
>
>
> Caller ID number that was presented on the calling channel does not saved when attended transfer with pbx_lua.
> function from-pstn(context,exten)
>     app.Set("__ORIG_CIDNUM="..channel['CALLERID(num)']:get())
>     app.Answer()
>     app.Queue("tech","tr","","",60)
>     app.Hangup()
> end
> function phones (context,exten)
>     app.Log("VERBOSE","ORIG_CIDNUM: ",channel['ORIG_CIDNUM']:get() or '')
>     app.Set("CALLERID(num)="..channel['ORIG_CIDNUM']:get())
>     app.Dumpchan()
>     app.Dial("PJSIP/"..exten,60,"o("..channel['ORIG_CIDNUM']:get()..")")
> end
> full log and INVITE message in attach



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list