[Serusers] Rewriting "From" / Setting caller number for PSTN calls
av at nethead.de
Fri Feb 27 20:26:00 CET 2004
with an usuall SER setup a typical user account looks like this:
Primary sip address: sip:joe at myvoip.net
Berlin incoming number: sip:493042423 at myvoip.net
Los Angeles "" : sip:1310232323 at myvoip.net
If "joe" now calls out via a PSTN-GW the caller-id which is
transmitted to the PSNT-GW would be "joe". Now "Joe" is clearly
alphanumeric and no PSTN-GW (or the PSTN-Switch to which the PSTN-GW
is connected) will accept "Joe" as caller-id.
All i can currently do is setting a default callerid on the PSTN-GW
in case the incoming caller-id isnt valid.
What i would like to do though is to lookup if a user has an alias
for a certain region and rewrite the the from line in the sip-packet
going to the PSTN-GW.
Example: "Joe" uses the Berlin/german PSTN-GW or dials a german PSTN
number. Now i would look into the alias table and search for either an
alias starting with "49" or "4930" and if one is found set the from
field to the according alias. In this case "493042423 at myvoip.net".
This would ensure that, if possible, a matching caller-id would be
set for every user.
- "From" line rewriting is not RFC compliant.
- I dont see any possebility to do this with the stock SER software
- Which module would be a good starting point for adding this
functionality? All which would be needed would be one command
for looking up the alias list of a user from memory using regular
- How do others cope with this problem?
The easy but not very elegant solution is to just use a valid e.164
number (ex. the LA number) as primary sip address. But that still doesnt
fix the problem that "Joes" Los Angeles number would be set as caller-id
even if he got a valid "berlin" number too and calls via a german PSTN
More information about the sr-users