1

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

INVITE sip:s@197.237.56.175: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:25420570101@41.72.194.48>;tag=6Bjgy3y22Nvpm
To: <sip:254205700263@41.72.194.63>

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?

Ankit Doshi
  • 1,164
  • 3
  • 21
  • 43

1 Answers1

0

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.

Liviu Chircu
  • 1,000
  • 3
  • 11
  • 24