I have my nokia n900 setup to receive sipsorcery calls. Whenever I received a call, I get caller ID as 1234567890@12.23.456.78, basically in the form of <number>@<ip address>
The @<ipaddress> part is very cumbersome. First, it does not allow the phone to recognize the caller in the address book. Second, when I want to do a simple call back, the @<ipaddress> will screw up the dial plan. Is there anyway to remove the @<ipaddress> part from the incoming caller ID?
THanks
Help with incoming caller ID
Re: Help with incoming caller ID
I have Nokia E71 and as far as I remember, it doesn't match numbers with "regular" phone fields of the Contacts (like Home, Mobile or Work phone). You have to have an entry in the "SIP" field for the contact.
As far as the "host" part is concerned, you can change it using fh option in sys.Dial:
sys.Dial("#{sys.Username}@local[fh=sipsorcery.com]")
while forwarding incoming calls to your phone. Then all calls will arrive with @sipsorcery.com as the host and you should have no problems matching them with your contacts and calling back.
As far as the "host" part is concerned, you can change it using fh option in sys.Dial:
sys.Dial("#{sys.Username}@local[fh=sipsorcery.com]")
while forwarding incoming calls to your phone. Then all calls will arrive with @sipsorcery.com as the host and you should have no problems matching them with your contacts and calling back.
Re: Help with incoming caller ID
thanks for the suggestion. It indeed made the incoming number looked like @sipsorcery.com
Here is my other problem: the incoming number from sip now look like
+12345678901@sipsorcery.com
The actual number that I would store in my phone's contact list is 2345678901. So sipsorcery put a +1 in front of the number. Is there anyway to remove the +1 from the incoming caller ID?
Also, is there anyway I can completely remove the @sipsorcery.com part?
Here is my other problem: the incoming number from sip now look like
+12345678901@sipsorcery.com
The actual number that I would store in my phone's contact list is 2345678901. So sipsorcery put a +1 in front of the number. Is there anyway to remove the +1 from the incoming caller ID?
Also, is there anyway I can completely remove the @sipsorcery.com part?
Re: Help with incoming caller ID
I don't think Sipsorcery is changing caller's number, the "+1" prefix must be coming from your DID. You can change it to anything you want, something like this:
For more sophisticated example, check out this dialplan or refer to Caller's name lookup dialplan.
I wouldn't recommend removing the country code ('1'), though.
As to the host name, you can't remove it. SIP URI is in form:
Name <sip:User@Host>
Name is optional. You must have something before and after '@'.
Code: Select all
num = req.Header.from.FromURI.User.to_s #get original caller's number
num =~ /^(\+?1)?([2-9]\d\d[2-9]\d{6})/ && num = $2
sys.Dial("#{sys.Username}@local[fu=#{num},fh=sipsorcery.com]")
I wouldn't recommend removing the country code ('1'), though.
As to the host name, you can't remove it. SIP URI is in form:
Name <sip:User@Host>
Name is optional. You must have something before and after '@'.