[Serusers] Rewriting "From" / Setting caller number for PSTN calls
jiri at iptel.org
Sat Feb 28 19:40:57 CET 2004
At 06:46 PM 2/28/2004, Arnd Vehling wrote:
>Jiri Kuthan wrote:
>>Use of Remote-Party-ID should solve your problem if I understood it right.
>>(append_rpid_hf in auth module).
>Ive read the module doc and browsed through the rfc but i couldnt relate
>this command to what i wanted to do.
>What i want to do is to set the users valid e.164 number as caller-id in
>case the user has one, otherwise i would setup a default e.164 number.
That's what it does. It looks up number "owned" by the user by his digest
identity and appends it to request.
>I can set a default e.164 number using the pstn gw but i dont see how
>i can search the users "alias entries", select the most appropriate
>e.164 from it and set it in the sip packet going to the pstn gw so
>it will be used as the pstn caller-id for the outgoing call.
It does not use alias table -- it uses a separate table for that.
>Usually a pstn gw will take the "username" from a sip address
>(sip:username at domain) and set it as caller-id for an outgoing
>call. Reading the rfc i couldnt find any other parameter for
>The easy solution is to just give a user a an e.164 id as primary
>SER login. I.e. "sip:493012345 at myvoip.net" but in case he has
>several valid e.164 (as aliases) i would like to set the most
>appropriate number for each pstn gw when he calls out there.
The module currently does not support more than one rpid per user.
>Example: If you has an german e.164 number and he uses a german
>PSTN gw i would use the german e.164 number and if he dialouts
>using an US pstn gw i would like to set the US number if he has
>I am prepared to write the appropriate code for this but i want
>to make sure that i dont "re-invent the wheel" before i do this.
If you write it a way, which will depend on destination _somehow_
you will not be re-inventing wheel. I think this would be indeed
useful -- for example some people can have a US number from
addaline.com and a Spanish number from VozTele and desire to display
the correct one based on where they are calling to, so that they
can be called back inexpensively.
Perhaps appending a RegExp to the rpid table and selecting one of
multiple rpid entries only if request-uri matches the RegExp would
solve the problem.
More information about the sr-users