Hi Klaus,

   Very grateful for your reply.
   I read about the avp document and did not quite follow it. Also, it mentioned Mysql. Is there any examples for avp and Postgres ?
   I agree it is not a nice to re-write the From header, would you suggest how to change the remote party id in Openser and I will give it a shot ?

Thanks and Regards,

Don

Klaus Darilion <klaus.mailinglists@pernau.at> wrote:

The subscriber table has a column called rpid (remote party id). There
you can put into the number.

When a user gets authenticated, this rpid is loaded into the rpid AVP:
http://www.openser.org/docs/modules/1.1.x/auth.html#AEN115

Then you can use uac_replace_from with this AVP to rewrite the From header.

Nevertheless, rewriting the from header is not very nice.

The nice solution would be to put the phone number (rpid, remote party
id) in the Remote-Party-ID header (e.g. for old Cisco Gateways and
Asterisk) or into a P-Asserted-Identity Header (newer Cisco gateways).

Usually Gateways support either one of this header to set the proper CLI
when sending the call into the PSTN.

regards
klaus

don lin wrote:
> Hi there,
>
> I saw all of you discussed about the postgres and I do have a question which somewhat related to postgres as well (please refer to the end of this email for detail).
> My question is that I have Caller ID (regular phone number) mapping to a SIP account stored in postgres, when I call from SIP device to a PSTN phone, telco carrier does not accept the SIP From field and requested to use regular phone number. I use exec_msg to call the external C program which read the Caller ID mapping to SIP account. However, I do not know how to pass this Caller ID into uac_replace_from.
> Were the postgres version work for this purpose ? Please advise if you have any suggestion. Thanks in advance,
>
> Don
> ------------------------------
>
> Message: 5
> Date: Thu, 21 Dec 2006 12:20:47 +0200
> From: Daniel-Constantin Mierla
> Subject: Re: [Users] postgres
> To: Klaus Darilion
> Cc: users@openser.org
> Message-ID: <458A5FFF.4060003@voice-system.ro>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hello Klaus,
>
> On 12/21/06 12:05, Klaus Darilion wrote:
>> Hi Daniel!
>>
>> I've checked the postgres script: rel_1_1_0 works fine, but there is
> a
>> problem in unstable: The domain for the default admin user is asked
>> not for serweb tables but for the plain openser tables as well. Also
>> the subscriber table includes all the serweb columns even if serweb
>> tables are not installed.
> I think a merge with mysql version, with an option to say the
> underlaying DB engine is the right solution, to be easy to maintain --
> same as we did with openserctl. I will have that in mind, but the best
> will be to register it to tracker.
>
> Cheers,
> Daniel
>
>> regards
>> klaus
>>
>>
>> Daniel-Constantin Mierla wrote:
>>> Hello,
>>>
>>> On 12/20/06 19:36, Mark Price wrote:
>>>>
>>>> On 12/20/06, *Klaus Darilion* < klaus.mailinglists@pernau.at
>>>> > wrote:
>>>>
>>>> Hi Mark!
>>>>
>>>> Postgres should work well - I use it since ser 0.8. Just make
> sure
>>>> that
>>>> the hard disk does not get full, because this breaks the index
>>>> inside
>>>> postgres and postgres is getting real slow (re-create the index
>>>> if it
>>>> happens).
>>>>
>>>> Last time I tested openser_postgres.sh it worked fine. If you
> find
>>>> a bug
>>>> please let us know.
>>>>
>>>> Please check to use the latest versions from CVS (for 1.1 use
> CVS
>>>> rel_1_1_0)
>>>>
>>>>
>>>> The latest version from cvs doesn't work out of the box with
> openser
>>>> build from the release tarball, because the release tarball doesn't
>>>> included /usr/sbin/openser_gen_ha1 (although I could get past this
>>>> by replacing it with the md5sum equivelant).
>>>>
>>>> However, the release tarball doesn't work because of this bug:
>>>>
> https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1518732&group_id=139143
>
>>>>
>>>> So, 1. is the cvs version of rel_1_1_0 considered safe for
>>>> production use?
>>> yes, it is the most recommended version to use -- several issues
> were
>>> found and fixed since 1.1.0 release.
>>>
>>>> 2. if so and there are important fixes such as this in CVS,
>>>> would openser.org consider
>>>> releasing a point release containing such changes?
>>> It is an option, and perhaps should be taken in consideration, as
>>> patch release with not so much packaging.
>>>
>>> This may help some which want to maintain platforms updated, it is
>>> exampled with 1.0.x, bust just replace the version with 1.1.0 in the
>>> document and should work (rel_1_0_0 => rel_1_1_0)
>>> http://openser.org/dokuwiki/doku.php/install:openser-from-cvs
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>>> Thanks,
>>>>
>>>> Mark Price
>
> don lin wrote: Hi there,
>
> We have a Postgres Database to store the users' informations before we use Openser. To integrate between Postgres and Openser, we write external C programs and call them from Openser with exec_dset function.
> The issue we have now is with the Caller ID. When the user makes a call to PSTN number from SIP devices (soft phone or hard phone), the telco carrier requests us to send a numerical Caller ID, not the SIP format (such as john.dow@abc.com). What I am doing is to add the Caller ID field into the Postgres for each user and write a C program to query the Caller ID field, then Openser calls it with exec_dset functioin.
> However, I did not find a way to define a variable in Openser to store this Caller ID and pass it to uac_replace_from function.
> Appreciate for any suggestions.
>
> Jeff,
> You mentioned that you replaced the From Header, may I ask how you do it ?
> Thanks and Regards,
>
> Don
>
> ------------------------------
>
>
>
>
>
>
> <45874A3D.5070206@globaldial.com>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ;tag=1790577941
>
> ;tag=1790577941
>
>
>
> ;tag=1790577941
>
>
> <<\032\317\352S\232\222B\230\234K\231*BV\300\030\303\332\ah\303\306i\365\005\016\200\250\000\000\230\016\200\252j\200\002`\000\000\016>;tag=1790577
> <941
>
>
> <(PR)ACKs at all.
>
>
>
>
>
>
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


--
Klaus Darilion
nic.at


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com