[Home]

Summary:ASTERISK-04607: [patch] retrieve SIP To: header for ISDN legacy use
Reporter:Harald Milz (hmilz)Labels:
Date Opened:2005-07-16 17:04:48Date Closed:2011-06-07 14:03:16
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) callednum-1.0.9.diff.gz
( 1) sipgetheader-1.0.8.diff
Description:The "register" function in sip.conf allows you to either register with or without an explicit extension. In either case, ${EXTEN} will contain a fixed string ("s" or the extension name you set in sip.conf). This means you have no clue what number the calling party dialed to call you.

Background: When integrating legacy ISDN hardware (e.g. a PBX) you may want to be able to dial directly to a specific port of the ISDN PBX. Most SIP providers like sipgate.de give you only one official POTS phone number so that in principle, you cannot dial an extension number. Many SIP providers using a SER proxy do send the complete number a calling party dialed in the SIP To: header. So if you are able to see the POTS number in the SIP To: header you can use ${EXTEN:x} to reach a specific PBX port directly. This allows a calling party to dial an extension after your official POTS number and reach the corresponding ISDN PBX extension directly.

This patch grabs the SIP To: header and creates a new variable CALLEDNUM. (Sorry I was not very creative in making up this name - feel free to choose a more reasonable name :-)

This patch is not against the CVS HEAD because I prefer to use the stable version for now. The patch is simple and straightforward enough anyway.


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

Disclaimer is on file via e-mail to bugs@digium.com
Comments:By: Olle Johansson (oej) 2005-07-18 03:36:04

You can already catch this header with the sip_header function. I don't see the need for this, sorry.

By: Harald Milz (hmilz) 2005-07-18 11:08:10

Hi,

thanks for the answer. The wiki says "Found "sip_header" in 0 wikis" when searching the whole site. I think you mean the SIPGetHeader application which won't be available before 1.1? That doesn't help me much. There is no such functionality in the 1.0.x tree as it seems. Or am I missing something?

It seems the patch from 0002838 could help.

By: Harald Milz (hmilz) 2005-07-18 14:25:29

Hi,

I grabbed the patch from 0002838 and adapted it a bit (sipgetheader-1.0.8.diff) to make it work with asterisk-1.0.8 (which I'm using with bristuff-0.2.0-RC8h). Works fine so far. I'll post a verbose update to asterisk-dev.

TIA, case closed.

By: Olle Johansson (oej) 2005-07-18 14:27:14

As you know, we're not adding new functions to the release version ("stable"). As you requested, I'm closing this report.

By: Olle Johansson (oej) 2005-07-18 14:27:40

--closed per reporter's request.