Summary: | ASTERISK-04235: problem to register by sipgate.de | ||
Reporter: | Dieter Ferdinand (dferdi) | Labels: | |
Date Opened: | 2005-05-19 15:39:46 | Date Closed: | 2011-06-07 14:10:40 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Interoperability |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | hello, i can't register for sipgate.de to receive calls. dialing is possible. i check the data and think, this problem comes from the used domain-address. in the call to sipgate the domain is sipgate.de for my account xxxxxxx@sipgate.de in the registration the domain is proxy.de.sipgate.de and this doesn't work. how can i set the fromdomain for the register command in sip.conf ? if i change the fromdomain for dial to proxy.de.sipgate.net or .de, i can't dial to sipgate. before i tried asterisk, i try a sip-proxy on my gate to call sipgate, that don't work, because sipgate don't allow a local proxy. the authorisation seems very restrictive. goodby ****** ADDITIONAL INFORMATION ****** 2005-05-19 22:18:47 NOTICE[4879]: chan_sip.c:4035 sip_reg_timeout: -- Registration for 'xxxxxxx@sipgate.de' timed out, trying again 2005-05-19 22:18:47 NOTICE[4879]: chan_sip.c:6819 handle_response: Failed to authenticate on REGISTER to '<sip:xxxxxx@proxy.de.sipgate.net>;tag=as3c210dc4' -- Called 10000@sipgate.de 2005-05-19 22:36:10 NOTICE[4879]: chan_sip.c:6848 handle_response: Failed to authenticate on INVITE to '"34" <sip:xxxxxxx@proxy.de.sipgate.net>;tag=as2e366fb4' | ||
Comments: | By: Dieter Ferdinand (dferdi) 2005-05-19 18:05:23 hello, i try to correct this problem with a patch and i find one. i changed chan_sip.c at line 4160 ff to set an other host as from host in the registration for sipgate: if (strcmp((char *) &p->fromdomain,"sipgate.de")==0) { snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, p->fromdomain, p->tag); if (!ast_strlen_zero(p->theirtag)) snprintf(to, sizeof(to), "<sip:%s@%s>;tag=%s", r->username, p->fromdomain, p->theirtag); else snprintf(to, sizeof(to), "<sip:%s@%s>", r->username, p->fromdomain); } else { snprintf(from, sizeof(from), "<sip:%s@%s>;tag=as%08x", r->username, p->tohost, p->tag); if (!ast_strlen_zero(p->theirtag)) snprintf(to, sizeof(to), "<sip:%s@%s>;tag=%s", r->username, p->tohost, p->theirtag); else snprintf(to, sizeof(to), "<sip:%s@%s>", r->username, p->tohost); } the new code is only for sipgate.de, it can't be used for all other providers, with some it works, with other not. if i have more time, i can search for an other patch, but i have to much to do. but i hope, this can help you, to find out, why a false from-domain is used at this point for the registration by sipgate. goodby By: Kevin P. Fleming (kpfleming) 2005-05-19 23:17:27 What happens if you just use the correct domain in the register=> line and the correct domain in the SIP peer definition? They do not have to be the same, in fact they are not even really related, since outbound registrations are involved with incoming calls, generally. By: Kevin P. Fleming (kpfleming) 2005-05-19 23:18:06 Also, please review the bug posting guidelines: for SIP interoperability problems, we need a complete SIP trace of the failing call, along with the relevant portions of your configuration file(s). By: Dieter Ferdinand (dferdi) 2005-05-20 03:09:47 register => xxxxxxx:xxxxxxx@sipgate.de/SIPIN outgoiung calls are ok [sipgate.de] type=peer secret=xxxxxx username=xxxxxxxx host=proxy.de.sipgate.net fromuser=xxxxxxxxx fromdomain=sipgate.de nat=yes insecure=very canreinvite=no 2005-05-20 09:54:01 NOTICE[10576]: Failed to authenticate on REGISTER to '<sip:xxxxxx@proxy.de.sipgate.net>;tag=as3bcc8dc7' 2005-05-20 09:54:21 NOTICE[10576]: -- Registration for 'xxxxxx@sipgate.de' timed out, trying again 2005-05-20 09:54:21 DEBUG[10576]: Allocating new SIP call for 0d34b6a810233c993f6ab60f61574095@sipgate.de 2005-05-20 09:54:21 DEBUG[10576]: Setting NAT on RTP to 4 2005-05-20 09:54:21 DEBUG[10576]: ##### Testing 217.10.79.9 with 192.168.1.0 2005-05-20 09:54:21 DEBUG[10576]: Target address 217.10.79.9 is not local, substituting externip 2005-05-20 09:54:21 DEBUG[10576]: Scheduled a registration timeout # 53 2005-05-20 09:54:21 DEBUG[10576]: Stopping retransmission on '0d34b6a810233c993f6ab60f61574095@sipgate.de' of Request 108: Found 2005-05-20 09:54:21 DEBUG[10576]: Stopping retransmission on '0d34b6a810233c993f6ab60f61574095@sipgate.de' of Request 109: Found 2005-05-20 09:54:21 DEBUG[10576]: Stopping retransmission on '0d34b6a810233c993f6ab60f61574095@sipgate.de' of Request 110: Found 2005-05-20 09:54:21 NOTICE[10576]: Failed to authenticate on REGISTER to '<sip:xxxxxxx@proxy.de.sipgate.net>;tag=as4db66991' 2005-05-20 09:54:41 NOTICE[10576]: -- Registration for 'xxxxxx@sipgate.de' timed out, trying again 2005-05-20 09:54:41 DEBUG[10576]: Allocating new SIP call for 0d34b6a810233c993f6ab60f61574095@sipgate.de 2005-05-20 09:54:41 DEBUG[10576]: Setting NAT on RTP to 4 2005-05-20 09:54:41 DEBUG[10576]: ##### Testing 217.10.79.9 with 192.168.1.0 2005-05-20 09:54:41 DEBUG[10576]: Target address 217.10.79.9 is not local, substituting externip 2005-05-20 09:54:41 DEBUG[10576]: Scheduled a registration timeout # 57 2005-05-20 09:54:41 DEBUG[10576]: Stopping retransmission on '0d34b6a810233c993f6ab60f61574095@sipgate.de' of Request 111: Found 2005-05-20 09:54:41 DEBUG[10576]: Stopping retransmission on '0d34b6a810233c993f6ab60f61574095@sipgate.de' of Request 112: Found this is the content of the error-message from sipgate: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 213.54.187.70:5060;branch=z9hG4bK3af26225;rport=29215 From: <sip:xxxxxxx@proxy.de.sipgate.net>;tag=as4db66991 To: <sip:xxxxxx@proxy.de.sipgate.net>;tag=b11cb9bb270104b49a99a995b8c68544.0a80 Call-ID: 0d34b6a810233c993f6ab60f61574095@sipgate.de CSeq: 108 REGISTER WWW-Authenticate: Digest realm="proxy.de.sipgate.net", nonce="428d98d91788a9d6631940e24b41b9d8445a741b" Server: sipgate ser Content-Length: 0 Warning: 392 217.10.79.9:5060 "Noisy feedback tells: pid=6854 req_src_ip=213.54.187.70 req_src_port=29215 in_uri=sip:sipgate.de out_uri=sip:sipgate.de via_cnt==1" sipgate only accept sipgate.de for authentication and not proxy.de.sipgate.net in the from header! content of the register-mesage: REGISTER sip:sipgate.de SIP/2.0 Via: SIP/2.0/UDP 213.54.187.70:5060;branch=z9hG4bK3af26225;rport From: <sip:xxxxxxx@proxy.de.sipgate.net>;tag=as4db66991 To: <sip:xxxxxxx@proxy.de.sipgate.net> Call-ID: 0d34b6a810233c993f6ab60f61574095@sipgate.de CSeq: 108 REGISTER User-Agent: Asterisk PBX Authorization: Digest username="xxxxxxx", realm="proxy.de.sipgate.net", algorithm=MD5, uri="sip:sipgate.de", nonce="428d98c53dc53308d8d0d4d2b7fe 884ffbf44aea", response="e7f4a5c6ba5c0f14d9ab276b41bd7e48", opaque="" Expires: 120 Contact: <sip:SIPIN@213.54.187.70> Event: registration Content-Length: 0 content of the register-message after modification of chan_sip.c which can register by sipgate: REGISTER sip:sipgate.de SIP/2.0 Via: SIP/2.0/UDP 213.54.174.41:5060;branch=z9hG4bK2dc62e8e;rport From: <sip:xxxxxx@sipgate.de>;tag=as33276881 To: <sip:xxxxxx@sipgate.de>;tag=b11cb9bb270104b49a99a995b8c68544.46ee Call-ID: 2408972a4969071934b99ecc6552c933@sipgate.de 0eisa CSeq: 103 REGISTER eisa User-Agent: Asterisk PBX Authorization: Digest username="xxxxxxx", realm="sipgate.de", algorithm=MD5, uri="sip:sipgate.de", nonce="428d9b01b3c6dd460934f43ce6079b207efd97 81", response="fc41a75f22768d24fa88cd9fca96d86b", opaque="" Expires: 120 Contact: <sip:SIPIN@213.54.174.41> Event: registration Content-Length: 0 you can see, the problem is a false realm-name and from-domain. you can register by www.sipgate.de to try it out. the account is free of charge. at the first day after installion of asterisk, it works, but since some day's it don't work anymore. i think, sipgate change somethin in his settings. goodby By: Olle Johansson (oej) 2005-05-21 14:56:57 Please test my patch in 3850 that also addresses this problem. Asterisk incorrectly changes the domain (sipgate.de) to a hostname found by SRV records, which breaks the RFC compliance. By: Olle Johansson (oej) 2005-05-21 14:58:29 BTW, that is not a full debug output. You need to set verbose to 4, debug to 4 and turn on SIP DEBUG. Dump it to a file, and add the file to the bug report, do not include the text within the report. Before doing that, please test my patch. By: tootai (tootai) 2005-05-22 05:48:22 I also use sipgate.de and have no problem to register and never had. Problem is perhaps coming from stable version as I always used the CVS one since I opened the sipgate.de account around 6 monthes ago. I faced a similar registration problem with an other provider in France and stable version: never got it work. With CVS, no problem. By: Dieter Ferdinand (dferdi) 2005-05-22 07:50:17 hello, it drives my crasy, it works again with the original module. but i have an other problem. since two day i have a sip-account by t-online and it is absolutly impossible, to register with asterisk. this provider need two user-id's, the e-mail-adresse and the sip-number. the manual is very simple but don't works. after some tries, i find a combination, which works with xten and i analyse the dialog, to get information, why it don't work with asterisk. From: "e-mail@t-online.de" <sip:sip-nr@tel.t-online.de>;tag=2016205401 To: "e-mail@t-online.de" <sip:sip-nr@tel.t-online.de> Contact: "e-mail@t-online.de" <sip:sip-nr@ip-address:5061> Call-ID: xxxxxx@tel.t-online.de CSeq: 35113 REGISTER Expires: 1800 Authorization: Digest username="e-mail@t-online.de",realm="tel.t-online.de",nonce="xxxxxxxxxx",resp i find no way, to generate a head with this information. i get the follow headers: sip:nr@tel.t-online.de sip:e-mail@tel.t-online.de the @ in the email is subtitued with %40 but i find no way, to get the right information in the header. can you help me? goodby By: Dieter Ferdinand (dferdi) 2005-05-25 18:15:48 hello, that the register by sipgate works again with the original chan_sip is no indication, that here is no bug. at the first time, i need no additional record in extensions.conf to receive the call. after changing the modul and register again, i must insert a new extension, to receive a call from sipgate. i think, sipgate change the software or settings and this makes problems at the beginning for some days. it is possible, that the same problem happens in future, if the settings on the sip-proxy are very strict and asterisk maps the domain to another proxy. it is possible, to give more parameters for outgoing calls and asterisk can use the same parameters to register by the sip-proxy to prevent such problems in future. why can i set a host to connect, when asterisk ignore this settings and connect to another host as i want? goodby By: Michael Jerris (mikej) 2005-06-27 23:00:11 oej- As this is no longer an issue with sipgate.de, is this a duplicate of 4466 (sip domain support?) By: Olle Johansson (oej) 2005-07-20 12:49:50 --- No answer from reporter. Suppose this is not an issue any more. |