Steve Davies
2012-Apr-25 12:21 UTC
[asterisk-users] CONNECTEDLINE() updated during SIP events?
Hi, I have read the excellent information here: https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information and believe I have an understanding of what is offered. I have a couple of questions: - Is it possible to update COLP/COLR when a SIP redirect occurs, or when a SIP divert is in place? If so, how? - Is it possible to have the COLP/COLR information updated when a SIP attended transfer is completed? If so how? In both of the above cases, there is no obvious dialplan execution when the calls are redirected, diverted or masqueraded, so we cannot update the CONNECTEDLINE() information trivially. Or am I missing an obvious trick? Thanks, Steve
Richard Mudgett
2012-Apr-25 15:55 UTC
[asterisk-users] CONNECTEDLINE() updated during SIP events?
> I have read the excellent information here: > https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information > and believe I have an understanding of what is offered. I have a > couple of questions: > > - Is it possible to update COLP/COLR when a SIP redirect occurs, or > when a SIP divert is in place? If so, how?All redirecting activity is valid only before the associated calls are answered. After the calls are answered, it is connected-line updates. The redirecting interception macros are invoked before the outgoing call is answered when the outgoing call is redirected by an entity further down the line. If your Asterisk server is redirecting the call, the REDIRECTING information is updated by normal dialplan activity before placing the next outgoing call to the redirected to party.> - Is it possible to have the COLP/COLR information updated when a SIP > attended transfer is completed? If so how?Transfers generate connected line update events automatically. The connected line interception macros give you a chance to alter the connected line information as it is passed between the connected endpoints of the bridge.> In both of the above cases, there is no obvious dialplan execution > when the calls are redirected, diverted or masqueraded, so we cannot > update the CONNECTEDLINE() information trivially. Or am I missing an > obvious trick?This is the purpose of the interception macros. Richard
Steve Davies
2012-Apr-25 16:54 UTC
[asterisk-users] CONNECTEDLINE() updated during SIP events?
On 25 April 2012 16:55, Richard Mudgett <rmudgett at digium.com> wrote: [snip]> >> - Is it possible to have the COLP/COLR information updated when a SIP >> attended transfer is completed? If so how? > > Transfers generate connected line update events automatically. ?The connected > line interception macros give you a chance to alter the connected line > information as it is passed between the connected endpoints of the bridge. > >> In both of the above cases, there is no obvious dialplan execution >> when the calls are redirected, diverted or masqueraded, so we cannot >> update the CONNECTEDLINE() information trivially. Or am I missing an >> obvious trick? > > This is the purpose of the interception macros.Ah, thank you. I was looking at it back-to-front. The key bit is "Transfers generate connected line update events automatically." - I can now see this in the source code in ast_do_masquerade() and elsewhere. This then lets you use the macros as you describe. A further question... It appears that for SIP endpoints, this facility only updates RPID and PAI headers? I have found that there appear to be 4 different SIP CID-update mechanisms "out there" as follows: - Update RPID and PAI (ITSP and trunks often understand this) - Update Contact: header (Aastra handsets use this) - A SIP INFO packet if "Supported: callerid" is specified (Older snom firmware uses this) - Update From: header if "Supported: from-change" is specified (RFC 4916, snom, Yealink) Are there existing plans to support any of these other methods? If not, I will almost certainly add them for my own use, and submit the code. Regards, Steve