Hi, may I was not clear while asking the question. when I want to call one URI and I want my client to contact with a particular sip server to get the contact information about other endpoint. What should I do? -- specifiy the proxy sip server with lr or do in need to do some thing more? now if I specify the proxy sip server, why should my sip client tries to resolve the URI to a IP address? BR EMON On Mon, Jul 14, 2008 at 3:33 PM, Benny Prijono <bennylp at pjsip.org> wrote: > On Mon, Jul 14, 2008 at 2:05 PM, Zahed Emon <ena2413 at gmail.com> wrote: > >> hi again, >> >> >>Have you look at the log? >> >> yes; I have , the to , from and contact look OK (as desired). >> but when I looked into the destination IP address of the invite in >> wireshark I got this IP 64.14.244.60. >> >> this is because the DNS resolver is not available and then it resolves the >> sip URI to that IP Address by gethostname(). (from the log below in red) >> > > Well, yes. > > >> >> why is this? how can it resolve the SIP URI to that IP address? >> > > I'm not sure I understand the question. If you specify a hostname in the > URI, do you expect it to do something else other than to resolve it to an IP > address? > > Cheers > benny > > > >> >> //EMON >> >> here is some snap from log file.. >> >> 14:43:22.949 tsx01752D0C Timeout timer event >> 14:43:22.949 tsx01752D0C State changed from Calling to Terminated, >> event=TIMER >> 14:43:22.949 pjsua_acc.c SIP registration failed, status=408 (Request >> Timeout) >> 14:43:22.952 tsx01752D0C Timeout timer event >> 14:43:22.952 tsx01752D0C State changed from Terminated to Destroyed, >> event=TIMER >> 14:43:22.952 tdta01751C78 Destroying txdata Request msg >> REGISTER/cseq=43937 (tdta01751C78) >> 14:43:22.952 tsx01752D0C Transaction destroyed! >> 14:44:16.234 pjsua_media.c pjsua_set_snd_dev(): attempting to open >> devices @16000 Hz >> 14:44:16.408 pasound.c Opened device Microphone (Realtek High >> Defini(MME)/Speakers (Realtek High Definiti(MME) for recording and playback, >> sample rate=16000, ch=1, bits=16, 320 samples per frame, input latency=100 >> ms, output latency=100 ms >> 14:44:16.408 pasound.c Starting Microphone (Realtek High Defini >> stream.. >> 14:44:16.409 pasound.c PA message: Pa_StartStream: waveInStart >> returned = 0x0. >> >> 14:44:16.409 pasound.c Done, status=0 >> 14:44:16.410 echo_speex.c Speex Echo canceller/AEC created, >> clock_rate=16000, samples per frame=320, tail length=200 ms, latency=200 ms >> 14:44:16.412 pjsua_call.c Making call with acc #2 to sip:zahed2 at xxx.com<sip%3Azahed2 at xxx.com> >> 14:44:16.412 dlg02C7817C UAC dialog created >> 14:44:16.420 pjsua_media.c Media index 0 selected for call 0 >> 14:44:16.421 dlg02C7817C Module mod-invite added as dialog usage, >> data=01738FB8 >> 14:44:16.422 dlg02C7817C Session count inc to 2 by mod-invite >> 14:44:16.422 dlg02C7817C Module mod-100rel added as dialog usage, >> data=02C78EB4 >> 14:44:16.422 dlg02C7817C 100rel module attached >> 14:44:16.422 inv02C7817C UAC invite session created for dialog >> dlg02C7817C >> 14:44:16.422 endpoint Request msg INVITE/cseq=15363 (tdta02C7CE88) >> created. >> 14:44:16.422 inv02C7817C Sending Request msg INVITE/cseq=15363 >> (tdta02C7CE88) >> 14:44:16.422 dlg02C7817C Sending Request msg INVITE/cseq=15363 >> (tdta02C7CE88) >> 14:44:16.422 tsx0177F4E4 Transaction created for Request msg >> INVITE/cseq=15362 (tdta02C7CE88) >> 14:44:16.422 tsx0177F4E4 Sending Request msg INVITE/cseq=15362 >> (tdta02C7CE88) in state Null >> 14:44:16.422 sip_resolve.c DNS resolver not available, target 'xxx.com:0' >> type=Unspecified will be resolved with gethostbyname() >> 14:44:16.461 pasound.c Recorder thread started >> 14:44:16.462 pasound.c Player thread started >> 14:44:16.462 aec01751CCC AEC reset, delay=0, prefetch=4 >> 14:44:16.462 aec01751CCC AEC Info: old frame removed (seq=1, want=-2, >> count=1) >> 14:44:16.463 aec01751CCC AEC Info: empty queue for seq=-2! >> 14:44:16.463 aec01751CCC AEC reset, delay=-2, prefetch=4 >> 14:44:16.515 aec01751CCC AEC reset, delay=-3, prefetch=4 >> 14:44:16.515 aec01751CCC AEC Info: old frame removed (seq=2, want=-2, >> count=1) >> 14:44:16.515 aec01751CCC AEC Info: empty queue for seq=-2! >> 14:44:16.568 aec01751CCC AEC Info: old frame removed (seq=3, want=-1, >> count=1) >> 14:44:16.568 aec01751CCC AEC Info: empty queue for seq=-1! >> 14:44:16.568 aec01751CCC AEC reset, delay=-4, prefetch=4 >> 14:44:16.568 aec01751CCC AEC Info: prefetching (first seq=4) >> 14:44:16.621 aec01751CCC AEC Info: prefetching (first seq=4) >> 14:44:16.621 aec01751CCC AEC Info: prefetching (first seq=4) >> 14:44:16.675 aec01751CCC AEC Info: prefetching (first seq=4) >> 14:44:16.675 aec01751CCC AEC info: queue is full, frame discarded >> [count=6, seq=10] >> 14:44:16.675 aec01751CCC AEC reset, delay=-1, prefetch=4 >> 14:44:16.675 aec01751CCC AEC Info: prefetching (first seq=10) >> 14:44:16.675 aec01751CCC AEC Info: prefetching (first seq=10) >> 14:44:16.728 aec01751CCC AEC Info: prefetching (first seq=10) >> 14:44:16.750 sip_resolve.c Target 'wipe.xxx:0' type=Unspecified resolved >> to '64.34.46.60:5060' type=UDP (UDP transport) >> 14:44:16.751 pjsua_core.c TX 1045 bytes Request msg INVITE/cseq=15362 >> (tdta02C7CE88) to UDP 64.34.46.60:5060: >> INVITE sip:zahed2 at xxx.com <sip%3Azahed2 at xxx.com> SIP/2.0 >> Via: SIP/2.0/UDP 92.254.195.215:5060 >> ;rport;branch=z9hG4bKPj13ac3b662210476abf55442c4f222d98 >> Max-Forwards: 70 >> From: sip:zahed1@xxxxxxx <sip%3Azahed1 at xxx.com> >> ;tag=649c0a49fcb7456582fb8b58e9180fa0 >> To: sip:zahed2 at xxx.com <sip%3Azahed2 at xxx.com> >> Contact: <sip:zahed1 at 92.254.195.215:5060> >> Call-ID: e9e69b640f504afdba1121ee6e8fec4a >> CSeq: 15362 INVITE >> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, >> PUBLISH, REFER, MESSAGE, OPTIONS >> Supported: replaces, 100rel, norefersub >> User-Agent: PJSUA v0.9.0-release/win32 >> Content-Type: application/sdp >> Content-Length: 465 >> >> v=0 >> o=- 3425035456 3425035456 IN IP4 92.254.195.215 >> s=pjmedia >> c=IN IP4 92.254.195.215 >> t=0 0 >> a=X-nat:0 >> m=audio 4000 RTP/AVP 103 102 104 117 3 0 8 9 101 >> a=rtcp:4001 IN IP4 92.254.195.215 >> a=rtpmap:103 speex/16000 >> a=rtpmap:102 speex/8000 >> a=rtpmap:104 speex/32000 >> a=rtpmap:117 iLBC/8000 >> a=fmtp:117 mode=30 >> a=rtpmap:3 GSM/8000 >> a=rtpmap:0 PCMU/8000 >> a=rtpmap:8 PCMA/8000 >> a=rtpmap:9 G722/8000 >> a=sendrecv >> a=rtpmap:101 telephone-event/8000 >> a=fmtp:101 0-15 >> >> >> >> >> >> On Mon, Jul 14, 2008 at 12:03 PM, Benny Prijono <bennylp at pjsip.org> >> wrote: >> > On Mon, Jul 14, 2008 at 10:45 AM, Zahed Emon <ena2413 at gmail.com> wrote: >> >> >> >> Hi, >> >> >> >> yes, I also think that the INVITE will be send directly. BUt I am not >> >> providing any URI which has that IP. In my network that IP is not >> >> available. I dont know from where it is getting the IP. >> > >> > Have you look at the log? >> > >> >> >> >> is this any default stun/turn server's IP? >> >> >> > >> > No. SIP requests are sent to the target URI or Route URI, and that's >> just >> > about it. >> > >> > Cheers >> > Benny >> > >> > >> >> >> >> BR >> >> >> >> Zahed >> >> >> >> On Mon, Jul 14, 2008 at 11:00 AM, Benny Prijono <bennylp at pjsip.org> >> wrote: >> >> > On Sat, Jul 12, 2008 at 9:11 PM, Zahed Emon <ena2413 at gmail.com> >> wrote: >> >> >> >> >> >> Hi, >> >> >> >> >> >> I have created my small app which just register with SIP server and >> >> >> makes call to other client. >> >> >> >> >> >> now the sip registration works fine. but I when tried to call other >> >> >> registered user I saw not SIP invite is going to SIP server rather >> >> >> they goes to some IP like 68.44.244.60. eventually it does not get >> any >> >> >> response and dies. >> >> >> >> >> >> I dont know why it is sending invite to the IP address? I tried with >> >> >> the pjsua_app application that comes with the distribution and still >> >> >> have the same problem. >> >> >> >> >> > >> >> > Since there's no route set, the INVITE will be sent to the target URI >> >> > (the >> >> > "URI" variable in your snippet). Is this not the case? >> >> > >> >> > -benny >> >> > >> >> > >> >> >> >> >> >> I am using UDP transport for SIP. I am behind a firewall that stops >> >> >> every UDP packet send outside and coming inside. >> >> >> >> >> >> please help me solve this problem. >> >> >> >> >> >> here is some snap of the code >> >> >> >> >> >> //Emon >> >> >> >> >> >> //add UDP tranport >> >> >> >> >> >> pjsua_transport_config trans_cfg_UDP; >> >> >> pjsua_transport_config_default(&trans_cfg_UDP); >> >> >> trans_cfg.public_addr = pj_str("xxx.yyy.zzz.146"); >> >> >> >> >> >> status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, >> >> >> &trans_cfg_UDP, >> >> >> &trans_id_UDP); >> >> >> if(status != PJ_SUCCESS) >> >> >> { >> >> >> error_exit("Error in creating UDP transport", status); >> >> >> } >> >> >> >> >> >> >> >> >> acc_cfg.id = pj_str(uri); >> >> >> acc_cfg.reg_uri = pj_str ("sip:"MYdomain); >> >> >> acc_cfg.cred_count = 1; >> >> >> acc_cfg.cred_info[0].realm = pj_str("*"); >> >> >> acc_cfg.cred_info[0].scheme = pj_str("digest"); >> >> >> acc_cfg.cred_info[0].username = pj_str(user); >> >> >> acc_cfg.cred_info[0].data_type = >> >> >> PJSIP_CRED_DATA_PLAIN_PASSWD; >> >> >> acc_cfg.cred_info[0].data = pj_str(pass); >> >> >> } >> >> >> >> >> >> >> >> >> status = pjsua_acc_add(&acc_cfg,PJ_TRUE,&acc_id); >> >> >> if(status != PJ_SUCCESS) >> >> >> { >> >> >> error_exit("Error in registration", status); >> >> >> } >> >> >> >> >> >> pj_str_t uri = pj_str(URI); >> >> >> >> >> >> status = pjsua_call_make_call(acc_id,&uri,0,NULL,NULL,NULL); >> >> >> if(status != PJ_SUCCESS) >> >> >> { >> >> >> error_exit("Error in Making call", status); >> >> >> } >> >> >> >> >> >> _______________________________________________ >> >> >> Visit our blog: http://blog.pjsip.org >> >> >> >> >> >> pjsip mailing list >> >> >> pjsip at lists.pjsip.org >> >> >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > >> >> > >> >> > _______________________________________________ >> >> > Visit our blog: http://blog.pjsip.org >> >> > >> >> > pjsip mailing list >> >> > pjsip at lists.pjsip.org >> >> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > >> >> > >> >> >> >> _______________________________________________ >> >> Visit our blog: http://blog.pjsip.org >> >> >> >> pjsip mailing list >> >> pjsip at lists.pjsip.org >> >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > >> > >> > _______________________________________________ >> > Visit our blog: http://blog.pjsip.org >> > >> > pjsip mailing list >> > pjsip at lists.pjsip.org >> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> > >> > >> >> >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >> >> > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080714/b6c8f68e/attachment-0001.html