[OpenSIPS-Users] Trusted peer as a Prepaid client

Douglas Lane doug at wd.co.za
Sat May 1 02:57:35 CEST 2010


Hi All,

I've been trying to get the following to work - am using OpenSIPS 
1.6.1-tls, and I've created a MySQL view of the address table tailored 
to what the old trusted table looked like.

Here is an example of the the invite:

Trusted Peer IP: 1.2.3.4
My OpenSIPS IP: 5.6.7.8

U 1.2.3.4:5060 -> 5.6.7.8:5060
INVITE sip:0716054314 at 5.6.7.8:5060 SIP/2.0.
From: <sip:0854003684 at 1.2.3.4>;tag=1300083.
To: <sip:0716054314 at 5.6.7.8:5060>.
Call-ID: DCF50681-1BA8-47D2-82ED-DE5F0D91F596.
CSeq: 1 INVITE.
Privacy: none.
P-Asserted-Identity: tel:0854003684.
Max-Forwards: 69.
P-Charging-Vector: icid-value=91704882-49FC-4B8B-BACA-3E110481EE77.
User-Agent: vocl-essentra-ex/8.0F2 (19020.63).
Via: SIP/2.0/UDP 
1.2.3.4:5060;branch=z9hG4bK-8c76cf8-4bdb7875;vtservice=b2buaservlet.siptosip.
Contact: <sip:0854003684 at 1.2.3.4:5060;vtservice=b2buaservlet.siptosip>.
Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,INFO,PRACK.
Content-Type: application/sdp.
Content-Length: 198.

Obviously this is handled correctly in the opensips routing logic, and 
the billing_party is set to 1.2.3.4 ($si), however, when call_control is 
called, the following message lands up in my syslog:

MaxSessionTime Duration=3600 CallId=22FBC00E-454E-4057-B835-15B527C774FD 
From=sip:0854003684 at 1.2.3.4 Gateway=1.2.3.4 To=sip:0716054314 at 5.6.7.8:5060
// Some of my debug after the MaxSessionTime call:
May  1 02:37:42 billing cdrtool[17219]: HACKING: 
[/var/www/CDRTool/library/cdr_opensips.php] 2452 aNumber = 
sip:0854003684 at 1.2.3.4
May  1 02:37:42 billing cdrtool[17219]: HACKING: 
[/var/www/CDRTool/library/cdr_opensips.php] 2465 BillingPartyId = 
0854003684 at 1.2.3.4
May  1 02:37:42 billing cdrtool[17219]: HACKING: select * from prepaid 
where account = '0854003684 at 1.2.3.4'
May  1 02:37:42 billing cdrtool[17219]: MaxSessionTime=unlimited 
Type=postpaid CallId=22FBC00E-454E-4057-B835-15B527C774FD 
BillingParty=0854003684 at 1.2.3.4

Now I know call_control makes use of the From section to figure out the 
Billing Party ID, as demonstrated above. Also note the SQL query uses 
the full from portion, however, in my prepaid table, I only have 1.2.3.4 
as the customer (as the From user and display name section will change 
based on the CLID the trusted peer sends me)

I suppose the question is, what is the correct way (if any) to setup a 
trusted peer as a prepaid user where by the user section in the FROM 
header as well as the Display Name will consistently change. Only the 
domain part (in this case 1.2.3.4) will remain constant? I'd like to try 
avoid using uac_replace_from as I've heard this can mess things up for 
downstream / upstream proxies that my OpenSIPS might talk to eventually.

I would greatly appreciate the feedback on this.

Thanks
Doug




More information about the Users mailing list