[OpenSIPS-Users] Modify To:'s field and forward
spady
spady77 at gmail.com
Fri Dec 2 15:33:18 CET 2011
Hi List,
I searched into Forum and i am reading about AVP module and UAC module but
it's hard to write my first OpenSIPS's script :-(
As I sayd i am trying to modify the following INVITE message:
INVITE sip:00522375568 at 10.9.101.166:5060;user=phone SIP/2.0
Via: SIP/2.0/UDP 172.16.52.7:5061
From: Fax Alcatel <sip:+390522375507 at 172.16.52.7:5061>;tag=B0A3C63723A2
To: sip:00522375568 at 10.9.101.166:5060
Call-ID: 8f917371-ff97-4953-bc3d-fdba788fe45a at 172.16.52.7
CSeq: 101 INVITE
Max-Forwards: 70
Contact: <sip:+390522375507 at 172.16.52.7:5061;user=phone>
User-Agent: Alcatel-Lucent OmniTouch Fax Server Application/6.5.6.28
P-Alcatel-CSBU: charging=sip:2542 at ucalcatel.sedoc.locale
Content-Type: application/sdp
Content-Length: 235
v=0
o=XMedius-Fax-Gateway 79844629 629 IN IP4 172.16.52.7
s=SIP Fax Call
c=IN IP4 172.16.52.7
t=0 0
m=audio 62186 RTP/AVP 18 8 4
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:8 PCMA/8000
a=rtpmap:4 G723/8000
a=ptime:20
As Osiris sayd I started to write into usr_preferences table the following:
*opensipsctl avp add -T usr_preferences +390522375507 at 172.16.52.7 is_FAX 0
y*
+------+---------------+-------------+-----------+------+-------+
| uuid | username | domain | attribute | type | value |
+------+---------------+-------------+-----------+------+-------+
| | +390522375507 | 172.16.52.7 | is_FAX | 0 | y |
+------+---------------+-------------+-----------+------+-------+
then I should use AVP to delete first "0" from INVITE field and TO field and
change "10.9.101.166 (is OpenSIPS)" with "10.9.6.3 (is PBX's ip)"
INVITE sip:*0*0522375568 at 10.9.101.166:5060;user=phone SIP/2.0
and
To: sip:*0*0522375568 at 10.9.101.166:5060
and repleace them with 87019; so my new FROM and To will should became:
INVITE sip:*87019*0522375568@*10.9.6.3*:5060;user=phone SIP/2.0
and
To: sip:*87019*0522375568@*10.9.6.3*:5060
Please, can you help me to write this script/route logic ????
I would really appreciate it.
Thanks in advance
--
View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-To-s-field-and-forward-tp7040781p7054894.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
More information about the Users
mailing list