never write private emails. They will be simply discarded.
ngrep gets the traffic before the firewall. Do you have a firewall?
start kamailio with log_stderror=yes and debug=5. if you don't see any sip message processing, then sip traffic does not reach the application layer.
Cheers, Daniel
On 11/18/10 10:39 AM, Danny Dias wrote:
Thanks for the answer Daniel,
2010/11/17 Daniel-Constantin Mierlamiconda@gmail.com
Hello,
On 11/17/10 6:58 PM, Danny Dias wrote:
Hello, I'm having problems with my kamailio, my phones are unable to register into the Proxy. I have been checking with ngrep-sip and all i'm receiving is many REGISTER from the phones but never getting some response from the Proxy The Proxy has a public IP and the phones are behind NAT. The weir thing is that my logs are not showing any output...and as you can see on the script, i have a section to receive REGISTER requests.... if (is_method("REGISTER")) { if (!save("location")) { sl_reply_error(); } exit; }
If everything is fine, then no log message should be printed if debug parameter is low.
But i should see in the Kamailio logs the answers, right? or i have to configure this on the scripts?
My debug is on "3"
But if you run in debug mode with a high value and nothing is printed, then the SIP traffic does not reach the>application. A reason for that might be a firewall, do you run one?
The SIP traffic is arriving the machine (at least), i have checked this with the ngrep on the server running kamailio:
# U 2010/11/18 10:26:03.331925 212.230.253.164:43686 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:43686;branch=z9hG4bK247264420;rport' From:sip:101@212.230.19.191;tag=1251867918' To:sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 4647 REGISTER' Contact:sip:101@10.134.16.164:43686;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' '
# U 2010/11/18 10:26:05.339925 212.230.253.164:43686 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:43686;branch=z9hG4bK247264420;rport' From:sip:101@212.230.19.191;tag=1251867918' To:sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 4647 REGISTER' Contact:sip:101@10.134.16.164:43686;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0'
And i never gets a response from Kamailio, for example, a 200 OK, or a 407 unauthorized...
What can i do?
Cheers, Daniel
-- Daniel-Constantin Mierla http://www.asipto.com
-- Ing. Danny Dias www.DannTEL.net
Hello...
2010/11/18 Daniel-Constantin Mierla miconda@gmail.com:
never write private emails. They will be simply discarded.
Sorry Daniel i did not realize that i was sending the email to you
ngrep gets the traffic before the firewall. Do you have a firewall?
No i do not have a firewall. This is so weird!
start kamailio with log_stderror=yes and debug=5. if you don't see any sip message processing, then sip traffic does not reach the application layer.
I do have log_stderror=yes and debug=5 and i do not see any message and no any answer to my REGISTER, am i missing something in my script? (in the initial message of this thread you can see the kamailio.cfg)
Cheers, Daniel
On 11/18/10 10:39 AM, Danny Dias wrote:
Thanks for the answer Daniel,
2010/11/17 Daniel-Constantin Mierlamiconda@gmail.com
Hello,
On 11/17/10 6:58 PM, Danny Dias wrote:
Hello, I'm having problems with my kamailio, my phones are unable to register into the Proxy. I have been checking with ngrep-sip and all i'm receiving is many REGISTER from the phones but never getting some response from the Proxy The Proxy has a public IP and the phones are behind NAT. The weir thing is that my logs are not showing any output...and as you can see on the script, i have a section to receive REGISTER requests.... if (is_method("REGISTER")) { if (!save("location")) { sl_reply_error(); } exit; }
If everything is fine, then no log message should be printed if debug parameter is low.
But i should see in the Kamailio logs the answers, right? or i have to configure this on the scripts?
My debug is on "3"
But if you run in debug mode with a high value and nothing is printed, then the SIP traffic does not reach the>application. A reason for that might be a firewall, do you run one?
The SIP traffic is arriving the machine (at least), i have checked this with the ngrep on the server running kamailio:
# U 2010/11/18 10:26:03.331925 212.230.253.164:43686 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:43686;branch=z9hG4bK247264420;rport' From:sip:101@212.230.19.191;tag=1251867918' To:sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 4647 REGISTER'
Contact:sip:101@10.134.16.164:43686;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' '
# U 2010/11/18 10:26:05.339925 212.230.253.164:43686 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:43686;branch=z9hG4bK247264420;rport' From:sip:101@212.230.19.191;tag=1251867918' To:sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 4647 REGISTER'
Contact:sip:101@10.134.16.164:43686;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0'
And i never gets a response from Kamailio, for example, a 200 OK, or a 407 unauthorized...
What can i do?
Cheers, Daniel
-- Daniel-Constantin Mierla http://www.asipto.com
-- Ing. Danny Dias www.DannTEL.net
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Trainings Nov 22-25, 2010, Berlin, Germany Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com
On 11/18/10 3:56 PM, Danny Dias wrote:
Hello...
2010/11/18 Daniel-Constantin Mierlamiconda@gmail.com:
never write private emails. They will be simply discarded.
Sorry Daniel i did not realize that i was sending the email to you
ngrep gets the traffic before the firewall. Do you have a firewall?
No i do not have a firewall. This is so weird!
start kamailio with log_stderror=yes and debug=5. if you don't see any sip message processing, then sip traffic does not reach the application layer.
I do have log_stderror=yes and debug=5 and i do not see any message and no any answer to my REGISTER, am i missing something in my script? (in the initial message of this thread you can see the kamailio.cfg)
How do you start kamailio?
When debug=5 you get log messages before the config is executed, as soon as something is received. So if you don't see anything, then kamailio does not receive anything on the sockets it listens to.
Cheers, Daniel
Hello Daniel,
2010/11/19 Daniel-Constantin Mierla miconda@gmail.com:
On 11/18/10 3:56 PM, Danny Dias wrote:
Hello...
2010/11/18 Daniel-Constantin Mierlamiconda@gmail.com:
never write private emails. They will be simply discarded.
Sorry Daniel i did not realize that i was sending the email to you
ngrep gets the traffic before the firewall. Do you have a firewall?
No i do not have a firewall. This is so weird!
start kamailio with log_stderror=yes and debug=5. if you don't see any sip message processing, then sip traffic does not reach the application layer.
I do have log_stderror=yes and debug=5 and i do not see any message and no any answer to my REGISTER, am i missing something in my script? (in the initial message of this thread you can see the kamailio.cfg)
How do you start kamailio?
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
When debug=5 you get log messages before the config is executed, as soon as something is received. So if you don't see anything, then kamailio does not receive anything on the sockets it listens to.
Attached you will see the tail -f of my kamailio.log while i'm restarting kamailio
Cheers, Daniel
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Trainings Nov 22-25, 2010, Berlin, Germany Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
Your kamailio is not starting, check the logs:
Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:db_check_api: module db_mysql does not export db_use_table function Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:auth_db:mod_init: unable to bind to a database driver Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:init_mod: failed to initialize module auth_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:main: error while initializing modules
After running kamailio ensure the process(es) are running:
ps -ef | grep kamailio
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
Your kamailio is not starting, check the logs:
Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:db_check_api: module db_mysql does not export db_use_table function Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:auth_db:mod_init: unable to bind to a database driver Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:init_mod: failed to initialize module auth_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:main: error while initializing modules
After running kamailio ensure the process(es) are running:
ps -ef | grep kamailio
The rest of the logs (after the ERROR lines) clearly say that the processes are in shutdown due to the detected error (configuration error):
Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:db_check_api: module db_mysql does not export db_use_table function Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:auth_db:mod_init: unable to bind to a database driver Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:init_mod: failed to initialize module auth_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:main: error while initializing modules Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module auth_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module auth Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module acc Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module xlog Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module siputils Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module uri_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module registrar Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module usrloc Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module pv Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module rr Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module tm Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: tm_shutdown : start Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:unlink_timer_lists: emptying DELETE list Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: emptying hash table Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: releasing timers Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: removing semaphores Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: destroying callback lists Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:tm:tm_shutdown: tm_shutdown : done Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module sl Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:destroy_modules: shutting down module mi_fifo Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:shm_mem_destroy: Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: DBG:core:shm_mem_destroy: destroying the shared memory lock
Your sip server does not run... it starts, but fails with:
Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:db_check_api: module db_mysql does not export db_use_table function Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:auth_db:mod_init: unable to bind to a database driver Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:init_mod: failed to initialize module auth_db Nov 19 13:38:58 Kamailio-DANNDP /usr/sbin/kamailio[20246]: ERROR:core:main: error while initializing modules
You should you add loadmodule db_mysql to your config file. If you try using other database than MySQL, then you need to instruct auth_db module to use it via module parameter modparam("auth_db", "db_url", "dbdriver://username:password@dbhost/dbname").
Michal
Danny Dias píše v Pá 19. 11. 2010 v 14:04 +0100:
Hello Daniel,
2010/11/19 Daniel-Constantin Mierla miconda@gmail.com:
On 11/18/10 3:56 PM, Danny Dias wrote:
Hello...
2010/11/18 Daniel-Constantin Mierlamiconda@gmail.com:
never write private emails. They will be simply discarded.
Sorry Daniel i did not realize that i was sending the email to you
ngrep gets the traffic before the firewall. Do you have a firewall?
No i do not have a firewall. This is so weird!
start kamailio with log_stderror=yes and debug=5. if you don't see any sip message processing, then sip traffic does not reach the application layer.
I do have log_stderror=yes and debug=5 and i do not see any message and no any answer to my REGISTER, am i missing something in my script? (in the initial message of this thread you can see the kamailio.cfg)
How do you start kamailio?
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
When debug=5 you get log messages before the config is executed, as soon as something is received. So if you don't see anything, then kamailio does not receive anything on the sockets it listens to.
Attached you will see the tail -f of my kamailio.log while i'm restarting kamailio
Cheers, Daniel
-- Daniel-Constantin Mierla Kamailio (OpenSER) Advanced Trainings Nov 22-25, 2010, Berlin, Germany Jan 24-26, 2011, Irvine, CA, USA http://www.asipto.com
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
The daemonized mode of Kamailio 3.X has been improved so it would result in error exit status in case the main process fails to start (so by invoking init service you would receive an error and exit status != 0).
However in Kamailio 1.5.X this is not true, and the daemon mode exits with zero (success) without waiting for the main process to properly start, so you get "success" after invoking the init service but Kamailio fails to start (due to errors in modules configuration, listening IP's....).
Thanks Iñaki,
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
The daemonized mode of Kamailio 3.X has been improved so it would result in error exit status in case the main process fails to start (so by invoking init service you would receive an error and exit status != 0).
That's good to know.
However in Kamailio 1.5.X this is not true, and the daemon mode exits with zero (success) without waiting for the main process to properly start, so you get "success" after invoking the init service but Kamailio fails to start (due to errors in modules configuration, listening IP's....).
I decided to comment the following lines in my kamailio.cfg:
#loadmodule "auth.so" #loadmodule "auth_db.so" #loadmodule "alias_db.so" #modparam("auth_db", "calculate_ha1", yes) #modparam("auth_db", "password_column", "password")
And now, restarting kamailio works:
<Kamailio-Testing> root@Kamailio-DANNDP:/home# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
<Kamailio-Testing> root@Kamailio-DANNDP:/home# ps -ef | grep kamailio root 20482 1 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20483 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20484 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20485 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20486 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20487 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20488 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20489 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20490 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20491 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20492 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20493 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20495 20429 0 19:23 pts/0 00:00:00 grep kamailio
By the way, in my kamctlr i have the #STORE_PLAINTEXT_PW=1, that means that it wont store the the passwords in the subscriber table...right¿?
Also, the REGISTER are having the same result:
interface: any filter: (ip or ip6) and ( port 5060 ) match: 100 # U 2010/11/19 19:25:14.239925 212.230.253.164:10091 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:10091;branch=z9hG4bK1590232060;rport' From: sip:101@212.230.19.191;tag=1251867918' To: sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 6878 REGISTER' Contact: sip:101@10.134.16.164:10091;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Authorization: Digest username="101", realm="212.230.19.191", nonce="4ce5bb3800000047aa806944ef2f6754dbff9fb1757db9ae", uri="sip:212.230.19.191", response="1f0f04efa3e0271c6937007dc9fd77e7", algorithm=MD5' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' '
# U 2010/11/19 19:25:18.247925 212.230.253.164:10091 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:10091;branch=z9hG4bK1590232060;rport' From: sip:101@212.230.19.191;tag=1251867918' To: sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 6878 REGISTER' Contact: sip:101@10.134.16.164:10091;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Authorization: Digest username="101", realm="212.230.19.191", nonce="4ce5bb3800000047aa806944ef2f6754dbff9fb1757db9ae", uri="sip:212.230.19.191", response="1f0f04efa3e0271c6937007dc9fd77e7", algorithm=MD5' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' ' . . . And never receiving and answer from Kamailio, attached you will find my kamailio.cfg, if you can check it and tell me what should i check i would appreciate it!!!
Regards
-- Iñaki Baz Castillo ibc@aliax.net
Thanks Iñaki,
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
I start Kamailio with /etc/init.d/kamailio restart:
<Kamailio-Testing> root@Kamailio-DANNDP:~# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
The daemonized mode of Kamailio 3.X has been improved so it would result in error exit status in case the main process fails to start (so by invoking init service you would receive an error and exit status != 0).
That's good to know.
However in Kamailio 1.5.X this is not true, and the daemon mode exits with zero (success) without waiting for the main process to properly start, so you get "success" after invoking the init service but Kamailio fails to start (due to errors in modules configuration, listening IP's....).
I decided to comment the following lines in my kamailio.cfg:
#loadmodule "auth.so" #loadmodule "auth_db.so" #loadmodule "alias_db.so" #modparam("auth_db", "calculate_ha1", yes) #modparam("auth_db", "password_column", "password")
And now, restarting kamailio works:
<Kamailio-Testing> root@Kamailio-DANNDP:/home# /etc/init.d/kamailio restart Restarting Kamailio SIP server: kamailioListening on udp: 212.230.19.191 [212.230.19.191]:5060 Aliases: udp: Kamailio-DANNDP:5060
<Kamailio-Testing> root@Kamailio-DANNDP:/home# ps -ef | grep kamailio root 20482 1 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20483 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20484 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20485 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20486 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20487 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20488 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20489 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20490 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20491 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20492 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20493 20482 0 19:22 ? 00:00:00 /usr/sbin/kamailio -P /var/run/kamailio/kamailio.pid -m 64 -u root -g root root 20495 20429 0 19:23 pts/0 00:00:00 grep kamailio
By the way, in my kamctlr i have the #STORE_PLAINTEXT_PW=1, that means that it wont store the the passwords in the subscriber table...right¿?
Also, the REGISTER are having the same result:
interface: any filter: (ip or ip6) and ( port 5060 ) match: 100 # U 2010/11/19 19:25:14.239925 212.230.253.164:10091 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:10091;branch=z9hG4bK1590232060;rport' From: sip:101@212.230.19.191;tag=1251867918' To: sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 6878 REGISTER' Contact: sip:101@10.134.16.164:10091;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Authorization: Digest username="101", realm="212.230.19.191", nonce="4ce5bb3800000047aa806944ef2f6754dbff9fb1757db9ae", uri="sip:212.230.19.191", response="1f0f04efa3e0271c6937007dc9fd77e7", algorithm=MD5' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' '
# U 2010/11/19 19:25:18.247925 212.230.253.164:10091 -> 212.230.19.191:5060 REGISTER sip:212.230.19.191 SIP/2.0' Via: SIP/2.0/UDP 10.134.16.164:10091;branch=z9hG4bK1590232060;rport' From: sip:101@212.230.19.191;tag=1251867918' To: sip:101@212.230.19.191' Call-ID: 2022066534-16466-1@BA.BDE.BG.BGE' CSeq: 6878 REGISTER' Contact: sip:101@10.134.16.164:10091;reg-id=2;+sip.instance="urn:uuid:00000000-0000-1000-8000-000B821FA066"' Authorization: Digest username="101", realm="212.230.19.191", nonce="4ce5bb3800000047aa806944ef2f6754dbff9fb1757db9ae", uri="sip:212.230.19.191", response="1f0f04efa3e0271c6937007dc9fd77e7", algorithm=MD5' Max-Forwards: 70' User-Agent: Grandstream GXV3140 1.0.1.1' Supported: path' Expires: 3600' Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE' Content-Length: 0' ' . . . And never receiving and answer from Kamailio, attached you will find my kamailio.cfg, if you can check it and tell me what should i check i would appreciate it!!!
Regards
-- Iñaki Baz Castillo ibc@aliax.net
-- Ing. Danny Dias www.DannTEL.net
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
And never receiving and answer from Kamailio, attached you will find my kamailio.cfg, if you can check it and tell me what should i check i would appreciate it!!!
Your iptables are blocking the port 5060. Sure.
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
And never receiving and answer from Kamailio, attached you will find my kamailio.cfg, if you can check it and tell me what should i check i would appreciate it!!!
Your iptables are blocking the port 5060. Sure.
Please show the output of:
iptables -L -n | grep 5060
(you can remove/change displayed IP's for privacy).
You were rigth Iñaki!!!!
IP tables problem
BEst regards and thanks for your help, also thanks to Daniel constantin!
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
2010/11/19 Iñaki Baz Castillo ibc@aliax.net:
2010/11/19 Danny Dias ing.diasdanny@gmail.com:
And never receiving and answer from Kamailio, attached you will find my kamailio.cfg, if you can check it and tell me what should i check i would appreciate it!!!
Your iptables are blocking the port 5060. Sure.
Please show the output of:
iptables -L -n | grep 5060
(you can remove/change displayed IP's for privacy).
-- Iñaki Baz Castillo ibc@aliax.net
Hi all!
I have to remove the Transparent Codec in the INVITE-Message to a dedicated SIP-Client, because the Client can not work with it. What do you think is the best methode to do this?
thanks, Hannes
Johannes,
On 11/24/2010 05:19 AM, Johannes Wagner-Meingassner wrote:
I have to remove the Transparent Codec in the INVITE-Message to a dedicated SIP-Client, because the Client can not work with it. What do you think is the best methode to do this?
While the motive is understandable, this is a bad idea. Proxies are supposed to relay messages, not modify them. There are certain fields of a message (for example, the Request URI in an initial request) that they can modify, and they can add additional headers, but in general, that is not their purpose an.d their modification capabilities are formally very restricted. It is fundamentally contrary to the purpose of a proxy in every way to do something like modify the SDP body.
On a practical level, the problem with modifying the SDP offer is that without stateful reversion applied to every answer sent (rather in the way that uac_replace_from() and 'topoh' work for other data), the sender of the offer is fully entitled to refuse an answer whose content does not reflect the original offer sent (since modifying SDP on the proxy would be opaque to the sender).
You really need to use a B2BUA for something like this.
Hi Alex,
It´s not really my idea and I also think it´s not the best way, but I have to search for options to do this.
Thanks, Hanns
---Ursprüngliche Nachricht----- Von: Alex Balashov [mailto:abalashov@evaristesys.com] Gesendet: Mittwoch, 24. November 2010 11:34 An: Johannes Wagner-Meingassner Cc: sr-users@lists.sip-router.org Betreff: Re: [SR-Users] Remove a CODEC in the Invite
Johannes,
On 11/24/2010 05:19 AM, Johannes Wagner-Meingassner wrote:
I have to remove the Transparent Codec in the INVITE-Message to a dedicated SIP-Client, because the Client can not work with it. What do you think is the best methode to do this?
While the motive is understandable, this is a bad idea. Proxies are supposed to relay messages, not modify them. There are certain fields of a message (for example, the Request URI in an initial request) that they can modify, and they can add additional headers, but in general, that is not their purpose an.d their modification capabilities are formally very restricted. It is fundamentally contrary to the purpose of a proxy in every way to do something like modify the SDP body.
On a practical level, the problem with modifying the SDP offer is that without stateful reversion applied to every answer sent (rather in the way that uac_replace_from() and 'topoh' work for other data), the sender of the offer is fully entitled to refuse an answer whose content does not reflect the original offer sent (since modifying SDP on the proxy would be opaque to the sender).
You really need to use a B2BUA for something like this.
-- Alex Balashov - Principal Evariste Systems LLC 1170 Peachtree Street NE 12th Floor, Suite 1200 Atlanta, GA 30309 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
Try the textops module: http://www.kamailio.org/docs/modules/3.1.x/modules_k/textops.html#id2907488
Regards, Ovidiu Sas
On Wed, Nov 24, 2010 at 5:19 AM, Johannes Wagner-Meingassner Johannes.Wagner-Meingassner@infotech.at wrote:
Hi all!
I have to remove the Transparent Codec in the INVITE-Message to a dedicated SIP-Client, because the Client can not work with it. What do you think is the best methode to do this?
thanks, Hannes _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users