Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to encode "@" special character in username parameter of FROM and TO header URI in PJSIP library while sending REGISTER message?

I'm developing iOS app with using of PJSIP. I want to send register message through PJSIP. I have @ in username, for example [email protected] .

I encoded @ as %40 and added account username as nandha%40gmail.com and SIP URL as sip:nandha%[email protected]:2020

I passed the username and sip url into PJSIP. Account is added successfully, but it can't send any REGISTER Message to the server.

I think it has added the encoded username and sip url. when sending register message it decoded the value as [email protected]@142.23.16.20:2020 and it takes IP PORT value after @ symbol, like as [email protected]:2020

why PJSIP not sending the REGISTER message while encoding username?

like image 683
Nandhakumar Kittusamy Avatar asked May 25 '17 10:05

Nandhakumar Kittusamy


People also ask

Can URL have special characters?

Some characters cannot be part of a URL (for example, the space) and some other characters have a special meaning in a URL. In HTML forms, the character = is used to separate a name from a value.


1 Answers

As I know, PJSIP automatically decode the Encoded characters while separating the username@sipIP:port

like image 187
Vijayvir Sing Pantlia Avatar answered Nov 15 '22 10:11

Vijayvir Sing Pantlia