[Home]

Summary:ASTERISK-06716: [patch] Remove OSP support code from SIP channel to res_osp.c and app_osplookup.c
Reporter:Di-Shi Sun (homesick)Labels:
Date Opened:2006-04-06 10:26:27Date Closed:2006-04-07 14:11:57
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) osp_trunk.patch
( 1) osp.patch
Description:In order to support OSP for general channel, we remove OSP support code and data structures from SIP channel to res_osp.c and app_osplookup.c. The OSP support code has been cleaned up and re-tested.

1. All OSP support code and data structures in #ifdef OSP_SUPPORT #endif pairs in chan_sip.c are removed and put in res_osp.c or app_osplookup.c.
2. The code to export SIPTOKEN and SIPPEERIP are added in chan_sip.c.
3. The OSP support code in app_dial.c is removed.
4. Add new dial plan application OSPAuth to authenticate in_bound call. It exports OSPINHANDLE and OSPINTIMELIMIT.
5. OSPLookup and OSPNext use SIPADDHEADER to insert OSP tokens into SIP INVITE messages.
6. Change OSPLookup and OSPNext applications to export OSPOUTHANDLE, OSPCALLING, OSPOUTTOKEN, and OSPOUTTIMELIMIT.
7. OSP configuration “ospauth” in sip.conf is removed to osp.conf.
8. README.variables is updated.

All OSP code and data structures are cleaned up and retested.



****** ADDITIONAL INFORMATION ******

Disclaimer signed by TransNexus, Inc. 1/27/05
Comments:By: Russell Bryant (russell) 2006-04-06 10:56:30

These changes seem like they would require significant configuration changes for those using OSP support.  If this is indeed the case, the necessary changes will need to be explained in UPGRADE.txt.  Also, I think it would be a good idea to add a file that explains how to use the OSP support included in asterisk - doc/osp.txt or something.

I see that you have modified README.variables in your patch.  However, this file no longer exists in the trunk.  It has been renamed to channelvariables.txt.  Since this patch introduces new functionality, it needs to be against the current svn trunk as these changes will not be applied to the 1.2 branch.

Thanks!

By: Di-Shi Sun (homesick) 2006-04-06 11:23:26

Hi Russell,

Thank you for your comments. I will add an explnation in UPGRADE.txt and osp.txt in doc/ soon.

I am a little confused about README.variables and 1.2 branch issues. Would you like to tell me how to do? Should I download from main svn branch and generate a new patch or it just means the patch will not be seen in 1.2 branch?

Thanks a lot.

Di-Shi Sun.

By: Russell Bryant (russell) 2006-04-06 11:32:01

The policy for making changes in the release branch (1.2) is that no new features are accepted.  Only bug fixes are applied.

You should make a checkout of the trunk and generate a new patch against that.  The trunk is our development branch where we are working toward the next release, Asterisk 1.4, which will be released toward the end of June or sometime in July.

svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk

By: Olle Johansson (oej) 2006-04-06 14:02:55

SIPTOKEN is not a good name, use OSPTOKEN.

SIPPEERIP has nothing to do with a SIP peer - it's the USER that sends an INVITE to us.
Can't you get that through the pvt directly in the source?

The patch does not apply to current chan_sip. Please update it.

By: Olle Johansson (oej) 2006-04-06 14:05:55

Ah, see that you patched 1.2. We need a patch for svn trunk - that's why it failed so miserably on many files. We do not change functionality in 1.2 any more.

By: Di-Shi Sun (homesick) 2006-04-06 14:15:45

Hi Olle,

I will use OSPINTOKEN instead of SIPTOKEN and OSPPEERIP instead of SIPPEERIP.

OSP dial plan applications use the IP of user sending the INVITE message, the applications cannot get it from sip_pvt directly, the code is not in chan_sip.c.

We are working on an update of the patch for svn trunk.

Thanks,

Di-Shi Sun.

By: Olle Johansson (oej) 2006-04-06 14:42:41

OSPPEERIP is not a good solution. It's not a OSP specific variable.

You can certainly get the IP from the tech_pvt of the channel.

By: Di-Shi Sun (homesick) 2006-04-06 15:06:41

We will check tech_pvt for the PEERIP issue.

Thanks.

By: Di-Shi Sun (homesick) 2006-04-07 11:31:15

Hi All,

We update the patch for svn trunk.

1. Use SIP_HEADER to get OSPINTOKEN, and SIPCHANINFO to get OSPPEERIP. All OSP support code are removed from SIP channel.
2. Update UPGRADE.txt
3. Update channelvariables.txt

The code are tested again.

This patch (osp_trunk.patch) is for svn trunk, revision 17985.

BTW, we are working for a doc to explain how to use OSP applications in Asterisk. We will post it next week.

Thanks,

Di-Shi Sun.

By: Di-Shi Sun (homesick) 2006-04-07 11:33:44

Can any one help me to erase the old patch?

Thanks,

Di-Shi Sun.

By: Olle Johansson (oej) 2006-04-07 14:09:53

I like this. This makes the chan_sip code easier to handle. Thank you!

By: Olle Johansson (oej) 2006-04-07 14:11:57

Fixed in svn trunk, revision 18369.