[Users] re: how to pass the Caller ID into uac_replace_from function ?

don lin don12lin at yahoo.com
Thu Dec 21 20:52:49 CET 2006


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 <daniel at voice-system.ro>
Subject: Re: [Users] postgres
To: Klaus Darilion <klaus.mailinglists at pernau.at>
Cc: users at openser.org
Message-ID: <458A5FFF.4060003 at 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 at pernau.at 
>>> <mailto:klaus.mailinglists at 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 
>>> 
<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 <http://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 <don12lin at yahoo.com> 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 at 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

------------------------------

<Message: 4
<Date: Tue, 19 Dec 2006 11:11:09 +0900
<From: Jeff Williams <jeffw at globaldial.com>
<Subject: [Users] (PR)ACK problem with uac_replace_from
<To: users at openser.org
<Message-ID: <45874A3D.5070206 at globaldial.com>
<Content-Type: text/plain; charset="iso-8859-1"

<I seem to have an issue with uac_replace_from.

<I am using openser as a media proxy. For invites I replace the numbers
<with leading 0's with 61 for Australia and forward the call to our LCR
<box which then forwards the call to the correct voice to pstn gateway. 
<I am trying to use uac_replace_from to set the from address so the
<callerid appears correct on the outgoing calls.

<This seems to work fine for the INVITE request, but on subsequent PRACKs 
<and ACKs (which just get loose routed), something  strange happens to 
<the from address.

<On invite, the From get re-written:

<From: Jeff <sip:610089001 at proxy.sipone.com;user=phone>;tag=1790577941
<to
<From: Jeff <sip:0892209080 at sipone.com>;tag=1790577941

<For the PRACKs and ACKs, this happens:

<From: Jeff <sip:610089001 at proxy.sipone.com;user=phone>;tag=1790577941
<to
<From: Jeff
<<\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

<There shouldn't be anything happening to the From address on the
<(PR)ACKs at all.

<Anyone have any ideas?

<I have attached a ethereal dump of the call setup.

<Jeff __________________________________________________
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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20061221/b03a4042/attachment.htm 


More information about the Users mailing list