(SIP HEADERS) mv370 issues anyone?
Hey all,
I decided to pick up a portech mv370 gsm to sip gateway and needless to say it's one big flaming piece of crap. Even with tech support from portech, they couldn't get it working properly. Well, needless to say, I got it *somewhat* functioning, but I was wondering if anyone else with this unit realized that it sends the CIDname and CIDnum in reverse order?
Obviously, it's an issue due to the fact that when you reroute the call out a trunk, it doesn't pass the CIDnum.
Anybody with a quickie fix out there?
SIP DEBUG shows: where "2126608888" should be the CIDnum and not the CIDname and
<--- SIP read from 192.168.1.247:5060 ---> ACK sip:523@192.168.1.250 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.247:5060;branch=z9hG4bK2dc02a83af From: "2126608888" <sip:gsm1in@192.168.1.250>;tag=4a0dc00a To: <sip:523@192.168.1.250>;tag=as6e722499 Call-ID: 0cb93c805532fe0606c3679d06c777e3@192.168.1.247 Contact: <sip:gsm1in@192.168.1.247:5060> CSeq: 801 ACK Max-Forwards: 70 User-Agent: CM5K (706220) Content-Length: 0
I tried to write a custom context that would assign a fictitious DID to the trunk and then route from it with the CIDname as the CIDnum using Set(CallerID(num)=$(CallerID(Name)) then passing back to from-trunks, but it doesn't seem to work.. Then again, I'm a lousy coder.. I'm more an architecture and admin type.
Enclosed are my configs if anyone wants to muck around and put one together for me.. (*hint*):
Sadly enough, this could be a great product if it just *worked* properly. Half the time it picks up, the other half, it doesn't, or it just drops me to a disa generated within the gsm-gateway. (obviously, I disabled the box until a pending solution might work *security*).
Well.. Hopefully someone has a workable answer considering it's pretty much useless if I can't have the CID forwarded to my real cellphone.
TIA.
Basically, it should work like this:
Caller----> mv370 -----> Trixbox ----> voip trunk----> My real cell phone
*sigh*.. crappy taiwanese hardware... (hey.. I'm chinese, I'm allowed to make fun of my ethnic manufacturing quality) **hehe**
I left my comments for the context in, because it pretty much describes what I'm trying to do..
Trunk Settings that matter: (incoming)
User Context: gsm1in
type=friend
secret=trueism1
username=gsm1in
context=gsm-gateway-phony-did
permit=0.0.0.0/0.0.0.0
qualify=yes
host=dynamic
Extensions_custom.conf
[gsm-gateway-phony-did]
;Give the incoming calls from this trunk a phony DID so I can route the calls properly
; then set the CIDnum as the CIDname because the manufacturer's a retard.
;
exten => _.,1,Noop(Fixing DID to 2125551213)
exten => _.,1,Set(CALLERID(num)=${CALLERID(name)})
;
;verify this works or doesn't work
;
exten => _.,1 Noop(${CALLERID(all)})
;This is where I mess around with either dialing an extension or passing to another context
; obviously comment / uncomment one or the other.
;
exten => _.,n Dial(SIP/523)
;exten => _.,n,Goto(from-trunk,2125551213,1)
[gsm]
exten => _X.,1,EAGI(fixcid_mv370.php,${SIP_HEADER(FROM)})
exten => _X.,n,Set(CALLERID(name)=GSM)
exten => _X.,n,Verbose(CallerID is $(CALLERID(NUM))
fixcid_mv370.php
#!/usr/bin/php -f
<?PHP
###############################################################################
#### fixcid_mv370.php - AGI-BIN
#### Author: Filippo Grassilli
###############################################################################
$cidnum=$_SERVER[argv][1]; // Caller Number (CallerID)
// Fix CallerID for GSM Gateway Portech MV-370 - Pass SIP_HEADER(FROM)
if(ereg("
if($cidnum[0]=="+") {
if(ereg("^\+371",$cidnum)) $cidnum=substr($cidnum,4);
else $cidnum="00".substr($cidnum,1);
} elseif($cidnum=="N") {
$cidnum="";
}
}
$cidnum="0".$cidnum;
echo "set variable CALLERID(NUM) \"$cidnum\"\n";
Is this code still valid? I just tested on a MV-374 and it didn't work. The outbound calls through the gateway show the SIM card's phone number instead of the SIP caller's number. Any fix? The firmware shows the latest August version. I saved the PHP file to var/lib/asterisk/agi-bin and made asterisk the owner and the rights 0755, then added the gsm context to extensions_custom.conf and referenced it in the peer details of the GSM trunk context=gsm
Not allways for forwarding, it can be used in companys as trunk for saving money calling to mobile phones. Specialy if company have free talks between workers mobile phones, so we can make outbound route to gsm. Im using gsm only as trunk, but in one service sending sms with cid number, but there is determinated number of called phone numbers.
I'm looking to use this for Incoming GSM Service. Apparently (after really looking @ my phone bills) My "Anytime" minutes are charged against incoming calls. Now, this may not be a big deal until you have 8 employees out in the field constantly calling the office for support, questions, etc. Those minutes get burned up pretty quickly, but with a GSM<-->VOIP gateway, those minutes don't get burned up, but are "free", because they're mobile to mobile. That leads to a big savings for me.
But would you really sacrifice the caller ID feature just to lower your bill? I was exploring the idea of GSM gateway to offer it to my clients who have plenty of reps out in the field. When I saw that the incoming CID is getting replaced with the one of the SIM cards' CID I had to mention this in my offers but none of the clients was interested. The rep needs to know where the call is coming from. Also, what happens if the wireless vendor finds out that those calls are coming from a GSM gateway, they will begin deactivating the SIM card as this is against their policy. Having said that, this gateway works well for the company calling its reps (not customers calling the reps through the gateway) or the reps calling the company.
Incoming CID ->gsm->asterisk will work, outgoing CID asterisk->gsm->somethere will allways be sim card number or 2 or 3 numbers, depend on route/trunk configuration. Calling to this gsm number you will go an IVR or to a secretary or ringroup as you wish. So in many cases there is no problem. About bloking SIM card i think operators are interested in to make more traffic from your company via gsm connection but not from pstn :)


Member Since:
2007-04-30