Summary:ASTERISK-05985: [patch] Parse error when two rpid's are sent in one header (caller and callee)
Reporter:Ray Van Dolson (rayvd)Labels:
Date Opened:2006-01-05 09:54:05.000-0600Date Closed:2011-06-07 14:10:34
Versions:Frequency of
Environment:Attachments:( 0) rpid_multiple_7822.diff
Description:Receiving an RFC-compliant RPID header with party=called and party=calling values present, Asterisk picks whichever is listed first as the caller id.



is the Remote-Party-ID being sent by an AudioCodes SIP Gateway to my Asterisk 1.2.1 install.  Since the party=called portion is listed first, it gets used as the caller id  number.

See http://www3.ietf.org/proceedings/02mar/I-D/draft-ietf-sip-privacy-04.txt

I have a patch that addresses it, but need to reformat it to Asterisk coding standards.  Will attach.
Comments:By: Ray Van Dolson (rayvd) 2006-01-05 15:40:22.000-0600

Uploaded patch (this is against SVN version 7822) for this issue.  Faxed in disclaimer also.

By: Olle Johansson (oej) 2006-01-26 02:16:39.000-0600

Sorry for not responding. Since this was filed in the wrong category, I did not catch it until now. Now, it's in the SIP category waiting for review...  Looks good. I just want to update myself on the drafts, since I have no device sending RPID this way.

Thank you for contributing to Asterisk.

By: Olle Johansson (oej) 2006-01-26 08:31:07.000-0600

After briefing through the draft, I think your approach is the wrong approach even if it works. In this case we have two RPIDs, which both should be parsed separately and then reacted upon.

I would think that separating them at the comma first, then working with them one by one would be a better approach.

Or am I just confused. I foresee new bug reports if we do a quick fix... ;-)

By: Ray Van Dolson (rayvd) 2006-01-26 09:35:38.000-0600

I would definitely agree.  If this isn't urgent (no one else wants to do it), I can re-engineer it to make it do what you're saying when I get some more time.  Definitely would like to give back to the Asterisk project.

By: Olle Johansson (oej) 2006-01-26 11:42:08.000-0600

Please do try. I will certainly take a look at it or answer any question you have. Thanks!

By: Olle Johansson (oej) 2006-02-09 08:33:57.000-0600

Any updates?

By: twisted (twisted) 2006-02-09 16:07:49.000-0600

In theory, the calling rpid should be processed as the calling ANI/CID with presentation, and the called RPID should be processed as the DNIS (not to be confused with the actual number its' being sent to) - if we want to handle that in the dialplan as such, we can, but we should still honor the To: field in that situation, IMO.

By: Serge Vecher (serge-v) 2006-05-01 14:31:58

Where are we with this issue?


By: Ray Van Dolson (rayvd) 2006-05-19 13:46:13

I am using the supplied patch locally which works for my needs.  I have not had the time to devote to writing a more robust patch that would work for everyone.

By: Serge Vecher (serge-v) 2006-05-31 09:08:08

rayvd: if you have time to update this patch to be more inline with oej's comments, please feel free to reopen the issue. Thanks.