Yate Community Forum

Yate server => Other Yate server issues => Topic started by: arts111199 on January 11, 2014, 01:01:11 PM

Title: SIP User=Phone
Post by: arts111199 on January 11, 2014, 01:01:11 PM
Hi

Can you help me how to add user=phone in SIP invite in regexroute.conf
Title: Re: SIP User=Phone
Post by: asymetrixs on January 12, 2014, 07:43:21 AM
Check
http://yate.null.ro/pmwiki/index.php?n=Main.RegularExpressions
http://docs.yate.ro/wiki/Regular_expressions
http://docs.yate.ro/wiki/Routing_tips_from_various_users

just add it
Title: Re: SIP User=Phone
Post by: arts111199 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.
Title: Re: SIP User=Phone
Post by: marian 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>
Title: Re: SIP User=Phone
Post by: Doug 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?
Title: Re: SIP User=Phone
Post by: arts111199 on January 14, 2014, 01:34:12 AM
Thank you
Title: Re: SIP User=Phone
Post by: marian on January 14, 2014, 01:44:49 AM
Hi Doug,

I don't understand your question.
Title: Re: SIP User=Phone
Post by: Doug 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
Title: Re: SIP User=Phone
Post by: marian 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.
Title: Re: SIP User=Phone
Post by: cc08 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 :)


Title: Re: SIP User=Phone
Post by: marian 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!
Title: Re: SIP User=Phone
Post by: cc08 on March 18, 2014, 01:23:49 AM
Thanks, Marian!
I made it!