Hi!
Tanks for the answer. subst() did work but obviously didn't solve the
problem.
Below is the debug trace for the subst and a snippet from the used
ser.cfg. As you can see, subst works good, but ser still stores
xx(a)100.100.100.100 as aor. Maybe my regex isn't good enough? Maybe the
approach is wrong at all if ser extracts the vital header information
already before entering the routing script at all.
(IPs in the dumps are replaced, ser is 100.100.100.100, phone is
100.100.100.131, domain is mydomain.org)
0(8293) method: <REGISTER>
0(8293) uri: <sip:100.100.100.100:5060>
0(8293) version: <SIP/2.0>
0(8293) parse_headers: flags=1
0(8293) end of header reached, state=5
0(8293) parse_headers: Via found, flags=1
0(8293) parse_headers: this is the first via
0(8293) After parse_msg...
0(8293) preparing to run routing scripts...
0(8293) parse_headers: flags=128
0(8293) end of header reached, state=9
0(8293) DEBUG: get_hdr_field: <To> [48]; uri=[sip:31@100.100.100.100:5060]
0(8293) DEBUG: to body ["optiPoint 1 (31)" <sip:31@100.100.100.100:5060>
]
0(8293) get_hdr_field: cseq <CSeq>: <2012717775> <REGISTER>
0(8293) DEBUG: get_hdr_body : content_length=0
0(8293) found end of header
0(8293) DEBUG: is_maxfwd_present: max_forwards header not found!
0(8293) parse_headers: flags=256
0(8293) find_first_route(): No Route headers found
0(8293) loose_route(): There is no Route HF
0(8293) grep_sock_info - checking if host==us: 13==13 &&
[100.100.100.100] == [100.100.100.100]
0(8293) grep_sock_info - checking if port 5060 matches port 5060
0(8293) grep_sock_info - checking if host==us: 13==13 &&
[100.100.100.100] == [100.100.100.100]
0(8293) grep_sock_info - checking if port 5060 matches port 5060
0(8293) #### Authenticate ###
0(8293) check_nonce(): comparing
[4187b4fa25e5e432b9e0bd204a429446c2a3ae9b] and
[4187b4fa0e8bde761be567ab9dd0f201ab31ab49]
0(8293) pre_auth(): Invalid nonce value received
0(8293) build_auth_hf(): 'WWW-Authenticate: Digest
realm="mydomain.org", nonce="4187b536507484b10dcc87b97b7ee4866bf23601"
'
0(8293) parse_headers: flags=-1
0(8293) check_via_address(100.100.100.131, 100.100.100.131, 0)
0(8293) DEBUG:destroy_avp_list: destroying list (nil)
0(8293) receive_msg: cleaning up
0(8293) SIP Request:
0(8293) method: <REGISTER>
0(8293) uri: <sip:100.100.100.100:5060>
0(8293) version: <SIP/2.0>
0(8293) parse_headers: flags=1
0(8293) end of header reached, state=5
0(8293) parse_headers: Via found, flags=1
0(8293) parse_headers: this is the first via
0(8293) After parse_msg...
0(8293) preparing to run routing scripts...
0(8293) parse_headers: flags=128
0(8293) end of header reached, state=9
0(8293) DEBUG: get_hdr_field: <To> [48]; uri=[sip:31@100.100.100.100:5060]
0(8293) DEBUG: to body ["optiPoint 1 (31)" <sip:31@100.100.100.100:5060>
]
0(8293) get_hdr_field: cseq <CSeq>: <2012717776> <REGISTER>
0(8293) DEBUG: get_hdr_body : content_length=0
0(8293) found end of header
0(8293) DEBUG: is_maxfwd_present: max_forwards header not found!
0(8293) parse_headers: flags=256
0(8293) find_first_route(): No Route headers found
0(8293) loose_route(): There is no Route HF
0(8293) grep_sock_info - checking if host==us: 13==13 &&
[100.100.100.100] == [100.100.100.100]
0(8293) grep_sock_info - checking if port 5060 matches port 5060
0(8293) grep_sock_info - checking if host==us: 13==13 &&
[100.100.100.100] == [100.100.100.100]
0(8293) grep_sock_info - checking if port 5060 matches port 5060
0(8293) #### Authenticate ###
0(8293) check_nonce(): comparing
[4187b536507484b10dcc87b97b7ee4866bf23601] and
[4187b536507484b10dcc87b97b7ee4866bf23601]
0(8293) HA1 string calculated: 6a3f36c88615ea8517a2806d05102e83
0(8293) check_response(): Our result = 'c8fd067f0bb9cdb7a4688cde18a5d3cb'
0(8293) check_response(): Authorization is OK
0(8293) save_rpid(): rpid value is ''
0(8293) subst_run: running. r=0
0(8293) subst_run: matched (60, 20): [sip:31@100.100.100.100]
0(8293) subst_run: running. r=0
0(8293) subst_run: matched (114, 20): [sip:31@100.100.100.100]
0(8293) subst_run: running. r=1
0(8293) textops: subst_f: replacing at offset 101
[sip:31@100.100.100.100] with [sip:31@mydomain.org]
0(8293) textops: subst_f: replacing at offset 155
[sip:31@100.100.100.100] with [sip:31@mydomain.org]
0(8293) subst_f: lst was 0x80fd498
0(8293) #### IP replaced! ###
0(8293) #### saving location ###
0(8293) parse_headers: flags=-1
0(8293) parse_headers: flags=33554432
0(8293) build_contact(): Created Contact HF: Contact:
<sip:31@100.100.100.131:5060>;expires=90
0(8293) parse_headers: flags=-1
0(8293) check_via_address(100.100.100.131, 100.100.100.131, 0)
0(8293) #### break ###
0(8293) DEBUG:destroy_avp_list: destroying list (nil)
0(8293) receive_msg: cleaning up
snippet of ser.cfg:
if (uri==myself) {
if (method=="REGISTER") {
log (1, "#### Authenticate ###\n");
# Uncomment this if you want to use digest authentication
if (!www_authorize("mydomain.org", "subscriber")) {
www_challenge("mydomain.org", "0");
break;
};
if (
subst('/sip:([^@]*)@100.100.100.100/sip:\1@mydomain.org/ig') ) {
log (1, "#### IP replaced! ###\n");
};
log (1, "#### saving location ###\n");
save("location");
log (1, "#### break ###\n");
break;
};
Hope someone can help me out of this one. Used version of ser is
0.8.99-dev12 (cvs checkout around 15:30 UTC on Nov 2 2004)
Thanks.
Alex Mack.
Claus Futtrup wrote:
> Hi
>
> You can use subst("") function in SER to handle rewriting of the To:
> header
> before you do save("") (requires little regular expression magic which I
> can help with if you are not familiar with REs :-).
>
> Kind Regards
>
> Claus Futtrup
> Project Manager
> GoIP, The IP telephone company
>
> Mail: cf(a)goip.dk
>
> Tlf: +45 46968000
> Fax: +45 46968001
> GoIP: +45 32716064
>
> "The box said 'Requires Windows 95, NT, or better,' so I installed
> Linux."
>
> This message is for the designated recipient only and may contain
> privileged
> or confidential information. If you have received it in error, please
> notify the sender immediately and delete the original. Any other use
> of the
> email by you is prohibited.
> ----- Original Message ----- From: "Alex Mack" <amack(a)fhm.edu>
> To: <serusers(a)lists.iptel.org>
> Sent: Tuesday, November 02, 2004 11:55 AM
> Subject: Re: [Serusers] Problem with specific phones only able to
> registerto ipnumber andnotdomain..
>
>
>> I have similar problems (Siemens Optipoint 400) and I'm interested in
>> a solution, too. I've posted to this mailing list a week ago. See
>> below for the messages so far.
>>
>> Claus Futtrup wrote:
>>
>>> Hi Guys,
>>>
>>> I have this problem with a few phones, that they can only use IP
>>> number for
>>> proxy adress and domain. So when they register to the proxy, the
>>> location
>>> database will have user@ipnumber and not user@domain (use_domain, 0).
>>>
>>> The problem is then as follows: that when a caller that registeres
>>> with the
>>> domain name are unable to call users that register with the domains IP
>>> number and vice versa. lookup("location") simply replies not found.
>>>
>>> Now I know why it happens, but is there a solution for this problem.
>>> Like
>>> only look at user and not user@domain or user@ipnumber?
>>>
>>> Kind Regards
>>>
>>> Claus Futtrup
>>>
>>> _______________________________________________
>>> Serusers mailing list
>>> serusers(a)lists.iptel.org
>>> http://lists.iptel.org/mailman/listinfo/serusers
>>
>>
>>
>>> Hi Alex,
>>>
>>> Have you enabled "use_domain" parameter for usrloc module? If you
>>> set it to 0 (as default) usrloc will not use the domain part to
>>> perform usrloc lookup.
>>>
>>> Best regards,
>>> Marian Dumitru
>>>
>>> Alex Mack wrote:
>>>
>>>> Hi!
>>>>
>>>> I'm using ser with X-Ten Lite Soft-UA and Siemens optiPoint 400 IP
>>>> phones. Problem is: the Siemens phones don't register themselves
>>>> correctly.
>>>>
>>>> For example:
>>>> (e.g., ser has IP 100.100.100.100)
>>>>
>>>> Soft-UA is "sip:30@mydomain.org"
>>>> Phone 1 is "sip:31@mydomain.org"
>>>> Phone 2 is "sip:32@mydomain.org"
>>>>
>>>> Soft-UA registers itself as "sip:30@mydomain.org"
>>>> Phone 1 registers itself as "sip:31@100.100.100.100" (seems to be
>>>> odd behaviour)
>>>> Phone 2 registers itself as "sip:32@100.100.100.100"
>>>>
>>>> But now the lookup fails if you start dialing from the phones. If
>>>> you dial "32" (e.g. from Phone 1), the phone generates an INVITE to
>>>> "sip:32@mydomain.org" which can't be found in usrloc (DEBUG tells
>>>> that) and the call fails. If you dial "30" from the same phone, the
>>>> call comes through, because "sip:30@mydomain.org" was found in usrloc.
>>>> I tried to mangle the uri in the REGISTER message before
>>>> "save("location");", without effect. I've used "replace(re, str)",
>>>> but it didn't seem to work.
>>>>
>>>> Any ideas to overcome that bug of the phones?
>>>>
>>>> Thanks!
>>>> Alex.
>>>>
>>>> _______________________________________________
>>>> Serusers mailing list
>>>> serusers(a)lists.iptel.org
>>>> http://lists.iptel.org/mailman/listinfo/serusers
>>>>
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org
>> http://lists.iptel.org/mailman/listinfo/serusers
>>
>
Hi,
I have SER running on an IPv6 (dual stack Suse) box, and would like to find
a Windows Ipv6 SIP client that works with ser, for "IPv6 SIP demo" purposes.
The client should have IM and presence and P2P audio at least?
Any suggestions? I've tried Windows Messenger, to no avail.
Kphone looks quite good but only runs on Linux..
Thanks in advance,
Sean
Hello, all
I looking for SIP server for implement VoIP services ,who can provide and implement this services?
For frist phase I need to start at 50,000 subs., 5,000 concurrents and upgrade in future.
I will give you more information later.
Thank you,all
---------------------------------
Do you Yahoo!?
Check out the new Yahoo! Front Page. www.yahoo.com/a
Hi All,
Is there any way to find out From address when a
REGISTER request is received?
I am running SER on Red Hat Linux 9.
SER version is 0.8.14.
It is running fine by default and I am able to
transfer requests across 2 servers by modifing the
ser.cfg. But not able to validate the phone number for
REGISTER requests.
Appreciate your help in this regard.
Many thanks.
Regards,
Suvendu.
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
I keep getting this error
HA1 calculation failed
when I try to do this ./ser_mysql.sh create
Im trying to set up a mysql database for ser.. I have
Fedora Core 2 with the lastest kernal.. and my ser
version is 8.14
Hi every body one of my freinds has just told me about
ser
sip serveur.
I want to developpe clients of ser to alow peoples to
download it and use it to call each other. I'm a
delphi programmer so i'm looking for ser API for
implementing my client using delphi.
regard.
Vous manquez despace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com
This isn't exactly an SER issue but it was suggested that I ask here -
iptel.org has an SRV record for a STUN:
_stun._udp.iptel.org. 86400 IN SRV 0 0 3478 sip.iptel.org.
But that server doesn't seem to be responding to STUN requests. Does anybody
know if it should be working? Or is working for them?
Thanks. Dennis
Thanks for the quick reply.
I looked at the sr_module.h and saw the defs that you are talking about.
Now I am starting SER with fork=yes and children=2.
so I get the following output from serctl ps cmd.
[root@test gl]# serctl ps
0 10771 attendant
1 10773 receiver child=0 sock=0 @ 192.168.160.12:5060
2 10774 receiver child=1 sock=0 @ 192.168.160.12:5060
3 10775 fifo server
4 10776 timer
5 10777 tcp receiver
6 10778 tcp receiver
7 10779 tcp main process
The only rank values that I can count on not to startup a socket connection
in the child_init function are -1, -2, -4.
The question I have is, how can I know in my child_init function that the
process that the child_init() function is called from is
"receiver child=n" ?
for example I know that if I have set children=2 in ser.cfg than the first 2
times the child_init function will be called from the receiver child=0 and
receiver child=1 thread. Also How come the tcp receiver is getting started
for each child ?
I hope that I am making sense here.
thanks,
Jignesh Gandhi
-----Original Message
From: Jan Janak
To: Gandhi, Jignesh
Cc: 'serusers(a)lists.iptel.org'
Sent: 11/3/2004 11:08 AM
Subject: Re: [Serusers] RE: SER in debug mode
no fork mode means that there will be only one process listening for and
processing SIP messages. In addition to that there will be also the
timer process (taking care of timers) and fifo process (processing
commands sent to ser over the FIFO interface). The child init function
will be called for all of them. See:
root@localhost:/home/janakj# serctl ps
0 6266 stand-alone receiver @ 127.0.0.1:5060
1 6267 timer
2 6268 fifo server
If you want to execute the code in the listening process only, then you
can ignore calls of child_init that have the parameter set to PROC_TIMER
and PROC_FIFO (defined in sr_module.h).
Note that it is usually a good idea to have the same environment in the
timer process as in the receiver as some functionality might be called
from the timer.
Jan.
On 03-11 10:14, Gandhi, Jignesh wrote:
> Hello all,
>
> I am trying to debug a new module that I have written.
> So I have set fork=no and debug=4 and commented out the
> child line.
>
> The question I have is that the how may times the child_init()
> function be called ?
>
>
> The child_init() function in my module sets up a socket connection
> to a server and I can see that the child_init() function is getting
> called 3 times. I do not understand this. Am I missing something ?
>
> The mod_init function is getting called only once, like it is supposed
to.
>
> I have attached the output from ser startup. The module that I have
written
> is called gl.
>
> Nov 2 14:07:20 sara ser: INFO: glenayre redirector(gl module)
initializing
> Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is initially 65535
> Nov 2 14:07:20 sara ser: INFO: udp_init: SO_RCVBUF is finally 262142
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-1 /
pid
> <10269>
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host =
localhost
> Nov 2 14:07:20 sara ser: INFO: fifo process starting: 10270
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #-2 /
pid
> <10270>
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host =
localhost
> Nov 2 14:07:20 sara ser: SER: open_uac_fifo: fifo server up at
> /tmp/ser_fifo...
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): init_child #1 /
pid
> <10268>
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): Initializing TCP
> connection
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP port = 1234
> Nov 2 14:07:20 sara ser: gl:INFO: gl_child_init(): TCP host =
localhost
>
> any help is appreciated,
>
> thanks,
> Jignesh Gandhi
> Software Engineer II
> Jignesh.Gandhi(a)glenayre.com
>
>
>
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
What can I do in order to make a decision based on
src_ip and the IP address in the URI domain? I have
calls between UAs located behind the same NAT on the
other end of a low bandwidth WAN circuit and want the
ability to not force the call through rtp_proxy. In
practice this works ok with a fixed IP address but I
am unsure how to make the process more dynamic. I am
new to SER and still learning the features and
scripting language so I apologize of this topic is
covered somewhere else.
Regards,
Allan
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca
Hi All,
To be more specific on the problem, I am using the following network
configuration.
HOST1 XP---FW/NAT---Internet---HOST2 XP
Network Configuraton:
Host1's IP address : 172.16.4.8
FW Internal address: 172.16.4.1
FW external address: 202.125.84.163
Host2's IP address : 202.125.84.164
SER(public server) : 195.37.77.99
FW/NAT has SIP-ALG implementation.
SJPhone is installed on both Host1 and Host2. Now Host1 registers with the
SIP proxy server.
The register request after the NAT(ALG) process has the src port of
55001(IP:202.125.84.163) and
the contact port of 60002(IP:202.125.84.163). Similarly SJphone on Host2 is
also registered with
the proxy server. Now when a call is made to Host1 from Host2 using
SJPhone, the SIP invite
request coming from Host2 is sent to the proxy server, which in turn is
sending it to
202.125.84.163 on port 55001(source port of register). This request is
supposed to come on port
60002(contact port of register).
A month back when i tested in the same configuration, the request from the
external machine was coming on the contact port of the register
request(according to the RFC 3261). But when i tested it yesterday it was
having the mentioned problem behavior. Could someone please let me know if
anything is changed in the proxy server(SER) which is causing this
behavior. Also how this behavior can be avoided.
Thanks in advance.
Best Regards
Mahesh