[asterisk-dev] [Code Review]: Patch to detect/parse ANI-II / ANI2 / OLI from SIP INVITE messages

Rob Gagnon reviewboard at asterisk.org
Wed Jun 6 13:56:11 CDT 2012



> On June 6, 2012, 9:05 a.m., opticron wrote:
> > /trunk/channels/chan_sip.c, lines 24048-24059
> > <https://reviewboard.asterisk.org/r/1947/diff/5/?file=28400#file28400line24048>
> >
> >     Looking further into this, the expired drafts that specify the "oli" and "isup-oli" parameters also specify exactly 2 digits for the value.  I found no references to "ss7-oli".
> 
> Rob Gagnon wrote:
>     In practice, we receive single digit values for any of the three possible OLI indicators.  There is always a difference in how different vendors implement the spec.
> 
> opticron wrote:
>     Ok, I was just making sure that was the case.  I'd still recommend using sscanf to avoid the custom parsing code since you'll probably want to capture the entire value if more than 2 digits are used.

In the 14+ years I've been working in telecom programming, the NANPA ANI-II digits have always been limited to 2-digits.  I don't see them expanding anytime soon.

http://www.nanpa.com/number_resource_info/ani_ii_assignments.html


- Rob


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1947/#review6387
-----------------------------------------------------------


On June 6, 2012, 10:37 a.m., Rob Gagnon wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1947/
> -----------------------------------------------------------
> 
> (Updated June 6, 2012, 10:37 a.m.)
> 
> 
> Review request for Asterisk Developers, Mark Michelson, rmudgett, opticron, and Rob Gagnon.
> 
> 
> Summary
> -------
> 
> Add ANI2 / OLI parsing for SIP.  The patch checks the "From" header during the handle_request_invite() function for the presence of "isup-oli", "ss7-oli", or "oli" tags.  If present, the up-to-2-digits following the equal sign in the tag are set on the channel's caller structure in the "ani2" int element.
> 
> This allows SIP functions that reference ANI2 to work properly for SIP.  Specifically tested was the messaging that occurs when AGI transmits its data to an AGI script.
> 
> 
> This addresses bug ASTERISK-19912.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19912
> 
> 
> Diffs
> -----
> 
>   /trunk/channels/chan_sip.c 368585 
> 
> Diff: https://reviewboard.asterisk.org/r/1947/diff
> 
> 
> Testing
> -------
> 
> Call processing via AGI call in dial plan which logs all AGI incoming values was executed from cell phone, land line, and payphone.  During the payphone call, the value of "agi_callingani2" was properly transmitted as "7" for the payphone, "62" for the cell phone, and "0" for the landline.
> 
> Over 600,000 calls have been processed in 12 hours or more of testing without errors.
> 
> 
> Thanks,
> 
> Rob
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120606/2996e933/attachment.htm>


More information about the asterisk-dev mailing list