1
votes

I am trying to forward call from opensips to PBX. but opensips is forward call with below invite

INVITE sip:[email protected]:5160 SIP/2.0
Record-Route: <sip:41.72.194.63;lr;did=bb.b18255a4>
Via: SIP/2.0/UDP 41.72.194.63:5060;branch=z9hG4bK4ee8.d7681d24.1
Via: SIP/2.0/UDP 41.72.194.48;received=41.72.194.48;rport=5060;branch=z9hG4bKUttKpDXZ34XUS
Max-Forwards: 28
From: "Ankit" <sip:[email protected]>;tag=6Bjgy3y22Nvpm
To: <sip:[email protected]>

Here issue in 1st line its forward invite with s@ip but i want to convert into number@ip like 254205700263@ip

Any ideas,Any suggestions?

1

1 Answers

0
votes

In your OpenSIPS script, you can use the $rU variable, which will directly overwrite the "username" part. Here is an example:

...
$rU = "254205700263";
...
t_relay(); # send it out

The core variables may prove to be a useful learning tool, especially if you're new to the script.