Author Topic: SIP User=Phone  (Read 16909 times)

arts111199

  • Newbie
  • *
  • Posts: 28
    • View Profile
SIP User=Phone
« on: January 11, 2014, 01:01:11 PM »
Hi

Can you help me how to add user=phone in SIP invite in regexroute.conf

asymetrixs

  • Administrator
  • Newbie
  • *****
  • Posts: 47
    • View Profile
« Last Edit: January 12, 2014, 07:46:04 AM by asymetrixs »

arts111199

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: SIP User=Phone
« Reply #2 on: January 13, 2014, 01:00:21 AM »
With the help of

osip_To=<sip:${called}@${domain};user=phone> system understands ";" as the end of the line.

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: SIP User=Phone
« Reply #3 on: January 13, 2014, 02:15:49 AM »
Use chr regexroute function (see regexroute.conf.sample for more...):

osip_To=<sip:${called}@${domain}$(chr,59)user=phone>

Doug

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SIP User=Phone
« Reply #4 on: January 13, 2014, 06:47:45 AM »
hi marian,

we can also add or modify during the "register" in case of a custom login?

arts111199

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: SIP User=Phone
« Reply #5 on: January 14, 2014, 01:34:12 AM »
Thank you

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: SIP User=Phone
« Reply #6 on: January 14, 2014, 01:44:49 AM »
Hi Doug,

I don't understand your question.

Doug

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: SIP User=Phone
« Reply #7 on: January 14, 2014, 05:11:29 AM »
hi marian,

sorry, the question is: can we add parameters to the contact, add new headers or modify, such as the user-agent, in sip register for logging into an external gateway/server.

what is the most correct way to do it?

regards, doug

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: SIP User=Phone
« Reply #8 on: January 16, 2014, 02:03:52 AM »
It not possible to add custom sip headers to REGISTER or add contact parameters.
You can change user agent from ysipchan.conf for all SIP methods.

cc08

  • Guest
Re: SIP User=Phone
« Reply #9 on: January 16, 2014, 10:05:52 AM »
Marian,
If you have a plan for the introduction of such a possibility, it would be wonderful.
I also want to insert in the registration flow in the message something like :

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.133.3:5060;rport=5060;branch=z9hG4bK828309744
Contact: <sip:1037954576@192.168.133.3:5060;transport=UDP>;expires=300
To: <sip:1037954576@voice.com>;tag=5e67d836
From: <sip:1037954576@voice.com>;tag=160205178
Call-ID: 3450048@voice.com
CSeq: 12138 REGISTER
Date: Wed, 25 Jan 2004 01:02:56 GMT
YateBilling: available-funds:0.69019 currency:BTC
Content-Length: 0


...as the main operators :)



marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: SIP User=Phone
« Reply #10 on: January 17, 2014, 01:57:25 AM »
You can ask Diana for features.

It is possible to add custom sip headers in REGISTER response:
Just handle user.register message and add them with 'osip_' prefix!

cc08

  • Guest
Re: SIP User=Phone
« Reply #11 on: March 18, 2014, 01:23:49 AM »
Thanks, Marian!
I made it!